From report at bugs.python.org Wed Mar 1 00:01:55 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 01 Mar 2017 05:01:55 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1488344515.47.0.52881374131.issue29302@psf.upfronthosting.co.za> Nick Coghlan added the comment: I quite like the idea of enhancing the existing ExitStack to also handle asynchronous operations rather than having completely independent implementations. However, a separate object may end up being simpler in practice as it allows developers to more explicitly declare their intent of writing async-friendly code. Sketching out what a combined implementation based on the current ExitStack might look like: - add suitable `__aenter__` and `__aexit__` implementations - add `enter_context_async` (async def, called with await) - add `push_aexit` (normal def, but given function is called with await) - add `coroutine_callback` (normal def, but given coroutine is called with await) - add `close_async` (async def, called with await) - add a new internal state flag `_allow_async`. This would default to True, but be set to False when the synchronous `__enter__` is called. When it's false, attempting to register an async callback would raise RuntimeError. `__enter__` would also need to check any previously register contexts and callbacks, and complain if any of them require the use of `Await` - keep track of which callbacks should be invoked as synchronous calls and which should be called via await - update `close` to raise RuntimeError if it's asked to clean up asynchronous resources That's really quite messy and hard to explain, and makes async code look quite different from the corresponding synchronous code. The repeated checks of `self._allow_async` and `iscoroutinefunction` would also slow down existing synchronous code for no specific end user benefit. By contrast, a dedicated AsyncExitStack object can: - assume everything passed to it is a coroutine or an async context manager by default - always require close() to be called via await - either add synchronous variants of the default-to-async methods (`enter_context_sync`, `push_sync`, `callback_sync`), or else make them auto-adapt to handle both synchronous and asynchronous inputs - rather than using `iscoroutinefunction`, instead always invoke callbacks with await, and wrap synchronous callbacks supplied using the above methods in simple one-shot iterators ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 00:11:29 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 01 Mar 2017 05:11:29 +0000 Subject: [issue29679] Add @contextlib.asynccontextmanager In-Reply-To: <1488324069.16.0.696570474408.issue29679@psf.upfronthosting.co.za> Message-ID: <1488345089.09.0.0120466396003.issue29679@psf.upfronthosting.co.za> Nick Coghlan added the comment: It's probably worth a python-dev discussion, but I personally draw the line at "Does this need to import 'asyncio'?". If it does, then that's a clear dependency inversion, and the functionality doesn't belong in a relatively low level module like contextlib. If it doesn't, then I think the potentially tricky part of this kind of code is the way it interacts with the execution stack and the context management machinery, so it makes sense for it to live in contextlib and have a design and review process that's closely aligned with that for the corresponding synchronous APIs. That said, one of my review comments on the PR was that the new test cases should be split out to their own file to avoiding making the existing tests depend on asyncio, which I'd consider a point in favour of adding an `asyncio.contextlib` module instead of adding these APIs directly to contextlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 00:28:27 2017 From: report at bugs.python.org (Martin Panter) Date: Wed, 01 Mar 2017 05:28:27 +0000 Subject: [issue29681] getopt fails to handle option with missing value in middle of list In-Reply-To: <1488339150.93.0.468964367944.issue29681@psf.upfronthosting.co.za> Message-ID: <1488346107.78.0.509589316751.issue29681@psf.upfronthosting.co.za> Martin Panter added the comment: It's not clear what you expected the behaviour to be. A function cannot both raise an exception and return a value. In any case, you are correct in saying "the next option, '-d', is taken as the argument." I do not think this is a bug. See for the Posix specification of "getopt". Perhaps you are confused by a bug or quirk of "argparse", where it treats most CLI arguments that begin with a dash specially, even if according to Posix they would be associated with an option. See Issue 9334. ---------- components: +Library (Lib) -Extension Modules nosy: +martin.panter resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 00:45:23 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 01 Mar 2017 05:45:23 +0000 Subject: [issue29679] Add @contextlib.asynccontextmanager In-Reply-To: <1488324069.16.0.696570474408.issue29679@psf.upfronthosting.co.za> Message-ID: <1488347123.65.0.318031985843.issue29679@psf.upfronthosting.co.za> Nick Coghlan added the comment: python-dev thread: https://mail.python.org/pipermail/python-dev/2017-March/147501.html In formulating my question for the list, it occurred to me that while asynccontextmanager doesn't need to depend on asyncio, the AsyncExitStack proposed in issue 29302 likely will, which pushes me towards favouring the `asyncio.contextlib.asynccontextmanager` approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 00:54:36 2017 From: report at bugs.python.org (Alex CHEN) Date: Wed, 01 Mar 2017 05:54:36 +0000 Subject: [issue29682] Checks for null return value Message-ID: <1488347676.64.0.259401612021.issue29682@psf.upfronthosting.co.za> New submission from Alex CHEN: Hi, Our tool reported a position that doesn't check for returned value (from a function that might returns null). might need a look that is there any problem or I am missing something. in function PyUnknownEncodingHandler of file pyexpat.c, if (namespace_separator != NULL) { self->itself = XML_ParserCreateNS(encoding, *namespace_separator); } else { self->itself = XML_ParserCreate(encoding); // could XML_ParserCreate returns null in this point? } ..... XML_SetHashSalt(self->itself, // if it does return null, null pointer will passed into XML_SetHashSalt and will be dereferenced. (unsigned long)_Py_HashSecret.prefix); #endif ---------- messages: 288739 nosy: alexc priority: normal severity: normal status: open title: Checks for null return value versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 01:17:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Mar 2017 06:17:34 +0000 Subject: [issue29681] getopt fails to handle option with missing value in middle of list In-Reply-To: <1488339150.93.0.468964367944.issue29681@psf.upfronthosting.co.za> Message-ID: <1488349054.29.0.469673311255.issue29681@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Martin. This is not a bug. ---------- nosy: +serhiy.storchaka stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 01:25:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Mar 2017 06:25:08 +0000 Subject: [issue29682] Checks for null return value In-Reply-To: <1488347676.64.0.259401612021.issue29682@psf.upfronthosting.co.za> Message-ID: <1488349508.83.0.994432866045.issue29682@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Extension Modules keywords: +easy (C) nosy: +gregory.p.smith, serhiy.storchaka stage: -> needs patch type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 01:29:40 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 01 Mar 2017 06:29:40 +0000 Subject: [issue28598] RHS not consulted in `str % subclass_of_str` case. In-Reply-To: <1478180164.76.0.63576586286.issue28598@psf.upfronthosting.co.za> Message-ID: <1488349780.55.0.293922934153.issue28598@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 01:42:11 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 01 Mar 2017 06:42:11 +0000 Subject: [issue26867] test_ssl test_options fails on ubuntu 16.04 In-Reply-To: <1461728238.71.0.110276038105.issue26867@psf.upfronthosting.co.za> Message-ID: <1488350531.82.0.976562725796.issue26867@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +311 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 02:28:16 2017 From: report at bugs.python.org (Wolfgang Maier) Date: Wed, 01 Mar 2017 07:28:16 +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: <1488353296.91.0.0575846107134.issue29414@psf.upfronthosting.co.za> Wolfgang Maier added the comment: > [...] I prefere the chapter as it currently is, because IMHO it > introduces the concepts more gradually than your proposal. That's ok! It's your PR and I only wanted to show an alternative. I was hoping for a bit more people to provide feedback though. The main reason I'm interested in changes to the tutorial is because I'm teaching Python to undergraduates (not in CS, but in Biology) and I recommend them to work through the Tutorial alongside the course so I have a natural interest in its quality and really appreciate any improvement, which I think your PR is certainly offering :) Let me still comment on some of your points regarding my suggestion: > In addition the modification of the title section from "for > Statements" to "for Loops" IMHO makes the title not consistent with > the other section titles. I don't see this point. The other section titles are not about loops. The preceding chapter introduces while loops as a loop, not a statement, and this chapter talks about while and for loops further down the page. >> - restructured the for loop section to discuss Python for loops >> first and only compare them to Pascal/C afterwards > +0. I think for a reader who is coming from another language is better > to have the current introduction. But maybe it is not the same for a > reader who is learning Python as a first programming language. I don't agree with you on this. I'm coming from a C background myself, but if I want to learn a new language the first thing I'm interested in is not how it's *not* working, but how it does. Plus, it's 2017, Perl has foreach, Javascript has at least array.foreach and even C++11 has auto-iteration over collections so starting an explanation of for loops with 'hey, look Python is different from two > 40 years old languages' feels a bit outdated. Regarding my main point of removing most of the ranges section it is possible I went a bit too far with that and maybe one should still briefly mention the optional start argument and stress that stop is not included in the range, but my seealso is quite prominent and the linked section on range is pretty good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 02:28:38 2017 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 01 Mar 2017 07:28:38 +0000 Subject: [issue29675] SysLogHandler does not seem to always expand %(loglevel)s properly In-Reply-To: <1488278549.76.0.307223036696.issue29675@psf.upfronthosting.co.za> Message-ID: <1488353318.69.0.0374095598205.issue29675@psf.upfronthosting.co.za> Vinay Sajip added the comment: This is not a bug - logging is formatting the message as per the specified format string. It then prepends the priority and sends the result to the socket. What you are seeing is just how systemd/journald interpret the message that's sent. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 02:36:50 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 01 Mar 2017 07:36:50 +0000 Subject: [issue26867] test_ssl test_options fails on ubuntu 16.04 In-Reply-To: <1461728238.71.0.110276038105.issue26867@psf.upfronthosting.co.za> Message-ID: <1488353810.34.0.266527165353.issue26867@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 03:36:18 2017 From: report at bugs.python.org (Ethan Furman) Date: Wed, 01 Mar 2017 08:36:18 +0000 Subject: [issue29594] implementation of __or__ in enum.auto In-Reply-To: <1487354372.81.0.144124774938.issue29594@psf.upfronthosting.co.za> Message-ID: <1488357378.7.0.415083912415.issue29594@psf.upfronthosting.co.za> Ethan Furman added the comment: aenum 2.0 [1] has been released. Because it also covers Python 2.7 I had to enhance its auto() to cover |, &, ^, and ~ so that Enum classes could be properly created. At this moment your choices are to use odd naming or aenum (with its enhanced auto). [1] https://pypi.python.org/pypi/aenum ---------- assignee: -> ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 03:37:34 2017 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 01 Mar 2017 08:37:34 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1488357454.54.0.978445928881.issue29302@psf.upfronthosting.co.za> Alexander Mohr added the comment: Thanks for the feedback Nick! If I get a chance I'll see about refactoring my gist into a base class and two sub-classes with the async supporting non-async but not vice-versa. I think it will be cleaner. Sorry I didn't spend too much effort on the existing gist as I tried quickly layering on async support to move on to my primary task. After doing that I noticed that the code could use some refactoring, but only after taking the time deconstructing the impl to understand how the code works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 03:46:15 2017 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 01 Mar 2017 08:46:15 +0000 Subject: [issue29671] Add function to gc module to check if any reference cycles have been reclaimed. In-Reply-To: <1488227712.23.0.994684569809.issue29671@psf.upfronthosting.co.za> Message-ID: <1488357975.05.0.722165592539.issue29671@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 03:52:12 2017 From: report at bugs.python.org (Brian Coleman) Date: Wed, 01 Mar 2017 08:52:12 +0000 Subject: [issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc Message-ID: <1488358332.92.0.449242887398.issue29683@psf.upfronthosting.co.za> New submission from Brian Coleman: On PyMem_Malloc failure, _PyCode_SetExtra should set co_extra->ce_size = 0. On PyMem_Realloc failure, _PyCode_SetExtra should set co_extra->ce_size = 0. On PyMem_Realloc success, _PyCode_SetExtra should set all unused slots in co_extra->ce_extras to NULL. I will add a GitHub PR for this shortly. ---------- components: Interpreter Core messages: 288745 nosy: brianfcoleman priority: normal severity: normal status: open title: _PyCode_SetExtra behaviour wrong on allocation failure and after realloc type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 03:55:06 2017 From: report at bugs.python.org (Marco Buttu) Date: Wed, 01 Mar 2017 08:55:06 +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: <1488358506.7.0.0635749815676.issue29414@psf.upfronthosting.co.za> Marco Buttu added the comment: > I don't see this point. The other section titles are not about > loops. The preceding chapter introduces while loops as a loop, > not a statement, and this chapter talks about while and for > loops further down the page. What I mean is that currently in every section (of this chapter) about a statemet, the statement is qualified as "statement": "if Statements", "for Statements", "pass Statements", and "break and continue Statements, and else Clauses on Loops". The last one is not an exeption, bacause we have already introduced for and while, and writing "break and continue Statements, and else Clauses on for and while statements" IMO is redundant. I like the current structure of titles, because IMO helps beginners to better classify things (statements, functions, ...), and it is not clear to me the objective motivation for changing "for Statemets" to "for Loops", breaking the structure given by the original author. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 03:57:17 2017 From: report at bugs.python.org (Brian Coleman) Date: Wed, 01 Mar 2017 08:57:17 +0000 Subject: [issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc In-Reply-To: <1488358332.92.0.449242887398.issue29683@psf.upfronthosting.co.za> Message-ID: <1488358637.26.0.64679678752.issue29683@psf.upfronthosting.co.za> Changes by Brian Coleman : ---------- pull_requests: +312 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 03:58:36 2017 From: report at bugs.python.org (Brian Coleman) Date: Wed, 01 Mar 2017 08:58:36 +0000 Subject: [issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc In-Reply-To: <1488358332.92.0.449242887398.issue29683@psf.upfronthosting.co.za> Message-ID: <1488358716.16.0.148077427337.issue29683@psf.upfronthosting.co.za> Brian Coleman added the comment: I have now added a Github pull request here: https://github.com/python/cpython/pull/376 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 04:20:00 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 01 Mar 2017 09:20:00 +0000 Subject: [issue29684] Minor regression in PyEval_CallObjectWithKeywords() Message-ID: <1488360000.25.0.226175161117.issue29684@psf.upfronthosting.co.za> New submission from INADA Naoki: This issue is spin off issue29548. PyEval_CallObjectWithKeywords(PyObject *func, PyObject *args, PyObject *kwargs) should raise TypeError when kwargs is not dict. But after this commit [1], assert(PyDict_Check(kwargs)) can be called when args==NULL. [1] https://github.com/python/cpython/commit/155ea65e5c88d250a752ee5321860ef11ede4085 ---------- keywords: 3.6regression messages: 288748 nosy: haypo, inada.naoki priority: normal severity: normal status: open title: Minor regression in PyEval_CallObjectWithKeywords() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 04:23:39 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 01 Mar 2017 09:23:39 +0000 Subject: [issue29684] Minor regression in PyEval_CallObjectWithKeywords() In-Reply-To: <1488360000.25.0.226175161117.issue29684@psf.upfronthosting.co.za> Message-ID: <1488360219.23.0.773387174937.issue29684@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +314 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 04:26:52 2017 From: report at bugs.python.org (Roundup Robot) Date: Wed, 01 Mar 2017 09:26:52 +0000 Subject: [issue27645] Supporting native backup facility of SQLite In-Reply-To: <1469728098.24.0.732586701981.issue27645@psf.upfronthosting.co.za> Message-ID: <1488360412.73.0.56695513039.issue27645@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +315 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 04:35:09 2017 From: report at bugs.python.org (Lele Gaifax) Date: Wed, 01 Mar 2017 09:35:09 +0000 Subject: [issue27645] Supporting native backup facility of SQLite In-Reply-To: <1469728098.24.0.732586701981.issue27645@psf.upfronthosting.co.za> Message-ID: <1488360909.7.0.717926568283.issue27645@psf.upfronthosting.co.za> Lele Gaifax added the comment: Thank you Aviv, I applied your suggestions and opened a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 04:38:27 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Wed, 01 Mar 2017 09:38:27 +0000 Subject: [issue29677] 'round()' accepts a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1488361107.95.0.105684763954.issue29677@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: This is one of those things that show Python being extremely consistent within itself. Of course, docs should be clarified if needed, but the feature is desirable and useful. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 04:52:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Mar 2017 09:52:05 +0000 Subject: [issue29680] gdb/libpython.py does not work with gdb 7.2 In-Reply-To: <1488335804.47.0.122589974382.issue29680@psf.upfronthosting.co.za> Message-ID: <1488361925.82.0.507554972441.issue29680@psf.upfronthosting.co.za> STINNER Victor added the comment: It's a regression introduced in Python 3.6 by CPython change: https://github.com/python/cpython/commit/d7d2bc8798da3b083e383e949ba01d61b78e4e4d gdb.error was introduced in gdb 7.3 by the commit 07ca107c2d958b45633ef0cdcce7219a95f0cf01: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;f=gdb/python/python.c;h=07ca107c2d958b45633ef0cdcce7219a95f0cf01 ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 06:14:07 2017 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 01 Mar 2017 11:14:07 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1488366847.73.0.728843671351.issue29640@psf.upfronthosting.co.za> Petr Viktorin added the comment: Here is a proof of concept patch from Jaroslav ?karvada. It fixes the problem by holding the mutex used for PyThread_create_key while forking. To make it more than PoC it needs adding _PyThread_AcquireKeyLock and _ReleaseKeyLock (similar to _PyImport_AcquireLock() etc.) and calling those. Other than that, does this approach look reasonable? ---------- keywords: +patch nosy: +encukou Added file: http://bugs.python.org/file46682/fork_hold_keymutex.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 06:37:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Mar 2017 11:37:06 +0000 Subject: [issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc In-Reply-To: <1488358332.92.0.449242887398.issue29683@psf.upfronthosting.co.za> Message-ID: <1488368226.75.0.939633623753.issue29683@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> patch review versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 06:44:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Mar 2017 11:44:24 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1488368664.37.0.674902060909.issue9303@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is detection in the configure script needed? What are SQLite versions in which _v2 APIs were added? What is minimal supported SQLite version? Don't forget about Windows where autotools are not used. ---------- nosy: +serhiy.storchaka versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 06:46:49 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 01 Mar 2017 11:46:49 +0000 Subject: [issue29684] Minor regression in PyEval_CallObjectWithKeywords() In-Reply-To: <1488360000.25.0.226175161117.issue29684@psf.upfronthosting.co.za> Message-ID: <1488368809.89.0.161731925703.issue29684@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +317 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 07:37:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Mar 2017 12:37:29 +0000 Subject: [issue29684] Minor regression in PyEval_CallObjectWithKeywords() In-Reply-To: <1488360000.25.0.226175161117.issue29684@psf.upfronthosting.co.za> Message-ID: <1488371849.53.0.154910054979.issue29684@psf.upfronthosting.co.za> STINNER Victor added the comment: Both PR have been merged, I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 09:52:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Mar 2017 14:52:53 +0000 Subject: [issue29410] Moving to SipHash-1-3 In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za> Message-ID: <1488379973.81.0.1665316365.issue29410@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is an optimization, but I still don't see any significant speedup :-) Would it be possible to write at least one microbenchmark showing a speedup? Maybe hash()? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 09:59:32 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 01 Mar 2017 14:59:32 +0000 Subject: [issue29680] gdb/libpython.py does not work with gdb 7.2 In-Reply-To: <1488335804.47.0.122589974382.issue29680@psf.upfronthosting.co.za> Message-ID: <1488380372.23.0.498119038535.issue29680@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Victor, the gdb commit that you mentioned introduced gdb.GdbError which is different from gdb.error. [1] The correct commit is 621c83642d17cf523c20f55f2ed945a7ec95ea6a. [2] [1] https://sourceware.org/gdb/current/onlinedocs/gdb/Exception-Handling.html#Exception-Handling [2] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=621c83642d17cf523c20f55f2ed945a7ec95ea6a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 10:28:30 2017 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Wed, 01 Mar 2017 15:28:30 +0000 Subject: [issue27879] add os.syncfs() In-Reply-To: <1472321832.99.0.609872620029.issue27879@psf.upfronthosting.co.za> Message-ID: <1488382110.96.0.650113228682.issue27879@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 10:34:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Mar 2017 15:34:44 +0000 Subject: [issue29410] Moving to SipHash-1-3 In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za> Message-ID: <1488382484.19.0.55377429521.issue29410@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And needed microbenchmarks for different sizes, because the result should be relied on fitting the data in caches of different levels. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 10:37:51 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 01 Mar 2017 15:37:51 +0000 Subject: [issue29679] Add @contextlib.asynccontextmanager In-Reply-To: <1488324069.16.0.696570474408.issue29679@psf.upfronthosting.co.za> Message-ID: <1488382671.92.0.457324507747.issue29679@psf.upfronthosting.co.za> Yury Selivanov added the comment: > In formulating my question for the list, it occurred to me that while asynccontextmanager doesn't need to depend on asyncio, the AsyncExitStack proposed in issue 29302 likely will, which pushes me towards favouring the `asyncio.contextlib.asynccontextmanager` approach. As I said in [1], I think asynccontextmanager and AsyncExitStack should be framework agnostic and thus stay in the top level contextlib package. IMO AsyncExitStack should not be dependent on asyncio, and if it is it means we would need to tweak its design to make it not to. I'll take a look at the other issue to see if I can help. [1] https://mail.python.org/pipermail/python-dev/2017-March/147505.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 10:42:34 2017 From: report at bugs.python.org (Marco) Date: Wed, 01 Mar 2017 15:42:34 +0000 Subject: [issue29685] test_gdb failed Message-ID: <1488382954.54.0.564501434146.issue29685@psf.upfronthosting.co.za> New submission from Marco: make test output studio at linux:~/Python-3.6.0> ./python -m test -v test_gdb == CPython 3.6.0 (default, Mar 1 2017, 15:51:48) [GCC 4.8.5] == Linux-4.4.49-16-default-x86_64-with-SuSE-42.2-x86_64 little-endian == hash algorithm: siphash24 64bit == cwd: /home/studio/Python-3.6.0/build/test_python_32667 == encodings: locale=UTF-8, FS=utf-8 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0) Run tests sequentially 0:00:00 [1/1] test_gdb test test_gdb crashed -- Traceback (most recent call last): File "/home/studio/Python-3.6.0/Lib/test/libregrtest/runtest.py", line 152, in runtest_inner the_module = importlib.import_module(abstest) File "/home/studio/Python-3.6.0/Lib/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 978, in _gcd_import File "", line 961, in _find_and_load File "", line 950, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 678, in exec_module File "", line 205, in _call_with_frames_removed File "/home/studio/Python-3.6.0/Lib/test/test_gdb.py", line 46, in gdb_version, gdb_major_version, gdb_minor_version = get_gdb_version() File "/home/studio/Python-3.6.0/Lib/test/test_gdb.py", line 43, in get_gdb_version raise Exception("unable to parse GDB version: %r" % version) Exception: unable to parse GDB version: '' test_gdb failed 1 test failed: test_gdb Total duration: 31 ms Tests result: FAILURE ---------- components: Tests messages: 288760 nosy: MarcoC priority: normal severity: normal status: open title: test_gdb failed type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 10:45:26 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 01 Mar 2017 15:45:26 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1488383126.54.0.38525740699.issue29302@psf.upfronthosting.co.za> Yury Selivanov added the comment: Alexander, You don't need asyncio.isocoroutinefunction. Please use inspect.iscoroutinefunction and inspect.iscoroutine. Nick, I'm +1 to have a separate class AsyncExitStack. > - assume everything passed to it is a coroutine or an async context manager by default I would add a separate set of methods prefixed with 'a' to handle async context managers. > - always require close() to be called via await I'd only have one coroutine 'aclose()' that would internally close sync and async context managers in the right order. > - either add synchronous variants of the default-to-async methods (`enter_context_sync`, `push_sync`, `callback_sync`), or else make them auto-adapt to handle both synchronous and asynchronous inputs I'd use the 'a' prefix. We use it already to name magic methods: __aenter__, __aexit__, __aiter__. > - rather than using `iscoroutinefunction`, instead always invoke callbacks with await, and wrap synchronous callbacks supplied using the above methods in simple one-shot iterators I'd favour a more explicit approach: separate methods for handling sync and async. Also, speaking about asyncio dependancy -- we shouldn't have it. Using asyncio.iscoroutinefunction is unnecessary, inspect.iscoroutinefunction should be used instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 11:06:16 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 01 Mar 2017 16:06:16 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1488384376.33.0.709360534789.issue29302@psf.upfronthosting.co.za> Yury Selivanov added the comment: Looking at the code: we don't need to use iscoroutinefunction at all. If we had separate methods for sync and async context managers, you can store the flag if a function is async or sync along with it. So _exit_callbacks should store tuples `(is_async, cb)`, instead of just `cb`. asyncio.iscoroutinefunction differs from inspect.iscoroutinefunction a little bit to support asyncio-specific debug coroutine wrapper functions. We should avoid using any version of iscoroutinefunction here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 11:21:40 2017 From: report at bugs.python.org (=?utf-8?q?Vin=C3=ADcius_Dantas?=) Date: Wed, 01 Mar 2017 16:21:40 +0000 Subject: [issue29686] Unittest - Return empty string instead of None object on shortDescription() Message-ID: <1488385300.33.0.815532691176.issue29686@psf.upfronthosting.co.za> New submission from Vin?cius Dantas: I have been browsing around the unittest standard library, and I realized that TestCase's shortDescription() method at lib/pythonX.X/unittest/case.py returns None when the there is no docstring on the test that is running. As shortDescription() should obviously return a string, I would recommend returning an empty string instead of None when no docstring is found. This came to mind when I was using testscenario package, which only displays the scenarioname when shortDescription() returns something but None. When we are starting from scratch a test suite, docstrings are left for another stage, when we have running (probably failed, if we are TDDing) unittests. Last yet not least, I am sure it's a good practice to avoid returning None, which forces None-checks, returning empty strings, lists, objects of the return type expected from that function. ---------- components: Tests messages: 288763 nosy: viniciusd priority: normal severity: normal status: open title: Unittest - Return empty string instead of None object on shortDescription() type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 11:45:56 2017 From: report at bugs.python.org (Martijn Pieters) Date: Wed, 01 Mar 2017 16:45:56 +0000 Subject: [issue28598] RHS not consulted in `str % subclass_of_str` case. In-Reply-To: <1478180164.76.0.63576586286.issue28598@psf.upfronthosting.co.za> Message-ID: <1488386756.68.0.129755399277.issue28598@psf.upfronthosting.co.za> Changes by Martijn Pieters : ---------- pull_requests: +318 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 11:57:15 2017 From: report at bugs.python.org (=?utf-8?q?Vin=C3=ADcius_Dantas?=) Date: Wed, 01 Mar 2017 16:57:15 +0000 Subject: [issue29686] Unittest - Return empty string instead of None object on shortDescription() In-Reply-To: <1488385300.33.0.815532691176.issue29686@psf.upfronthosting.co.za> Message-ID: <1488387435.28.0.571327262729.issue29686@psf.upfronthosting.co.za> Changes by Vin?cius Dantas : ---------- pull_requests: +319 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 12:28:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Mar 2017 17:28:27 +0000 Subject: [issue29686] Unittest - Return empty string instead of None object on shortDescription() In-Reply-To: <1488385300.33.0.815532691176.issue29686@psf.upfronthosting.co.za> Message-ID: <1488389307.81.0.687852868291.issue29686@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This can break a code that checks whether shortDescription() is None. If you an empty string rather than None, just use the expression `shortDescription() or ''`. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 12:29:32 2017 From: report at bugs.python.org (Rares Vernica) Date: Wed, 01 Mar 2017 17:29:32 +0000 Subject: [issue29687] smtplib does not support proxy Message-ID: <1488389372.28.0.822188705276.issue29687@psf.upfronthosting.co.za> New submission from Rares Vernica: smtplib does not support connections through a proxy. The accepted workaround is something like: ``` import smtplib import socks socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, proxy_host, proxy_port) socks.wrapmodule(smtplib) smtp = smtplib.SMTP() ``` The side-effects of `socks.wrapmodule` impact other libraries which don't need to use the proxy, like `requests`. See here for a disucssion https://github.com/kennethreitz/requests/issues/3890 ---------- components: Library (Lib) messages: 288765 nosy: rares priority: normal severity: normal status: open title: smtplib does not support proxy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 12:33:46 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Mar 2017 17:33:46 +0000 Subject: [issue29686] Unittest - Return empty string instead of None object on shortDescription() In-Reply-To: <1488385300.33.0.815532691176.issue29686@psf.upfronthosting.co.za> Message-ID: <1488389626.44.0.569399484461.issue29686@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It's too late to change this API. As Serhiy says, it risks breaking code that is currently running and correct. Note the the __doc__ on functions is set to None when there is no docstring. For better or worse, returning None is common in the Python world. ---------- nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 12:37:28 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 01 Mar 2017 17:37:28 +0000 Subject: [issue29688] Document Path.absolute Message-ID: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> New submission from Jim Fasarakis-Hilliard: Method absolute of Path objects lacked documentation, proposed PR adds relevant method to docs. ---------- assignee: docs at python components: Documentation messages: 288767 nosy: Jim Fasarakis-Hilliard, docs at python priority: normal severity: normal status: open title: Document Path.absolute versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 12:38:12 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 01 Mar 2017 17:38:12 +0000 Subject: [issue29688] Document Path.absolute In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1488389892.69.0.838325745953.issue29688@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- pull_requests: +321 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 12:42:03 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Mar 2017 17:42:03 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1488390123.3.0.119943944544.issue29302@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 12:43:07 2017 From: report at bugs.python.org (=?utf-8?q?Vin=C3=ADcius_Dantas?=) Date: Wed, 01 Mar 2017 17:43:07 +0000 Subject: [issue29686] Unittest - Return empty string instead of None object on shortDescription() In-Reply-To: <1488389626.44.0.569399484461.issue29686@psf.upfronthosting.co.za> Message-ID: Vin?cius Dantas added the comment: If it is tagged for future releases, whoever choose to update their Python version should expect code breaking and API changes, shouldn't them? I don't see code breaking as an issue against this request. On 1 March 2017 at 14:33, Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > It's too late to change this API. As Serhiy says, it risks breaking code > that is currently running and correct. > > Note the the __doc__ on functions is set to None when there is no > docstring. For better or worse, returning None is common in the Python > world. > > ---------- > nosy: +rhettinger > resolution: -> rejected > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > -- Vin?cius Dantas de Lima Melo Graduando em Ci?ncias e Tecnologia Universidade Federal do Rio Grande do Norte (UFRN) Escola de Ci?ncias e Tecnologia (ECT) Natal, Rio Grande do Norte vinicius.gppcom at gmail.com viniciusdantas at bct.ect.ufrn.br vinicius.dantasdelimamelo at mail.utoronto.ca | Celular/Mobile Phone: +1 647 447 5737 Skype: viniciusdantas01 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 12:43:32 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Mar 2017 17:43:32 +0000 Subject: [issue29679] Add @contextlib.asynccontextmanager In-Reply-To: <1488324069.16.0.696570474408.issue29679@psf.upfronthosting.co.za> Message-ID: <1488390212.9.0.418166377613.issue29679@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 12:44:57 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Wed, 01 Mar 2017 17:44:57 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1488390297.44.0.774819670504.issue9303@psf.upfronthosting.co.za> Aviv Palivoda added the comment: from https://www.sqlite.org/changes.html: sqlite3_open_v2 - 2007-09-04 (3.5.0) alpha sqlite3_prepare_v2 - 2007-01-04 (3.3.9) sqlite3_close_v2 - 2012-09-03 (3.7.14) In issue 29355 Ma Lin says that RHEL6 comes with SQLite 3.6.x. I think that removing that removing the check for sqlite3_prepare_v2 and sqlite3_open_v2 is fine but sqlite3_close_v2 need to stay. > Don't forget about Windows where autotools are not used. What should I do for this to work on windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 12:55:14 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 01 Mar 2017 17:55:14 +0000 Subject: [issue29686] Unittest - Return empty string instead of None object on shortDescription() In-Reply-To: <1488385300.33.0.815532691176.issue29686@psf.upfronthosting.co.za> Message-ID: <1488390914.6.0.812577119286.issue29686@psf.upfronthosting.co.za> R. David Murray added the comment: We don't make breaking changes unless there is strong motivation, which is lacking here. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 13:25:40 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 01 Mar 2017 18:25:40 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488392740.66.0.582532779938.issue27593@psf.upfronthosting.co.za> Brett Cannon added the comment: I had thought about trying to pull down the remote but it did seems unnecessarily messy when the SHA1 hash should match across various remotes only when the commits actually match. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 13:33:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Mar 2017 18:33:55 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1488390297.44.0.774819670504.issue9303@psf.upfronthosting.co.za> Message-ID: <4258960.AQG26qZ8nk@raxxla> Serhiy Storchaka added the comment: > sqlite3_open_v2 - 2007-09-04 (3.5.0) alpha > sqlite3_prepare_v2 - 2007-01-04 (3.3.9) > sqlite3_close_v2 - 2012-09-03 (3.7.14) There are compile-time checks for supporting SQLite older than 3.2.2. I think it is better to use the preprocessor rather of autotools for conformance with the rest of code. > What should I do for this to work on windows? On Windows manually written PC/pyconfig.h is used rather of generated by configure pyconfig.h. If you change pyconfig.h, you should update PC/pyconfig.h too. But I think this is not needed in this case. Just use SQLITE_VERSION_NUMBER. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 13:52:55 2017 From: report at bugs.python.org (Codey Oxley) Date: Wed, 01 Mar 2017 18:52:55 +0000 Subject: [issue29689] Asyncio-namespace helpers for async_generators Message-ID: <1488394375.71.0.89348090398.issue29689@psf.upfronthosting.co.za> New submission from Codey Oxley: Expanding an async_generator to any container-type currently makes you do an async-for loop/comprehension. There are some third-party libs (aitertools) that have helpers but it would be nice for this to be upstream for list, tuple, dict, set, etc. Usage might be: expanded: List[int] = await asyncio.list(gen()) ---------- components: Library (Lib), asyncio messages: 288773 nosy: Codey Oxley, gvanrossum, yselivanov priority: normal severity: normal status: open title: Asyncio-namespace helpers for async_generators type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 13:55:36 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 01 Mar 2017 18:55:36 +0000 Subject: [issue29689] Asyncio-namespace helpers for async_generators In-Reply-To: <1488394375.71.0.89348090398.issue29689@psf.upfronthosting.co.za> Message-ID: <1488394536.36.0.148991849629.issue29689@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 14:05:57 2017 From: report at bugs.python.org (Marc Guetg) Date: Wed, 01 Mar 2017 19:05:57 +0000 Subject: [issue29594] implementation of __or__ in enum.auto In-Reply-To: <1487354372.81.0.144124774938.issue29594@psf.upfronthosting.co.za> Message-ID: <1488395157.6.0.164229040904.issue29594@psf.upfronthosting.co.za> Marc Guetg added the comment: @ethan, didn't know about aenum, thanks for showing it to me. However it doesn't seem to support the behavior I'm after (or I'm doing something wrong) import aenum try: class Foo(aenum.Flag): a = aenum.auto() b = a | aenum.auto() except Exception as err: print(err) try: class Bar(aenum.Flag): a = aenum.auto() b = aenum.auto() | a except Exception as err: print(err) results in unsupported operand type(s) for |: 'int' and 'auto' exceptions must derive from BaseException where the latter might be a bug in the implementation. I do realize that I'm stuck with this for the moment. My motivation with opening this thread was that I was wondering if such a feature would be worthwhile for the community. In case there is interest in this feature I would try to run the unit test and follow all the steps to try to push it through. However I save myself the work in case the community decides that the implementation is not worth it. Which would also be fine with me, as I monkey patched it for my code - so no problem on my end. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 14:16:36 2017 From: report at bugs.python.org (Scott Russ) Date: Wed, 01 Mar 2017 19:16:36 +0000 Subject: [issue29689] Asyncio-namespace helpers for async_generators In-Reply-To: <1488394375.71.0.89348090398.issue29689@psf.upfronthosting.co.za> Message-ID: <1488395796.71.0.236455887401.issue29689@psf.upfronthosting.co.za> Changes by Scott Russ : ---------- nosy: +Scott Russ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 14:30:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Mar 2017 19:30:08 +0000 Subject: [issue29594] implementation of __or__ in enum.auto In-Reply-To: <1487354372.81.0.144124774938.issue29594@psf.upfronthosting.co.za> Message-ID: <1488396608.76.0.817179316629.issue29594@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think it is worthwhile. Using underscored names looks pretty pythonic to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 14:44:01 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Wed, 01 Mar 2017 19:44:01 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1488397441.43.0.287590852405.issue9303@psf.upfronthosting.co.za> Aviv Palivoda added the comment: I changed the patch to use SQLITE_VERSION_NUMBER and it looks way better. Thanks Serhiy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 15:41:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Mar 2017 20:41:21 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1488400881.16.0.887902361844.issue29302@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 15:41:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Mar 2017 20:41:40 +0000 Subject: [issue29679] Add @contextlib.asynccontextmanager In-Reply-To: <1488324069.16.0.696570474408.issue29679@psf.upfronthosting.co.za> Message-ID: <1488400900.08.0.155910785778.issue29679@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 16:48:33 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Mar 2017 21:48:33 +0000 Subject: [issue29679] Add @contextlib.asynccontextmanager In-Reply-To: <1488324069.16.0.696570474408.issue29679@psf.upfronthosting.co.za> Message-ID: <1488404913.69.0.667132813549.issue29679@psf.upfronthosting.co.za> Raymond Hettinger added the comment: At third alternative is to create an asynctools module to collect together tools that work with the async keyword but aren't dependent on asyncio. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 18:57:07 2017 From: report at bugs.python.org (Roundup Robot) Date: Wed, 01 Mar 2017 23:57:07 +0000 Subject: [issue28129] assertion failures in ctypes In-Reply-To: <1473779654.66.0.219445763591.issue28129@psf.upfronthosting.co.za> Message-ID: <1488412627.1.0.751952843493.issue28129@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +322 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 19:00:57 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 02 Mar 2017 00:00:57 +0000 Subject: [issue28129] assertion failures in ctypes In-Reply-To: <1473779654.66.0.219445763591.issue28129@psf.upfronthosting.co.za> Message-ID: <1488412857.39.0.99073710638.issue28129@psf.upfronthosting.co.za> Oren Milman added the comment: The fix for issue #25659 already replaced the assertions in CDataType_from_buffer and CDataType_from_buffer_copy with if statements (my bad for missing that issue when I opened this one). In addition, that fix added some tests, so I also added some, and created a pull request. I run the test module again, and on my Windows 10, the same tests failed with and without my patches. However, on my Ubuntu 16.04 VM, none of the tests failed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 19:06:45 2017 From: report at bugs.python.org (Ethan Furman) Date: Thu, 02 Mar 2017 00:06:45 +0000 Subject: [issue29594] implementation of __or__ in enum.auto In-Reply-To: <1487354372.81.0.144124774938.issue29594@psf.upfronthosting.co.za> Message-ID: <1488413205.24.0.772161603827.issue29594@psf.upfronthosting.co.za> Ethan Furman added the comment: Serhiy, agreed. Closing. Marc, thanks, I see I missed supporting non-auto() combinations. Feel free to open an issue for that at: https://bitbucket.org/stoneleaf/aenum Either way I'll get that fixed. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 19:11:14 2017 From: report at bugs.python.org (Todd Goldfinger) Date: Thu, 02 Mar 2017 00:11:14 +0000 Subject: [issue22810] tkinter: "alloc: invalid block:" after askopenfilename In-Reply-To: <1415316246.92.0.943780326563.issue22810@psf.upfronthosting.co.za> Message-ID: <1488413474.45.0.765013695549.issue22810@psf.upfronthosting.co.za> Todd Goldfinger added the comment: This crashes reliably on Win10 with the same error message. Place cursor after the 2 in the top spin box. Type 0. I have the following files in Anaconda3/tcl: tcl86t.lib, tcl86tg.lib, tclstub86.lib, tk86t.lib, tk86tg.lib, tkstub86.lib. Python 3.6.0 |Anaconda 4.3.0 (64-bit)| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. ---------- components: +Windows nosy: +Todd Goldfinger, paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.6 -Python 2.7, Python 3.4 Added file: http://bugs.python.org/file46683/crash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 1 20:44:40 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 02 Mar 2017 01:44:40 +0000 Subject: [issue29679] Add @contextlib.asynccontextmanager In-Reply-To: <1488324069.16.0.696570474408.issue29679@psf.upfronthosting.co.za> Message-ID: <1488419079.99.0.402700599109.issue29679@psf.upfronthosting.co.za> Nick Coghlan added the comment: In the specific case of contextlib, most of the APIs should be able to transparently support async/await without negatively impacting their synchronous behaviour, so after the python-dev discussion, I think one module with separate sync and async test suites is a good way to go for contextlib specifically: https://mail.python.org/pipermail/python-dev/2017-March/147520.html However, as noted in that message, I *don't* think we can conclude that's going to be the right answer for the standard library in general - for many modules, a separate a or aio published via PyPI and potentially considered for stdlib inclusion later is going to make more sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 02:31:29 2017 From: report at bugs.python.org (Mathieu Dupuy) Date: Thu, 02 Mar 2017 07:31:29 +0000 Subject: [issue29690] no %z directive for strptime in python2, doc says nothing about it Message-ID: <1488439889.25.0.877178323072.issue29690@psf.upfronthosting.co.za> New submission from Mathieu Dupuy: ? ~ cat dt.py from datetime import * dt = datetime.strptime('+1720', '%z') print(dt) ? ~ python2 dt.py Traceback (most recent call last): File "dt.py", line 2, in dt = datetime.strptime('+1720', '%z') File "/usr/lib/python2.7/_strptime.py", line 324, in _strptime (bad_directive, format)) ValueError: 'z' is a bad directive in format '%z' ? ~ python3 dt.py 1900-01-01 00:00:00+17:20 We should either mention it in doc, either cherry-pick the code from python3 ---------- components: Library (Lib) messages: 288782 nosy: deronnax priority: normal severity: normal status: open title: no %z directive for strptime in python2, doc says nothing about it type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 02:57:04 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 02 Mar 2017 07:57:04 +0000 Subject: [issue28272] a redundant check in maybe_small_long In-Reply-To: <1474807129.82.0.382884780028.issue28272@psf.upfronthosting.co.za> Message-ID: <1488441424.75.0.624866424636.issue28272@psf.upfronthosting.co.za> Oren Milman added the comment: ping (just to close the issue, I think) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 03:15:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Mar 2017 08:15:29 +0000 Subject: [issue28272] a redundant check in maybe_small_long In-Reply-To: <1474807129.82.0.382884780028.issue28272@psf.upfronthosting.co.za> Message-ID: <1488442529.01.0.4513432414.issue28272@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Try to bench list(range(256)). It should create small ints in tight loop. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 03:25:02 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 02 Mar 2017 08:25:02 +0000 Subject: [issue24665] CJK support for textwrap In-Reply-To: <1437276510.99.0.116072917153.issue24665@psf.upfronthosting.co.za> Message-ID: <1488443102.07.0.363057125515.issue24665@psf.upfronthosting.co.za> INADA Naoki added the comment: See also http://www.unicode.org/reports/tr29/ http://www.unicode.org/reports/tr14/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 03:42:36 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Thu, 02 Mar 2017 08:42:36 +0000 Subject: [issue29691] Some tests fail in coverage Travis check Message-ID: <1488444156.84.0.711063027432.issue29691@psf.upfronthosting.co.za> New submission from Jelle Zijlstra: A few tests fail in the coverage Travis target (see e.g. https://travis-ci.org/python/cpython/jobs/206480468): test_traceback and test_xml_etree. I extracted the actual failures by running in verbose mode locally: ====================================================================== FAIL: test_recursive_traceback_cpython_internal (test.test_traceback.TracebackFormatTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jelle/cpython-dev/cpython-1/Lib/test/test_traceback.py", line 431, in test_recursive_traceback_cpython_internal self._check_recursive_traceback_display(render_exc) File "/home/jelle/cpython-dev/cpython-1/Lib/test/test_traceback.py", line 347, in _check_recursive_traceback_display self.assertEqual(actual[-1], expected[-1]) AssertionError: 'RecursionError: maximum recursion depth exceeded in comparison' != 'RecursionError: maximum recursion depth exceeded' - RecursionError: maximum recursion depth exceeded in comparison ? -------------- + RecursionError: maximum recursion depth exceeded ====================================================================== FAIL: test_recursive_traceback_python (test.test_traceback.TracebackFormatTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jelle/cpython-dev/cpython-1/Lib/test/test_traceback.py", line 423, in test_recursive_traceback_python self._check_recursive_traceback_display(traceback.print_exc) File "/home/jelle/cpython-dev/cpython-1/Lib/test/test_traceback.py", line 347, in _check_recursive_traceback_display self.assertEqual(actual[-1], expected[-1]) AssertionError: 'RecursionError: maximum recursion depth exceeded in comparison' != 'RecursionError: maximum recursion depth exceeded' - RecursionError: maximum recursion depth exceeded in comparison ? -------------- + RecursionError: maximum recursion depth exceeded ====================================================================== FAIL: test_bug_xmltoolkit63 (test.test_xml_etree.BugsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/jelle/cpython-dev/cpython-1/Lib/test/test_xml_etree.py", line 1538, in test_bug_xmltoolkit63 self.assertEqual(sys.getrefcount(None), count) AssertionError: 505087 != 505084 Fixing this will improve the coverage check on PRs. ---------- components: Tests messages: 288786 nosy: Jelle Zijlstra, eli.bendersky, ezio.melotti, michael.foord, scoder priority: normal severity: normal status: open title: Some tests fail in coverage Travis check versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 04:06:25 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 02 Mar 2017 09:06:25 +0000 Subject: [issue27298] redundant iteration over digits in _PyLong_AsUnsignedLongMask In-Reply-To: <1465680013.34.0.390511904077.issue27298@psf.upfronthosting.co.za> Message-ID: <1488445585.34.0.664176421514.issue27298@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +323 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 04:13:22 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 02 Mar 2017 09:13:22 +0000 Subject: [issue27298] redundant iteration over digits in _PyLong_AsUnsignedLongMask In-Reply-To: <1465680013.34.0.390511904077.issue27298@psf.upfronthosting.co.za> Message-ID: <1488446002.83.0.582668152763.issue27298@psf.upfronthosting.co.za> Oren Milman added the comment: I created a pull request (https://github.com/python/cpython/pull/392) to fix the mistakes in _testcapimodule, but didn't mention this issue in the pull request's title, as the issue mentioned these mistakes only as a side note. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 04:58:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 09:58:55 +0000 Subject: [issue28272] a redundant check in maybe_small_long In-Reply-To: <1474807129.82.0.382884780028.issue28272@psf.upfronthosting.co.za> Message-ID: <1488448735.05.0.652052901055.issue28272@psf.upfronthosting.co.za> STINNER Victor added the comment: issue28272_ver1.diff LGTM. Mark Dickinson: "The extra check in maybe_small_long does have a value in (...) safety with respect to future maintenance," "assert(v != NULL);" has the same purpose. I think that it's ok to require that maybe_small_long() isn't call with NULL. The function is called 5 times and is never called with NULL. Note: long_normalize() cannot fail, it modifies the object in-place and returns the input object. Mark Dickinson: "I'm a bit reluctant to make changes like this unless there's a measurable performance benefit." I'm unable to see any impact on performance. Following microbenchmark is not significant: --- haypo at smithers$ ./python -m perf timeit -s 'x=1' 'x<<1>>1<<1>>1<<1>>1<<1>>1<<1>>1<<1>>1<<1>>1<<1>>1' --duplicate=100 --compare-to ../master-ref/python --python-names=ref:patch ref: ..................... 531 ns +- 10 ns patch: ..................... 531 ns +- 2 ns Median +- std dev: [ref] 531 ns +- 10 ns -> [patch] 531 ns +- 2 ns: 1.00x faster (-0%) --- Note: python.exe -m perf timeit "122 >> 2" doesn't test long_rshirt() since "122 >> 2" is computed by the Python compiler, not at runtime ;-) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 05:00:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 10:00:35 +0000 Subject: [issue28272] a redundant check in maybe_small_long In-Reply-To: <1474807129.82.0.382884780028.issue28272@psf.upfronthosting.co.za> Message-ID: <1488448835.64.0.405860593258.issue28272@psf.upfronthosting.co.za> STINNER Victor added the comment: > Try to bench list(range(256)). It should create small ints in tight loop. This expression doesn't call maybe_small_long(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 05:02:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 10:02:55 +0000 Subject: [issue27298] redundant iteration over digits in _PyLong_AsUnsignedLongMask In-Reply-To: <1465680013.34.0.390511904077.issue27298@psf.upfronthosting.co.za> Message-ID: <1488448975.06.0.562715341333.issue27298@psf.upfronthosting.co.za> STINNER Victor added the comment: > To sum it up, my patch degrades performance for ints smaller than (approximately) 10 ** 150, and improves performance for bigger ints. IMHO Python language mostly handles integers smaller than 1 million, so the optimization is not a good idea :-) I had the same issue when I tried to modify Python to use GMP internally for long integers. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 05:05:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 10:05:11 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1488449111.77.0.323175295288.issue28261@psf.upfronthosting.co.za> STINNER Victor added the comment: I dislike passing a error message in the function name. I suggest to instead raise a new exception with a better error message and chain it with the previous exception. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 05:11:35 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 02 Mar 2017 10:11:35 +0000 Subject: [issue29692] contextlib.contextmanager may incorrectly unchain RuntimeError Message-ID: <1488449495.24.0.0941910154043.issue29692@psf.upfronthosting.co.za> New submission from Nick Coghlan: As part of PEP 479, an extra check was added to contextlib._GeneratorContextManager to avoid getting confused when a StopIteration exception was raised in the body of the with statement, and hence thrown into the generator body implementing the context manager. This extra check should only be used when the passed in exception is `StopIteration`, but that guard is currently missing, so it may unchain arbitrary RuntimeError exceptions if they set their `__cause__` to the originally passed in value. Compare the current contextmanager behaviour: ``` >>> from contextlib import contextmanager >>> @contextmanager ... def chain_thrown_exc(): ... try: ... yield ... except Exception as exc: ... raise RuntimeError("Chained!") from exc ... >>> with chain_thrown_exc(): ... 1/0 ... Traceback (most recent call last): File "", line 2, in ZeroDivisionError: division by zero ``` To the expected inline behaviour: ``` >>> try: ... 1/0 ... except Exception as exc: ... raise RuntimeError("Chained!") from exc ... Traceback (most recent call last): File "", line 2, in ZeroDivisionError: division by zero The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 4, in RuntimeError: Chained! ``` ---------- keywords: 3.5regression messages: 288793 nosy: ncoghlan priority: normal severity: normal stage: test needed status: open title: contextlib.contextmanager may incorrectly unchain RuntimeError type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 05:12:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 10:12:41 +0000 Subject: [issue29176] /tmp does not exist on Android and is used by curses.window.putwin() In-Reply-To: <1483699620.77.0.827616599041.issue29176@psf.upfronthosting.co.za> Message-ID: <1488449561.05.0.319598692055.issue29176@psf.upfronthosting.co.za> STINNER Victor added the comment: Xavier de Gaye, Chi Hsuan Yen: I just merged Christian Heimes's PR. So the function should now work on Android. Can you double check that it works? Is it worth it to backport the change to Python 3.6? Do you plan to try to have a full Android support in Python 3.6? Or do you target Python 3.7? I don't think that the backport is worth it, but the patch is simple enough, so it's not a big deal if it makes your life simpler :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 05:14:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 10:14:50 +0000 Subject: [issue29176] /tmp does not exist on Android and is used by curses.window.putwin() In-Reply-To: <1483699620.77.0.827616599041.issue29176@psf.upfronthosting.co.za> Message-ID: <1488449690.09.0.289108639368.issue29176@psf.upfronthosting.co.za> STINNER Victor added the comment: me: "I change the issue type to security" I'm not sure anymore that the change is really related to security. I don't think that replacing mkstemp("/tmp/py.curses.putwin.XXXXXX") with tmpfile() has an impact on security. So I don't think that it's worth it to backport to change to Python 2.7 and 3.3-3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 05:17:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 10:17:18 +0000 Subject: [issue29666] Issue in enum documentation In-Reply-To: <1488203311.1.0.764284916797.issue29666@psf.upfronthosting.co.za> Message-ID: <1488449838.98.0.48503455307.issue29666@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 06:42:07 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 02 Mar 2017 11:42:07 +0000 Subject: [issue27298] redundant iteration over digits in _PyLong_AsUnsignedLongMask In-Reply-To: <1465680013.34.0.390511904077.issue27298@psf.upfronthosting.co.za> Message-ID: <1488454927.87.0.605358747661.issue27298@psf.upfronthosting.co.za> Oren Milman added the comment: the pull request was merged, so I guess we can close this issue.. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 06:47:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 11:47:37 +0000 Subject: [issue29666] Issue in enum documentation In-Reply-To: <1488203311.1.0.764284916797.issue29666@psf.upfronthosting.co.za> Message-ID: <1488455257.65.0.624381695103.issue29666@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +325 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 06:48:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 11:48:04 +0000 Subject: [issue29666] Issue in enum documentation In-Reply-To: <1488203311.1.0.764284916797.issue29666@psf.upfronthosting.co.za> Message-ID: <1488455284.42.0.0242959347676.issue29666@psf.upfronthosting.co.za> STINNER Victor added the comment: Doc has been fixed in Python 3.6 and 3.7. Thanks! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 06:53:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 11:53:27 +0000 Subject: [issue27298] redundant iteration over digits in _PyLong_AsUnsignedLongMask In-Reply-To: <1465680013.34.0.390511904077.issue27298@psf.upfronthosting.co.za> Message-ID: <1488455607.36.0.744327077144.issue27298@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, thanks. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 08:31:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Mar 2017 13:31:49 +0000 Subject: [issue29693] DeprecationWarning/SyntaxError in test_import Message-ID: <1488461509.07.0.849251480688.issue29693@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $ ./python -Wa -m test.regrtest test_import Run tests sequentially 0:00:00 [1/1] test_import /home/serhiy/py/cpython/Lib/test/test_import/__init__.py:88: DeprecationWarning: invalid escape sequence \( self.assertRegex(str(cm.exception), "cannot import name 'i_dont_exist' from 'os' \(.*os.py\)") /home/serhiy/py/cpython/Lib/test/test_import/__init__.py:96: DeprecationWarning: invalid escape sequence \( self.assertRegex(str(cm.exception), "cannot import name 'i_dont_exist' from 'select' \(.*\.(so|pyd)\)") 1 test OK. Total duration: 2 sec Tests result: SUCCESS $ ./python -We -m test.regrtest test_import Run tests sequentially 0:00:00 [1/1] test_import test test_import crashed -- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/libregrtest/runtest.py", line 152, in runtest_inner the_module = importlib.import_module(abstest) File "/home/serhiy/py/cpython/Lib/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 978, in _gcd_import File "", line 961, in _find_and_load File "", line 950, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 675, in exec_module File "", line 782, in get_code File "", line 742, in source_to_code File "", line 205, in _call_with_frames_removed File "/home/serhiy/py/cpython/Lib/test/test_import/__init__.py", line 88 self.assertRegex(str(cm.exception), "cannot import name 'i_dont_exist' from 'os' \(.*os.py\)") ^ SyntaxError: invalid escape sequence \( test_import failed 1 test failed: test_import Total duration: 244 ms Tests result: FAILURE ---------- components: Tests messages: 288799 nosy: benjamin.peterson, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: DeprecationWarning/SyntaxError in test_import type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 08:36:00 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 02 Mar 2017 13:36:00 +0000 Subject: [issue29690] no %z directive for strptime in python2, doc says nothing about it In-Reply-To: <1488439889.25.0.877178323072.issue29690@psf.upfronthosting.co.za> Message-ID: <1488461760.1.0.586939824014.issue29690@psf.upfronthosting.co.za> R. David Murray added the comment: This almost qualifies as a FAQ :) In 2.7 (and in 3.x, though we've added some additional platform independent stuff there), strptime supports what the platform supports, and this is documented: "The following is a list of all the format codes that the C standard (1989 version) requires, and these work on all platforms with a standard C implementation. Note that the 1999 version of the C standard added additional format codes." Windows, for one, is not a standard C implementation in that sense. Note that the python3 documentation is a bit clearer about this than the 2.7 docs. If you want to open a PR to backport the doc improvements, feel free to reopen this issue. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 08:53:33 2017 From: report at bugs.python.org (whitespacer) Date: Thu, 02 Mar 2017 13:53:33 +0000 Subject: [issue29694] race condition in pathlib mkdir with flags parents=True Message-ID: <1488462813.87.0.464471853988.issue29694@psf.upfronthosting.co.za> New submission from whitespacer: When pathlib mkdir is called with parents=True and some parent doesn't exists it recursively calls self.parent.mkdir(parents=True) after catching OSError. However after catching of OSError and before call to self.parent.mkdir(parents=True) somebody else can create parent dir, which will lead to FileExistsError exception. ---------- messages: 288801 nosy: whitespacer priority: normal severity: normal status: open title: race condition in pathlib mkdir with flags parents=True type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 09:54:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Mar 2017 14:54:04 +0000 Subject: [issue29695] Weird keyword parameter names in builtins Message-ID: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patches deprecate the "x" keyword parameter in int(), bool() and float() and the "sequence" keyword parameter in list() and tuple(). Name "x" is meaningless, and name "sequence" is misleading (any iterable is accepted, not just sequence). The documentation uses name "iterable" for list() and tuple(). It is never documented that any of these parameters are accepted by keywords. There was only a test for int(), but it was added just for increasing coverity, not to test intended behavior. Does this mean that the support of keyword arguments can be removed without deprecation? The general idea got preliminary approval from Guido (https://mail.python.org/pipermail/python-ideas/2017-March/044959.html). ---------- components: Interpreter Core files: deprecate-keyword-x.patch keywords: patch messages: 288802 nosy: gvanrossum, haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Weird keyword parameter names in builtins type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file46684/deprecate-keyword-x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 09:54:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Mar 2017 14:54:18 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488466458.01.0.623481953822.issue29695@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file46685/deprecate-keyword-sequence.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 09:59:22 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 02 Mar 2017 14:59:22 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488466762.53.0.124731620885.issue29695@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think we should do it without deprecation, since it could break working code. But it certainly sounds like a marginal case: I doubt there is *much* code that uses the existing keyword names. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 10:09:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 15:09:58 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466762.53.0.124731620885.issue29695@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: R. David Murray added the comment: > I don't think we should do it without deprecation, since it could break working code. But it certainly sounds like a marginal case: I doubt there is *much* code that uses the existing keyword names. I'm not sure that it's worth it to add a deprecation warning in Python 3.7. It's trivial to fix code passing an argument by keyword rather than by position. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 10:12:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Mar 2017 15:12:40 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488467560.66.0.804171371287.issue29695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Well, I was feeling the same, but asked just for the case. Could you then look at deprecation messages? I'm sure that 'The "x" keyword argument of int() is deprecated' is not the best wording, and may be even ugly wording. Could you please suggest better wording David? Patches don't document new deprecations because it is not documented that keyword arguments are supported either. Is mentioning in What's New enough? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 10:22:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 15:22:25 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488467560.66.0.804171371287.issue29695@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: "What's New in Python 3.7" has a section for such changes: "Porting to Python 3.7: Changes to the Python API". https://docs.python.org/dev/whatsnew/3.7.html#porting-to-python-3-7 Oh, I see that you already made a similar change but this one had a deprecation period of 2 releases (3.5 and 3.6): "A format string argument for string.Formatter.format() is now positional-only." See also the positional-only arguments discussion on python-ideas: * https://mail.python.org/pipermail/python-ideas/2017-February/044879.html * https://mail.python.org/pipermail/python-ideas/2017-March/044956.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 10:34:03 2017 From: report at bugs.python.org (Facundo Batista) Date: Thu, 02 Mar 2017 15:34:03 +0000 Subject: [issue29696] Use namedtuple in Formatter.parse iterator response Message-ID: <1488468843.51.0.704010418399.issue29696@psf.upfronthosting.co.za> New submission from Facundo Batista: Right now: >>> Formatter().parse("mira como bebebn los peces en el {rio} {de} {la} plata") >>> next(_) ('mira como bebebn los peces en el ', 'rio', '', None) This returned tuple should be a namedtuple, so it's self-explained for people exploring this (and usage of the fields become clearer) ---------- components: Library (Lib) messages: 288807 nosy: facundobatista priority: normal severity: normal status: open title: Use namedtuple in Formatter.parse iterator response type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 10:37:54 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 02 Mar 2017 15:37:54 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488469074.81.0.291091639619.issue29695@psf.upfronthosting.co.za> R. David Murray added the comment: So these will become positional only? In that case I'd say "Using 'x' as a keyword argument is deprecated; specify the value as a positional argument instead" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 10:42:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Mar 2017 15:42:41 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488469361.69.0.798009276224.issue29695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue20283. Obviously wrong keyword parameter names in regex methods were deprecated in 2.7, 3.3 and 3.4 and removed in 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 10:52:33 2017 From: report at bugs.python.org (Andrew Nester) Date: Thu, 02 Mar 2017 15:52:33 +0000 Subject: [issue29678] email.Message.get_params decodes only first one header value In-Reply-To: <1488306748.36.0.996484861833.issue29678@psf.upfronthosting.co.za> Message-ID: <1488469953.91.0.676686727576.issue29678@psf.upfronthosting.co.za> Changes by Andrew Nester : ---------- pull_requests: +326 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 10:53:54 2017 From: report at bugs.python.org (Andrew Nester) Date: Thu, 02 Mar 2017 15:53:54 +0000 Subject: [issue29678] email.Message.get_params decodes only first one header value In-Reply-To: <1488306748.36.0.996484861833.issue29678@psf.upfronthosting.co.za> Message-ID: <1488470034.54.0.251726035823.issue29678@psf.upfronthosting.co.za> Andrew Nester added the comment: Thanks for reporting! Just added PR fixing this. ---------- nosy: +andrewnester _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 11:05:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Mar 2017 16:05:13 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488470713.92.0.789388172748.issue29695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you David! Updated warning messages for your suggestion and added entries in Misc/NEWS and What's New. ---------- Added file: http://bugs.python.org/file46686/deprecate-bad-keywords.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 11:18:22 2017 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Mar 2017 16:18:22 +0000 Subject: [issue29697] Wrong ECDH configuration with OpenSSL 1.1 Message-ID: <1488471502.97.0.24501918149.issue29697@psf.upfronthosting.co.za> New submission from Christian Heimes: I think I made a mistake during the port to OpenSSL 1.1.x. defined(OPENSSL_VERSION_1_1) is on the wrong ifndef block. ------------------------------------------------------------------ Old code #ifndef OPENSSL_NO_ECDH /* Allow automatic ECDH curve selection (on OpenSSL 1.0.2+), or use prime256v1 by default. This is Apache mod_ssl's initialization policy, so we should be safe. */ #if defined(SSL_CTX_set_ecdh_auto) SSL_CTX_set_ecdh_auto(self->ctx, 1); #else { EC_KEY *key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); SSL_CTX_set_tmp_ecdh(self->ctx, key); EC_KEY_free(key); } #endif #endif ------------------------------------------------------------------ New code with OpenSSL 1.1.x compatibility #ifndef OPENSSL_NO_ECDH /* Allow automatic ECDH curve selection (on OpenSSL 1.0.2+), or use prime256v1 by default. This is Apache mod_ssl's initialization policy, so we should be safe. OpenSSL 1.1 has it enabled by default. */ #if defined(SSL_CTX_set_ecdh_auto) && !defined(OPENSSL_VERSION_1_1) SSL_CTX_set_ecdh_auto(self->ctx, 1); #else { EC_KEY *key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1); SSL_CTX_set_tmp_ecdh(self->ctx, key); EC_KEY_free(key); } #endif #endif ---------- assignee: christian.heimes components: SSL keywords: 3.6regression messages: 288812 nosy: christian.heimes priority: normal severity: normal status: open title: Wrong ECDH configuration with OpenSSL 1.1 type: behavior versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 11:26:00 2017 From: report at bugs.python.org (Donald Stufft) Date: Thu, 02 Mar 2017 16:26:00 +0000 Subject: [issue29697] Wrong ECDH configuration with OpenSSL 1.1 In-Reply-To: <1488471502.97.0.24501918149.issue29697@psf.upfronthosting.co.za> Message-ID: <1488471960.57.0.626984871623.issue29697@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +327 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 11:26:37 2017 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Mar 2017 16:26:37 +0000 Subject: [issue29697] Wrong ECDH configuration with OpenSSL 1.1 In-Reply-To: <1488471502.97.0.24501918149.issue29697@psf.upfronthosting.co.za> Message-ID: <1488471997.3.0.538208923582.issue29697@psf.upfronthosting.co.za> Christian Heimes added the comment: The bug report was too much of a "memo to me" brain dump. Let me clarify. For OpenSSL 1.0.2 we can call SSL_CTX_set_ecdh_auto() to enable ECDH curves. For OpenSSL < 1.0.2 it was necessary to configure a curve with SSL_CTX_set_tmp_ecdh(). OpenSSL >= 1.1.0 does neither need ecdh_auto nor tmp_ecdh. #if !defined(OPENSSL_NO_ECDH) && !defined(OPENSSL_VERSION_1_1) ... #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 11:39:04 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 02 Mar 2017 16:39:04 +0000 Subject: [issue29678] email.Message.get_params decodes only first one header value In-Reply-To: <1488306748.36.0.996484861833.issue29678@psf.upfronthosting.co.za> Message-ID: <1488472744.21.0.493515447412.issue29678@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the response, but I do not believe that this is a bug. The python3 email package will decode the headers automatically if you use the new policies, so if you iterate through the headers, you'll get the decoded versions, with access to the parms dict for each. (For custom headers you will have to register the appropriate header parser, but it should automatically handle all the standard mime headers.) For the compat32 policy (which is the default), there is indeed no easy way to do the same, but that isn't a bug, because any header that contains parameters (MIME headers) is supposed to be unique. As for the stackoverflow question, see above for the RFC 2231 issue (the headers are unique). For doing RFC 2047, decode_header does that. With the compat32 policy it is awkward, but documented, how to apply the functions in the header submodule to decode an arbitrary string. For the new policies you don't have to think about it; as I said above the decoding is done automatically (all unknown headers are treated as unstructured and rfc2047 decoding is done automatically). ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 11:45:58 2017 From: report at bugs.python.org (Donald Stufft) Date: Thu, 02 Mar 2017 16:45:58 +0000 Subject: [issue29697] Wrong ECDH configuration with OpenSSL 1.1 In-Reply-To: <1488471502.97.0.24501918149.issue29697@psf.upfronthosting.co.za> Message-ID: <1488473158.4.0.621785692035.issue29697@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +328 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 11:46:33 2017 From: report at bugs.python.org (Nikita Kniazev) Date: Thu, 02 Mar 2017 16:46:33 +0000 Subject: [issue29698] _collectionsmodule.c: Replace `n++; while (--n)` with `for (; n; --n)` Message-ID: <1488473193.67.0.278300394177.issue29698@psf.upfronthosting.co.za> New submission from Nikita Kniazev: I have failed to find previous discussion when `while (n--)` was changed to `n++; while (--n)`. (commits 306d6b1ea6bf2582b9284be2fd27275abbade3e1, 165eee214bc388eb588db33385ca49ddbb305565) It is clear for me that n++; while (--n) and for (; n; --n) are interchangable statements, but here is the prof of it http://coliru.stacked-crooked.com/a/a6fc4108b223e7b2. According to asm out https://godbolt.org/g/heHM33 the `for` loop is even shorter (takes less instructions). While I believe that location of `cmp`/`jmp` instruction makes no sense and performance is the same, but I have made a benchmark. ``` Run on (4 X 3310 MHz CPU s) 02/27/17 22:10:55 Benchmark Time CPU Iterations ------------------------------------------------------------ BM_while_loop/2 13 ns 13 ns 56089384 BM_while_loop/4 17 ns 16 ns 40792279 BM_while_loop/8 24 ns 24 ns 29914338 BM_while_loop/16 40 ns 40 ns 20396140 BM_while_loop/32 84 ns 80 ns 8974301 BM_while_loop/64 146 ns 146 ns 4487151 BM_while_loop/128 270 ns 269 ns 2492862 BM_while_loop/128 267 ns 266 ns 2639500 BM_while_loop/512 1022 ns 1022 ns 641022 BM_while_loop/4096 8203 ns 8344 ns 89743 BM_while_loop/32768 66971 ns 66750 ns 11218 BM_while_loop/262144 545833 ns 546003 ns 1000 BM_while_loop/2097152 4376095 ns 4387528 ns 160 BM_while_loop/8388608 17654654 ns 17883041 ns 41 BM_for_loop/2 13 ns 13 ns 56089384 BM_for_loop/4 15 ns 15 ns 49857230 BM_for_loop/8 21 ns 21 ns 32051077 BM_for_loop/16 37 ns 37 ns 19509351 BM_for_loop/32 81 ns 80 ns 8974301 BM_for_loop/64 144 ns 128 ns 4985723 BM_for_loop/128 265 ns 263 ns 3205108 BM_for_loop/128 265 ns 266 ns 2639500 BM_for_loop/512 1036 ns 1022 ns 641022 BM_for_loop/4096 8314 ns 8344 ns 89743 BM_for_loop/32768 67345 ns 66750 ns 11218 BM_for_loop/262144 541310 ns 546004 ns 1000 BM_for_loop/2097152 4354986 ns 4387528 ns 160 BM_for_loop/8388608 17592428 ns 17122061 ns 41 ``` ```cpp #include #define MAKE_ROTL_BENCHMARK(name) \ static void BM_##name(benchmark::State& state) { \ while (state.KeepRunning()) { \ int n = name(state.range(0)); \ } \ } \ /**/ int while_loop(int n) { int sum = 0; n++; while (--n) { sum += 1; } return sum; } int for_loop(int n) { int sum = 0; for(; n; --n) { sum += 1; } return sum; } MAKE_ROTL_BENCHMARK(while_loop) MAKE_ROTL_BENCHMARK(for_loop) BENCHMARK(BM_while_loop)->RangeMultiplier(2)->Range(2, 8<<4); BENCHMARK(BM_while_loop)->Range(8<<4, 8<<20); BENCHMARK(BM_for_loop)->RangeMultiplier(2)->Range(2, 8<<4); BENCHMARK(BM_for_loop)->Range(8<<4, 8<<20); BENCHMARK_MAIN() ``` ---------- components: Interpreter Core messages: 288815 nosy: Kojoley priority: normal pull_requests: 329 severity: normal status: open title: _collectionsmodule.c: Replace `n++; while (--n)` with `for (; n; --n)` type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 11:46:55 2017 From: report at bugs.python.org (Donald Stufft) Date: Thu, 02 Mar 2017 16:46:55 +0000 Subject: [issue29697] Wrong ECDH configuration with OpenSSL 1.1 In-Reply-To: <1488471502.97.0.24501918149.issue29697@psf.upfronthosting.co.za> Message-ID: <1488473215.85.0.796941478632.issue29697@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +330 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 11:51:29 2017 From: report at bugs.python.org (Donald Stufft) Date: Thu, 02 Mar 2017 16:51:29 +0000 Subject: [issue29697] Wrong ECDH configuration with OpenSSL 1.1 In-Reply-To: <1488471502.97.0.24501918149.issue29697@psf.upfronthosting.co.za> Message-ID: <1488473489.78.0.0902641603655.issue29697@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +331 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 12:00:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Mar 2017 17:00:12 +0000 Subject: [issue29698] _collectionsmodule.c: Replace `n++; while (--n)` with `for (; n; --n)` In-Reply-To: <1488473193.67.0.278300394177.issue29698@psf.upfronthosting.co.za> Message-ID: <1488474012.65.0.456503181643.issue29698@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> rhettinger components: +Extension Modules -Interpreter Core nosy: +rhettinger, serhiy.storchaka stage: -> patch review versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 12:12:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 17:12:08 +0000 Subject: [issue29698] _collectionsmodule.c: Replace `n++; while (--n)` with `for (; n; --n)` In-Reply-To: <1488473193.67.0.278300394177.issue29698@psf.upfronthosting.co.za> Message-ID: <1488474728.28.0.500492347503.issue29698@psf.upfronthosting.co.za> STINNER Victor added the comment: The purpose of the issue is unclear to me. Why do you want to replace while with for? For readability? I agree that "n++; while (--n) ..." is surprising. It seems strange to start with a "n++" to decrement it in the next instruction :-) It's also unusual to write loops like that. > I have failed to find previous discussion when `while (n--)` was changed to `n++; while (--n)`. You should ask Raymond Hettinger for the rationale. The commit message says "better generated code (on both GCC and CLang)", but there is no benchmark nor any data to validate this. > I have made a benchmark. Nowadays, C compilers are very smart and implement crazy optimizations. Python releases are compiled using PGO, or even PGO+LTO. Please compile your benchmark using PGO. I expect that compilers emit the same machine code at the end for "while" and "for" loops. The question is also if your benchmark is revelant for the _collections module. What should I see in your benchmark? I see that results are the same for while and for_loop except a minor noise in the benchmark. -- I also dislike spending time on such minor micro-optimization... ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 12:15:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 17:15:26 +0000 Subject: [issue29698] _collectionsmodule.c: Replace `n++; while (--n)` with `for (; n; --n)` In-Reply-To: <1488473193.67.0.278300394177.issue29698@psf.upfronthosting.co.za> Message-ID: <1488474926.28.0.26957831916.issue29698@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, a little bit more context: Raymond Hettinger is the maintainer of _collectionsmodule.c and spent a lot of time to optimize this file! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 12:28:17 2017 From: report at bugs.python.org (Nikita Kniazev) Date: Thu, 02 Mar 2017 17:28:17 +0000 Subject: [issue29698] _collectionsmodule.c: Replace `n++; while (--n)` with `for (; n; --n)` In-Reply-To: <1488473193.67.0.278300394177.issue29698@psf.upfronthosting.co.za> Message-ID: <1488475697.8.0.935554655235.issue29698@psf.upfronthosting.co.za> Nikita Kniazev added the comment: > The purpose of the issue is unclear to me. I was asked to open an issue by Serhiy Storchaka on the GitHub PR. > Why do you want to replace while with for? For readability? Yes, I have open a PR just to improve the readability, because I was surprised by this incrementing-decrementing statements like you. > You should ask Raymond Hettinger for the rationale. The commit message says "better generated code (on both GCC and CLang)", but there is no benchmark nor any data to validate this. The purpose is clear to me - to eliminate postincrement and temporary variable that it requires. > Nowadays, C compilers are very smart and implement crazy optimizations. Python releases are compiled using PGO, or even PGO+LTO. Please compile your benchmark using PGO. I expect that compilers emit the same machine code at the end for "while" and "for" loops. > The question is also if your benchmark is revelant for the _collections module. > What should I see in your benchmark? I see that results are the same for while and for_loop except a minor noise in the benchmark. Benchmark was made to show that location of cmp+jmp location (look at asm output for more info) makes no sense to performance. Actually I do not want to spend more time on a such minor change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 12:31:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 02 Mar 2017 17:31:53 +0000 Subject: [issue29698] _collectionsmodule.c: Replace `n++; while (--n)` with `for (; n; --n)` In-Reply-To: <1488475697.8.0.935554655235.issue29698@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Yes, I have open a PR just to improve the readability, because I was surprised by this incrementing-decrementing statements like you. Honestly, I don't really care of the exact syntax of C loops in _collectionmodule.c. But if your patch is rejected (right now, I'm neutral), it would be nice to add a comment with a reference to this issue on the loops to avoid other questions in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 13:18:58 2017 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 02 Mar 2017 18:18:58 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488478738.12.0.987467461201.issue29695@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 13:29:11 2017 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 02 Mar 2017 18:29:11 +0000 Subject: [issue29696] Use namedtuple in string.Formatter.parse iterator response In-Reply-To: <1488468843.51.0.704010418399.issue29696@psf.upfronthosting.co.za> Message-ID: <1488479351.81.0.0946193076451.issue29696@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith title: Use namedtuple in Formatter.parse iterator response -> Use namedtuple in string.Formatter.parse iterator response _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 13:43:31 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Mar 2017 18:43:31 +0000 Subject: [issue29693] DeprecationWarning/SyntaxError in test_import In-Reply-To: <1488461509.07.0.849251480688.issue29693@psf.upfronthosting.co.za> Message-ID: <1488480211.12.0.832161690139.issue29693@psf.upfronthosting.co.za> Brett Cannon added the comment: Looks like the 'r' prefix is missing on the regex string. Marking this as "easy" if someone wants to try and solve this. And FYI I double-checked that this is only in 3.7. ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 13:56:01 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Mar 2017 18:56:01 +0000 Subject: [issue29688] Document Path.absolute In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1488480961.38.0.286891690182.issue29688@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: docs at python -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 13:57:10 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Mar 2017 18:57:10 +0000 Subject: [issue29682] Possible missing NULL check in pyexpat In-Reply-To: <1488347676.64.0.259401612021.issue29682@psf.upfronthosting.co.za> Message-ID: <1488481030.33.0.360421822573.issue29682@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: Checks for null return value -> Possible missing NULL check in pyexpat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 13:57:18 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 02 Mar 2017 18:57:18 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1488481038.53.0.203911208055.issue22005@psf.upfronthosting.co.za> Gregory P. Smith added the comment: TL;DR - Just one more example of why nobody should *ever* use pickle under any circumstances. It is useless for data that is not transient for consumption by the same exact versions of all software that created it. Patches against 2.7 are not useful here. Either we write a unpickle deserializer for python 2 datetime pickles that works for all existing previous datatime pickled data formats from Python 3. Or we close this as rejected because the data formats are rightly incompatible as the in-process object states are incompatible between the two versions. If you want to serialize something, use a language agnostic data format - ideally one with a defined schema. Never pickle. Advice for those who have stored such data in Python 2 pickles: Write a Python 2 program to read your data and rewrite it in a portable data format that has nothing to do with pickle. Anything else is a gross hack. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 13:57:59 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 02 Mar 2017 18:57:59 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1488481079.7.0.772823978101.issue29677@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: 'round()' accepts a negative integer for ndigits -> clarify docs about 'round()' accepting a negative integer for ndigits _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 14:12:24 2017 From: report at bugs.python.org (Daniel Kahn Gillmor) Date: Thu, 02 Mar 2017 19:12:24 +0000 Subject: [issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition) Message-ID: <1488481944.03.0.0307704051627.issue29699@psf.upfronthosting.co.za> New submission from Daniel Kahn Gillmor: There is a race condition in shutil.rmtree, where if a file gets removed between when rmtree plans to remove it and when it gets around to removing it, a FileNotFound exception gets raised. The expected semantics of rmtree imply that if the filesystem tree is removed, then the command has succeeded, so it doesn't make sense for rmtree to raise a FileNotFound error if someone else happened to have deleted the file before rmtree gets to it. I'm attaching a C program (for GNU/Linux) which uses inotify to remove the other file in a directory when either file is removed. This triggers the rmtree failure. This behavior has caused a number of workarounds in external projects, like: https://bitbucket.org/vinay.sajip/python-gnupg/commits/492fd45ca073a90aac434320fb0c8fe8d01f782b https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commitdiff;h=de8494b16bc50c60a8438f2cae1f8c88e8949f7a It would be better for shutil.rmtree to ignore this particular exception (FileNotFoundError). Another option for users is to set ignore_errors=True, but this ends up ignoring *all* errors, which doesn't seem like the right decision. Finally, of course, a user could specify some sort of onerror function that explictly ignores FileNotFoundError, but this seems pretty complicated for the common pattern. It's possible that shutil.rmtree() wants to raise FileNotFoundError if the actual argument passed by the user does not itself exist, but it really doesn't make sense to raise that error for any of the elements further down in the tree. ---------- components: Library (Lib) files: breaker.c messages: 288822 nosy: dkg priority: normal severity: normal status: open title: shutil.rmtree should not fail with FileNotFoundError (race condition) type: crash versions: Python 3.5 Added file: http://bugs.python.org/file46687/breaker.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 14:13:29 2017 From: report at bugs.python.org (Daniel Kahn Gillmor) Date: Thu, 02 Mar 2017 19:13:29 +0000 Subject: [issue29699] shutil.rmtree should not fail with FileNotFoundError (race condition) In-Reply-To: <1488481944.03.0.0307704051627.issue29699@psf.upfronthosting.co.za> Message-ID: <1488482009.61.0.754714461968.issue29699@psf.upfronthosting.co.za> Daniel Kahn Gillmor added the comment: and here is python demonstration script that will build breaker.c and then use it to cause the error to be raised from shutils.rmtree. the output of demo.py looks like this: make: 'breaker' is up to date. Traceback (most recent call last): File "./demo.py", line 14, in shutil.rmtree('xx') File "/usr/lib/python3.5/shutil.py", line 480, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/usr/lib/python3.5/shutil.py", line 438, in _rmtree_safe_fd onerror(os.unlink, fullname, sys.exc_info()) File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd os.unlink(name, dir_fd=topfd) FileNotFoundError: [Errno 2] No such file or directory: 'b' ---------- Added file: http://bugs.python.org/file46688/demo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 14:39:40 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 02 Mar 2017 19:39:40 +0000 Subject: [issue22810] tkinter: "alloc: invalid block:" after askopenfilename In-Reply-To: <1415316246.92.0.943780326563.issue22810@psf.upfronthosting.co.za> Message-ID: <1488483580.16.0.319401300907.issue22810@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks Todd. I ran crash.py on Win10 64 bit, stock PSF 3.6.0 (no anaconda). Put cursor after 2 and hit '0'. Same error, different numbers. alloc: invalid block: 000002C8928640D0: 40 93 Followed by Windows' "Python has stopped working" box. Cursor after the '6' in second spinbox, hit 0, nothing happens. I could not get rid of 6 to type in something new. Not sure if this is normal or something about particular code. Cursor before the '2': '0's can be inserted, nothing else. After multiple insert and delete and arrow presses, got error when closing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 14:41:50 2017 From: report at bugs.python.org (Marco Buttu) Date: Thu, 02 Mar 2017 19:41:50 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1488483710.46.0.948191609185.issue27200@psf.upfronthosting.co.za> Changes by Marco Buttu : ---------- pull_requests: +332 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 14:48:15 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 02 Mar 2017 19:48:15 +0000 Subject: [issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select() Message-ID: <1488484095.89.0.988668664064.issue29700@psf.upfronthosting.co.za> New submission from Gregory P. Smith: The readline module causes memory corruption (sometimes a crash) when the sys.stdin file descriptor is out of bounds for its FD_SET() call within readline.c's readline_until_enter_or_signal() function. https://github.com/python/cpython/blob/master/Modules/readline.c#L1228 A tiny program reproducing this problem is attached. FD_SET should not be used if the file descriptor is too large for use in select() (ie: >= FD_SETSIZE). OTOH, we should probably just ditch select() entirely and use poll() here so that this issue does not exist. On Python 2.7-3.6 we probably need to preserve both select and poll options for platform compatibility reasons since those shipped that way. For Python 3.7 I suggest we stop supporting platforms that do not have poll() unless anyone knows of any that actually exist. ---------- components: Extension Modules files: crash_readline_fdset.py messages: 288825 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: readline memory corruption when sys.stdin fd >= FD_SETSIZE for select() type: crash versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file46689/crash_readline_fdset.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 14:55:20 2017 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Mar 2017 19:55:20 +0000 Subject: [issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select() In-Reply-To: <1488484095.89.0.988668664064.issue29700@psf.upfronthosting.co.za> Message-ID: <1488484520.79.0.651519274164.issue29700@psf.upfronthosting.co.za> Christian Heimes added the comment: Do you see a chance that the issue could be abused? IMO an attacker can't control FD number easily. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 14:56:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Mar 2017 19:56:07 +0000 Subject: [issue22810] tkinter: "alloc: invalid block:" after askopenfilename In-Reply-To: <1415316246.92.0.943780326563.issue22810@psf.upfronthosting.co.za> Message-ID: <1488484567.29.0.481706866922.issue22810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think issue27405 could help to make a pure Tcl reproducer. If the same error happen with Tcl version, this is not Python bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 15:12:12 2017 From: report at bugs.python.org (=?utf-8?q?Mathias_Fr=C3=B6jdman?=) Date: Thu, 02 Mar 2017 20:12:12 +0000 Subject: [issue29701] Add close method to queue.Queue Message-ID: <1488485532.45.0.976459019786.issue29701@psf.upfronthosting.co.za> New submission from Mathias Fr?jdman: queue.Queue should have a close() method. The result of calling the method would be to raise a new exception - queue.Closed, for any subsequent calls to Queue.put, and after the queue is empty, also for Queue.get. Why: To allow producers (callers of Queue.put) to signal there will be no more items, and consumers may stop asking for more by calling Queue.get. Currently the opposite (ie. waiting until all produced items/"tasks" have been consumed and handled) is possible with Queue.task_done() and Queue.join(). This functionality is useful in both application and library code. For example in AMQP, a server may push new messages over a TCP connection to a consumer, which translates into the library calling Queue.put for received messages, and the application using the library calling Queue.get to receive any new messages. The consumer may however be cancelled at any time, or the TCP connection closed and the Queue.get caller signaled that there will be no more messages. With Queue.close() that is easy - without it one needs to wrap the Queue.get calls). In an application context where a KeyboardInterrupt should lead to closing the application cleanly, being able to call Queue.close(), catching the Closed exception in any consumers (some of which may be in other threads) and exiting cleanly makes the job that much easier. A common pattern in working around this issue is to call Queue.put(None), and treat a None from Queue.get() as a signal to clean up. This works well when one knows there is at most one consumer. In the case of many consumers, one needs to wrap the Queue and for example add another None to the queue in consumers to not leave any remaining get() call waiting indefinitely. This pattern occurs even in the standard library: https://github.com/python/cpython/blob/7b90e3674be86479c51faf872d0b9367c9fc2f96/Lib/concurrent/futures/thread.py#L141 If accepting this proposal, a corresponding change should be made to asyncio.Queue. I have a tentative implementation (no tests or doc outside the module) in https://github.com/mwfrojdman/cpython/blob/closeable_queue/Lib/queue.py The Queue.close() method has an optional argument clear (default False), which clears the queue of items if set to true. This is useful for example when exiting an application, and one doesn't want consumers to get any more items before being raised a Closed exception. The changes are backwards compatible for users of the class, ie. if Queue.close() is not called, the behavior stays intact. Because of the clear argument, there is a new private method Queue._clear(), which does the actual clearing of the queue representation. Subclasses for which self.queue.clear() doesn't cut it, need to override it before .close(True) works. Background: https://github.com/python/asyncio/pull/415#issuecomment-263658986 ---------- components: Library (Lib) messages: 288828 nosy: mwf priority: normal severity: normal status: open title: Add close method to queue.Queue type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 15:24:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 02 Mar 2017 20:24:27 +0000 Subject: [issue29701] Add close method to queue.Queue In-Reply-To: <1488485532.45.0.976459019786.issue29701@psf.upfronthosting.co.za> Message-ID: <1488486267.28.0.176017774457.issue29701@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 15:28:54 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 02 Mar 2017 20:28:54 +0000 Subject: [issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select() In-Reply-To: <1488484520.79.0.651519274164.issue29700@psf.upfronthosting.co.za> Message-ID: Gregory P. Smith added the comment: It doesn't seem very abusable... Though of a server accepts enough remote connections and uses input() and swaps out stdin after remote uses up fds with connections... That's a lot of circumstances at once. Rare application. We ran into it with an interactive program controlling a bunch of things so it had lots of fds open when a tty stdin was swapped in for input. On Thu, Mar 2, 2017, 11:55 AM Christian Heimes wrote: > > Christian Heimes added the comment: > > Do you see a chance that the issue could be abused? IMO an attacker can't > control FD number easily. > > ---------- > nosy: +christian.heimes > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 15:32:51 2017 From: report at bugs.python.org (Todd Goldfinger) Date: Thu, 02 Mar 2017 20:32:51 +0000 Subject: [issue22810] tkinter: "alloc: invalid block:" after askopenfilename In-Reply-To: <1415316246.92.0.943780326563.issue22810@psf.upfronthosting.co.za> Message-ID: <1488486771.61.0.788478187192.issue22810@psf.upfronthosting.co.za> Todd Goldfinger added the comment: >> cursor after the '6' follows by '0' The max is 21. See 'to' parameter. I don't know if my code is correct, but it seems to work more or less. Obviously the crash is an issue with tk or Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 16:06:21 2017 From: report at bugs.python.org (Martin Panter) Date: Thu, 02 Mar 2017 21:06:21 +0000 Subject: [issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select() In-Reply-To: <1488484095.89.0.988668664064.issue29700@psf.upfronthosting.co.za> Message-ID: <1488488781.1.0.113812673949.issue29700@psf.upfronthosting.co.za> Martin Panter added the comment: Be careful, some OSes have limited support for ?poll?, ?kqueue?, etc with terminals, and I ended up using ?select? in the test suite: https://bugs.python.org/issue26870#msg265604 https://github.com/python/cpython/commit/79f561d126d09d6d7ea1457a2a6ef267d93e6448 ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 16:08:06 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 02 Mar 2017 21:08:06 +0000 Subject: [issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select() In-Reply-To: <1488488781.1.0.113812673949.issue29700@psf.upfronthosting.co.za> Message-ID: Gregory P. Smith added the comment: Bummer. I wish select could die. :) On Thu, Mar 2, 2017, 1:06 PM Martin Panter wrote: > > Martin Panter added the comment: > > Be careful, some OSes have limited support for ?poll?, ?kqueue?, etc with > terminals, and I ended up using ?select? in the test suite: > > https://bugs.python.org/issue26870#msg265604 > > https://github.com/python/cpython/commit/79f561d126d09d6d7ea1457a2a6ef267d93e6448 > > ---------- > nosy: +martin.panter > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 16:24:39 2017 From: report at bugs.python.org (Brian Coleman) Date: Thu, 02 Mar 2017 21:24:39 +0000 Subject: [issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc In-Reply-To: <1488358332.92.0.449242887398.issue29683@psf.upfronthosting.co.za> Message-ID: <1488489879.04.0.8676128812.issue29683@psf.upfronthosting.co.za> Changes by Brian Coleman : ---------- pull_requests: +333 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 16:40:15 2017 From: report at bugs.python.org (Brian Coleman) Date: Thu, 02 Mar 2017 21:40:15 +0000 Subject: [issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc In-Reply-To: <1488358332.92.0.449242887398.issue29683@psf.upfronthosting.co.za> Message-ID: <1488490815.27.0.69709271138.issue29683@psf.upfronthosting.co.za> Brian Coleman added the comment: I have created a pull request to backport the fix onto 3.6 here: https://github.com/python/cpython/pull/402 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 16:49:04 2017 From: report at bugs.python.org (Armen Levonian) Date: Thu, 02 Mar 2017 21:49:04 +0000 Subject: [issue29702] Error 0x80070003: Failed to launch elevated child process Message-ID: <1488491344.75.0.39896878007.issue29702@psf.upfronthosting.co.za> New submission from Armen Levonian: For some reason, after uninstalling Python 3.5.2 on my Windows 10 (64 bit - latest version), I am no longer able to install any new version of Python after version 3.4.3 I keep getting the failure to elevate privileges. I have of course tried to run the installer as Admin, or even launch a command prompt as admin or powershell as admin then run the installer with no luck. Disabling Windows Defender did not help. I have also lowered UAC all the way down, to no reporting, still no luck. The log file attached is for the 64 bit installer for 3.5.3 but I get identical results with the 32 bit installers for version 3.5.2 and 3.5.1. I can install latest Anaconda and also Python 3.4.3 without issues. I also had no problem installing 3.5.3 on another of my machines with same Windows 10 (64 bit) and that machine accepts the install without issues. Once again, I had version 3.5.2 running fine until I uninstalled it to upgrade. ---------- components: Installation, Windows files: Python 3.5.3 (64-bit)_20170302121038.log messages: 288834 nosy: alevonian, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Error 0x80070003: Failed to launch elevated child process type: behavior versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file46690/Python 3.5.3 (64-bit)_20170302121038.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 16:55:45 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 02 Mar 2017 21:55:45 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses Message-ID: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> New submission from Yury Selivanov: Proxy for https://github.com/python/asyncio/pull/497 Ned, this needs to be in 3.6.1, working code from 3.4 doesn't work in 3.6.0: http://stackoverflow.com/questions/42546099/python-asyncio-migrate-from-3-4-to-3-5/42566336#42566336 ---------- assignee: yselivanov keywords: 3.5regression, 3.6regression messages: 288835 nosy: larry, ned.deily, yselivanov priority: release blocker severity: normal stage: resolved status: open title: Fix asyncio to support instantiation of new event loops in subprocesses type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 16:55:50 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 02 Mar 2017 21:55:50 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1488491750.95.0.784904602526.issue29703@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 17:01:32 2017 From: report at bugs.python.org (Christian Heimes) Date: Thu, 02 Mar 2017 22:01:32 +0000 Subject: [issue28129] assertion failures in ctypes In-Reply-To: <1473779654.66.0.219445763591.issue28129@psf.upfronthosting.co.za> Message-ID: <1488492092.34.0.854043567886.issue28129@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- pull_requests: +335 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 17:05:56 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 02 Mar 2017 22:05:56 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1488492356.51.0.0877052647675.issue29703@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +336 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 17:06:30 2017 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 Mar 2017 22:06:30 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1488492390.2.0.615969837481.issue29703@psf.upfronthosting.co.za> Ned Deily added the comment: OK. I assume you will make PRs for python/cpython and cherry-pack to the 3.6 and 3.5 branches? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 17:07:20 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 02 Mar 2017 22:07:20 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1488492440.09.0.162456018415.issue29703@psf.upfronthosting.co.za> Yury Selivanov added the comment: > OK. I assume you will make PRs for python/cpython and cherry-pack to the 3.6 and 3.5 branches? Yes, working on it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 17:21:41 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Mar 2017 22:21:41 +0000 Subject: [issue29698] _collectionsmodule.c: Replace `n++; while (--n)` with `for (; n; --n)` In-Reply-To: <1488473193.67.0.278300394177.issue29698@psf.upfronthosting.co.za> Message-ID: <1488493301.26.0.294156011735.issue29698@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, but I'm going to keep the code as-is. To mine eyes (the maintainer), the while-loop better expresses my intention (a decrement-skip-on-zero step). On at least one compiler (GCC-6), it allows better code to generated (a sub-and-test instead of a sub-compare-and-test). ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed Added file: http://bugs.python.org/file46691/_collectionsmodule.s _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 17:22:21 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 02 Mar 2017 22:22:21 +0000 Subject: [issue29701] Add close method to queue.Queue In-Reply-To: <1488485532.45.0.976459019786.issue29701@psf.upfronthosting.co.za> Message-ID: <1488493341.4.0.55781833167.issue29701@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 17:24:23 2017 From: report at bugs.python.org (Seth Michael Larson) Date: Thu, 02 Mar 2017 22:24:23 +0000 Subject: [issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes Message-ID: <1488493463.16.0.114641402405.issue29704@psf.upfronthosting.co.za> New submission from Seth Michael Larson: Copied from https://github.com/python/asyncio/issues/484 """ >From https://bugs.python.org/issue23242#msg284930 The following script is used to reproduce the bug: import asyncio async def execute(): process = await asyncio.create_subprocess_exec( "timeout", "0.1", "cat", "/dev/urandom", stdout=asyncio.subprocess.PIPE) while True: data = await process.stdout.read(65536) print('read %d bytes' % len(data)) if data: await asyncio.sleep(0.3) else: break asyncio.get_event_loop().run_until_complete(execute()) will produce following output and terminate with exception: read 65536 bytes read 65536 bytes Traceback (most recent call last): File "read_subprocess.py", line 18, in asyncio.get_event_loop().run_until_complete(execute()) File "/usr/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete return future.result() File "read_subprocess.py", line 9, in execute data = await process.stdout.read(65536) File "/usr/lib/python3.6/asyncio/streams.py", line 634, in read self._maybe_resume_transport() File "/usr/lib/python3.6/asyncio/streams.py", line 402, in _maybe_resume_transport self._transport.resume_reading() File "/usr/lib/python3.6/asyncio/unix_events.py", line 401, in resume_reading self._loop._add_reader(self._fileno, self._read_ready) AttributeError: 'NoneType' object has no attribute '_add_reader' When the process exits https://github.com/python/asyncio/blob/master/asyncio/unix_events.py#L444 is called which sets this._loop = None Next time read() is called on the pipe the above exception is thrown. I have tried to fix this issue myself but would sometimes have read terminate too early and miss the last chunks of data. """ - BotoX ---------- messages: 288839 nosy: SethMichaelLarson, yselivanov priority: normal pull_requests: 337 severity: normal status: open title: Can't read data from Transport after asyncio.SubprocessStreamProtocol closes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 17:28:41 2017 From: report at bugs.python.org (Seth Michael Larson) Date: Thu, 02 Mar 2017 22:28:41 +0000 Subject: [issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes In-Reply-To: <1488493463.16.0.114641402405.issue29704@psf.upfronthosting.co.za> Message-ID: <1488493721.28.0.493408989704.issue29704@psf.upfronthosting.co.za> Changes by Seth Michael Larson : ---------- components: +asyncio nosy: +gvanrossum type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 17:30:03 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 02 Mar 2017 22:30:03 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1488493803.22.0.347643824505.issue29703@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- components: +asyncio nosy: +gvanrossum resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 17:33:08 2017 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 02 Mar 2017 22:33:08 +0000 Subject: [issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes In-Reply-To: <1488493463.16.0.114641402405.issue29704@psf.upfronthosting.co.za> Message-ID: <1488493988.54.0.215768291838.issue29704@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 17:33:38 2017 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 02 Mar 2017 22:33:38 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1488494018.72.0.444831829169.issue29703@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 17:35:14 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 02 Mar 2017 22:35:14 +0000 Subject: [issue29271] Task.current_task(None) returns unexpected result In-Reply-To: <1484345484.86.0.127501941011.issue29271@psf.upfronthosting.co.za> Message-ID: <1488494114.5.0.325165003968.issue29271@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +338 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 18:07:50 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 02 Mar 2017 23:07:50 +0000 Subject: [issue28893] Make sure exceptions raised in __aiter__ are properly chained in ceval In-Reply-To: <1481085693.53.0.293766364883.issue28893@psf.upfronthosting.co.za> Message-ID: <1488496070.62.0.82363650608.issue28893@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +339 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 18:31:56 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Thu, 02 Mar 2017 23:31:56 +0000 Subject: [issue29692] contextlib.contextmanager may incorrectly unchain RuntimeError In-Reply-To: <1488449495.24.0.0941910154043.issue29692@psf.upfronthosting.co.za> Message-ID: <1488497516.88.0.144418508092.issue29692@psf.upfronthosting.co.za> Changes by Jelle Zijlstra : ---------- nosy: +Jelle Zijlstra _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 18:36:55 2017 From: report at bugs.python.org (James Crowther) Date: Thu, 02 Mar 2017 23:36:55 +0000 Subject: [issue29705] socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12 Message-ID: <1488497815.81.0.0112571433534.issue29705@psf.upfronthosting.co.za> New submission from James Crowther: Currently I can't use socket to resolve host names to IP addresses. This is something critical to mine as well as other applications that run over networks. When I attempt to do the following: import socket socket.getaddrinfo(hostname, None) or socket.gethostbyname(hostname) I get socket.gaierror: [Errno 8] nodename nor servename provided, or not known. This works perfectly on both linux kubuntu 16.0. and windows 7,10. Seems that the introduction of Yosemite might be the point at which this broke by doing a simple google search for "macos socket.gethostbyname gaierror". ---------- components: Library (Lib) messages: 288840 nosy: James Crowther priority: normal severity: normal status: open title: socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12 type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 18:38:20 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 02 Mar 2017 23:38:20 +0000 Subject: [issue28963] Use-after-free in _asyncio_Future_remove_done_callback() of _asynciomodule.c In-Reply-To: <1481657201.46.0.37032067172.issue28963@psf.upfronthosting.co.za> Message-ID: <1488497900.91.0.685164751402.issue28963@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +340 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 18:48:45 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 02 Mar 2017 23:48:45 +0000 Subject: [issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers In-Reply-To: <1485909545.04.0.650924943503.issue29406@psf.upfronthosting.co.za> Message-ID: <1488498525.27.0.811398278585.issue29406@psf.upfronthosting.co.za> Yury Selivanov added the comment: Can you guys create a PR on github.com/python/cpython? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 19:27:52 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 03 Mar 2017 00:27:52 +0000 Subject: [issue29705] socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12 In-Reply-To: <1488497815.81.0.0112571433534.issue29705@psf.upfronthosting.co.za> Message-ID: <1488500872.15.0.507111775567.issue29705@psf.upfronthosting.co.za> Ned Deily added the comment: What value are you using for hostname? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 19:30:09 2017 From: report at bugs.python.org (James Crowther) Date: Fri, 03 Mar 2017 00:30:09 +0000 Subject: [issue29705] socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12 In-Reply-To: <1488500872.15.0.507111775567.issue29705@psf.upfronthosting.co.za> Message-ID: <0C4A02AA-B5E9-48D8-9AE7-97D0B8200A33@gmail.com> James Crowther added the comment: Hi Ned, Doesn?t seem to matter, I can try my local host name given by; socket.gethostname() or I can try another host on the network, same result. If I do the exact same operation using the same python version on windows or linux, then I get the expected result from gethostbyname which is the ip address of the host. Also on macOS 10.6.8 this still works, using the same version of python. Happy to give more details if you need. James > On 3 Mar 2017, at 11:27 am, Ned Deily wrote: > > > Ned Deily added the comment: > > What value are you using for hostname? > > ---------- > nosy: +ned.deily > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 19:41:13 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 03 Mar 2017 00:41:13 +0000 Subject: [issue29705] socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12 In-Reply-To: <1488497815.81.0.0112571433534.issue29705@psf.upfronthosting.co.za> Message-ID: <1488501673.57.0.239287963128.issue29705@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, I can't reproduce that behavior with my macOS 10.12, 10.11, or 10.10 systems if the hostname is a valid string including "localhost". If the string is empty or hostname is None, then I see Errno 8. $ /usr/local/bin/python3.6 Python 3.6.0 (v3.6.0:41df79263a11, Dec 22 2016, 17:23:13) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> hostname = 'python.org' >>> socket.getaddrinfo(hostname, None) [(, , 17, '', ('23.253.135.79', 0)), (, , 6, '', ('23.253.135.79', 0)), (, , 17, '', ('2001:4802:7901::e60a:1375:0:6', 0, 0, 0)), (, , 6, '', ('2001:4802:7901::e60a:1375:0:6', 0, 0, 0))] >>> hostname = "localhost" >>> socket.getaddrinfo(hostname, None) [(, , 17, '', ('::1', 0, 0, 0)), (, , 6, '', ('::1', 0, 0, 0)), (, , 17, '', ('127.0.0.1', 0)), (, , 6, '', ('127.0.0.1', 0))] >>> hostname = "" >>> socket.getaddrinfo(hostname, None) Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 743, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno 8] nodename nor servname provided, or not known Perhaps there is something different about your hostname configuration on your Mac? macOS has some unusual ways of configuring the hostname resolutions. I don't have time at the moment to investigate further. But Python's socket module interfaces tend to be very thin wrappers around the underlying OS provided APIs. Perhaps you could test with a small C program that does the equivalent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 19:53:09 2017 From: report at bugs.python.org (James Crowther) Date: Fri, 03 Mar 2017 00:53:09 +0000 Subject: [issue29705] socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12 In-Reply-To: <1488501673.57.0.239287963128.issue29705@psf.upfronthosting.co.za> Message-ID: <05C39109-3E9D-4608-80C0-E2CABD03BAB0@gmail.com> James Crowther added the comment: Hi Ned, Currently running 10.12.3. and output is as follows Jamess-MacBook-pro:crowdrender_repository jamesmac$ python3.5 Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> hostname = socket.gethostname() >>> socket.getaddrinfo(hostname, None) Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/socket.py", line 732, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno 8] nodename nor servname provided, or not known >>> This is a commonly prescribed method of resolving the ip address of your own machine on a LAN, also if I try another machines hostname which is on the local network, I get the same result. As for the experiments you tried, these do work, but that is not what I want to use the socket library for, I want to query the IP address of hosts on the LAN, localhost is no use to me, its just the loop back address. I have a windows machine on my network and its hostname is James-PC, if i do socket.getaddrinfo(?James-PC?) I get the same error. This works if I reboot the mac (the same one that is having the issues) into linux and run the exact same command. I get the expected output from getaddrinfo. So, how come this approach doesn?t work on my mac? Also why are others having the same issue with Yosemite and sierra, this is not just me that is reporting this odd behaviour too. I?ve seen it in other forums. Kind Regards James > On 3 Mar 2017, at 11:41 am, Ned Deily wrote: > > > Ned Deily added the comment: > > Sorry, I can't reproduce that behavior with my macOS 10.12, 10.11, or 10.10 systems if the hostname is a valid string including "localhost". If the string is empty or hostname is None, then I see Errno 8. > > $ /usr/local/bin/python3.6 > Python 3.6.0 (v3.6.0:41df79263a11, Dec 22 2016, 17:23:13) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import socket >>>> hostname = 'python.org' >>>> socket.getaddrinfo(hostname, None) > [(, , 17, '', ('23.253.135.79', 0)), (, , 6, '', ('23.253.135.79', 0)), (, , 17, '', ('2001:4802:7901::e60a:1375:0:6', 0, 0, 0)), (, , 6, '', ('2001:4802:7901::e60a:1375:0:6', 0, 0, 0))] >>>> hostname = "localhost" >>>> socket.getaddrinfo(hostname, None) > [(, , 17, '', ('::1', 0, 0, 0)), (, , 6, '', ('::1', 0, 0, 0)), (, , 17, '', ('127.0.0.1', 0)), (, , 6, '', ('127.0.0.1', 0))] >>>> hostname = "" >>>> socket.getaddrinfo(hostname, None) > Traceback (most recent call last): > File "", line 1, in > File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socket.py", line 743, in getaddrinfo > for res in _socket.getaddrinfo(host, port, family, type, proto, flags): > socket.gaierror: [Errno 8] nodename nor servname provided, or not known > > Perhaps there is something different about your hostname configuration on your Mac? macOS has some unusual ways of configuring the hostname resolutions. I don't have time at the moment to investigate further. But Python's socket module interfaces tend to be very thin wrappers around the underlying OS provided APIs. Perhaps you could test with a small C program that does the equivalent. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 20:09:20 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 01:09:20 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1488503360.24.0.517060544958.issue29703@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +341 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 20:12:09 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 01:12:09 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1488503529.49.0.732567825045.issue29703@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +342 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 21:45:56 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 03 Mar 2017 02:45:56 +0000 Subject: [issue29705] socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12 In-Reply-To: <1488497815.81.0.0112571433534.issue29705@psf.upfronthosting.co.za> Message-ID: <1488509156.2.0.390700264996.issue29705@psf.upfronthosting.co.za> Ned Deily added the comment: James, I'm sorry I didn't show it but using socket.gethostname() as the source of hostname works just fine, too. import socket >>> hostname = socket.gethostname() >>> hostname 'harj.local' >>> socket.getaddrinfo(hostname, None) [(, , 17, '', ('fe80::8d8:1de3:dfa:e34c%en1', 0, 0, 5)), (, , 6, '', ('fe80::8d8:1de3:dfa:e34c%en1', 0, 0, 5)), (, , 17, '', ('10.0.1.7', 0)), (, , 6, '', ('10.0.1.7', 0))] I don't know what to tell you other than the behavior you are seeing is almost certainly not a Python issue. There are many other ways to explore host names, like using the "host" command line utility or "netstat". But that is all beyond the scope of this bug tracker. If you need more assistance, perhaps ask on one of the StackExchange forums or Apple lists. I'm going to close this issue; if you are able to isolate what appears to be a Python issue here, please feel free to re-open this. Good luck! ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 21:49:20 2017 From: report at bugs.python.org (James Crowther) Date: Fri, 03 Mar 2017 02:49:20 +0000 Subject: [issue29705] socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12 In-Reply-To: <1488509156.2.0.390700264996.issue29705@psf.upfronthosting.co.za> Message-ID: <24523DAC-61C3-4577-A10E-4530614DE430@gmail.com> James Crowther added the comment: Hi Ned, Thats ok, thanks! I?m going to try it on another machine, its really strange, I?m wondering what I might have done on my mac to cause it to flake out like this. Will do some more testing with other macs running 10.12 and see if they have the same behaviour, by the way, thanks for running that last test as it shows that this call is actually working on some systems. I really need to know the reason why its not working on mine, I have about 120 users and need to be sure that they?re not going to have our next build break if we rely on this call. Thanks :D James > On 3 Mar 2017, at 1:45 pm, Ned Deily wrote: > > > Ned Deily added the comment: > > James, I'm sorry I didn't show it but using socket.gethostname() as the source of hostname works just fine, too. > > import socket >>>> hostname = socket.gethostname() >>>> hostname > 'harj.local' >>>> socket.getaddrinfo(hostname, None) > [(, , 17, '', ('fe80::8d8:1de3:dfa:e34c%en1', 0, 0, 5)), (, , 6, '', ('fe80::8d8:1de3:dfa:e34c%en1', 0, 0, 5)), (, , 17, '', ('10.0.1.7', 0)), (, , 6, '', ('10.0.1.7', 0))] > > I don't know what to tell you other than the behavior you are seeing is almost certainly not a Python issue. There are many other ways to explore host names, like using the "host" command line utility or "netstat". But that is all beyond the scope of this bug tracker. If you need more assistance, perhaps ask on one of the StackExchange forums or Apple lists. I'm going to close this issue; if you are able to isolate what appears to be a Python issue here, please feel free to re-open this. Good luck! > > ---------- > resolution: -> works for me > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 22:20:55 2017 From: report at bugs.python.org (Eryk Sun) Date: Fri, 03 Mar 2017 03:20:55 +0000 Subject: [issue29702] Error 0x80070003: Failed to launch elevated child process In-Reply-To: <1488491344.75.0.39896878007.issue29702@psf.upfronthosting.co.za> Message-ID: <1488511255.0.0.688413888186.issue29702@psf.upfronthosting.co.za> Eryk Sun added the comment: The error message is misleading. It happens that WiX is trying to run an elevated process (see the WiX functions CoreLaunchApprovedExe, CoreElevate, ElevationElevate, and PipeLaunchChildProcess). However, the actual error code has nothing to do with elevation. Error code 0x80070003 is a 32-bit HRESULT error originating from the Windows API (0x8007). The 16-bit Windows error is ERROR_PATH_NOT_FOUND (0x0003). According to the installation log, this error is from trying to shell execute "C:\Users\ALEVON~1\AppData\Local\Temp\{8D001A8F-7F1F-4183-A574-76127D642F75}\.be\python-3.5.3-amd64.exe". Notably the error is in the path instead of ERROR_FILE_NOT_FOUND (0x0002), so the problem may have been that one of the parent directories was missing. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 22:23:15 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 03 Mar 2017 03:23:15 +0000 Subject: [issue28728] test_host_resolution in test_socket fails In-Reply-To: <1479407743.41.0.909577209709.issue28728@psf.upfronthosting.co.za> Message-ID: <1488511395.37.0.399388333756.issue28728@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +343 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 22:25:10 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 03:25:10 +0000 Subject: [issue29271] Task.current_task(None) returns unexpected result In-Reply-To: <1484345484.86.0.127501941011.issue29271@psf.upfronthosting.co.za> Message-ID: <1488511510.85.0.0931095595441.issue29271@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +344 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 22:29:03 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 03:29:03 +0000 Subject: [issue28893] Make sure exceptions raised in __aiter__ are properly chained in ceval In-Reply-To: <1481085693.53.0.293766364883.issue28893@psf.upfronthosting.co.za> Message-ID: <1488511743.86.0.273029603889.issue28893@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +345 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 22:43:57 2017 From: report at bugs.python.org (David E. Franco G.) Date: Fri, 03 Mar 2017 03:43:57 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await Message-ID: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> New submission from David E. Franco G.: Well, this is pretty self explanatory, when playing with this new features of async and await (https://docs.python.org/3.5/whatsnew/3.5.html#new-features) I found to me surprise that there is no syntax highlighting for it in the IDLE for py3.5 and also for py3.6 So I humbly ask for its addition. Thanks ---------- assignee: terry.reedy components: IDLE files: no syntax highlighting.png messages: 288849 nosy: David E. Franco G., terry.reedy priority: normal severity: normal status: open title: IDLE needs syntax highlighting for async and await type: behavior versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file46692/no syntax highlighting.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 23:00:08 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 03 Mar 2017 04:00:08 +0000 Subject: [issue29679] Add @contextlib.asynccontextmanager In-Reply-To: <1488324069.16.0.696570474408.issue29679@psf.upfronthosting.co.za> Message-ID: <1488513608.73.0.803191927972.issue29679@psf.upfronthosting.co.za> Nick Coghlan added the comment: Something that occurred to me as being a bit tricky to handle here is the backport to contextlib2: that maintains compatibility with 2.6+, so it would need to split any code using "async def" and "await" out to a separate file that only gets imported on 3.5+ (and similarly only run the corresponding test cases on 3.5+). A potentially simpler alternative to that would be to create a new "backports.contextlib" package that only supports 3.5+ and explicitly restrict contextlib2 itself to code that runs in the common subset of Python 2 & 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 23:02:46 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 04:02:46 +0000 Subject: [issue29679] Add @contextlib.asynccontextmanager In-Reply-To: <1488324069.16.0.696570474408.issue29679@psf.upfronthosting.co.za> Message-ID: <1488513766.23.0.248132333585.issue29679@psf.upfronthosting.co.za> Yury Selivanov added the comment: > so it would need to split any code using "async def" and "await" out to a separate file that only gets imported on 3.5+ (and similarly only run the corresponding test cases on 3.5+). This seems doable. I'd only vote to keep contextlib.py as one file in CPython though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 23:04:18 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Mar 2017 04:04:18 +0000 Subject: [issue29701] Add close method to queue.Queue In-Reply-To: <1488485532.45.0.976459019786.issue29701@psf.upfronthosting.co.za> Message-ID: <1488513858.55.0.142187786222.issue29701@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll mull this one over for a while and take a look at what other languages are doing. My first impression is the close() is the wrong word because in other contexts it means that a resource has been freed and that no more calls are allowed. In this context, the queue is still alive and continued get() calls will work until the queue is empty. Another first reaction is that this will cause more problems than it solves (feature request to reopen a queue, wanting an API to detect whether a queue is closed, having to learn a new pattern for queue use, adding more complexity to the API, unexpected interactions with join/task_done). The normal (or at least common) use cases for Queue involve leaving it open indefinitely with daemon threads always lying in wait for more data. If there were a need to close down a consumer thread, the usual solution is to send a close-down signal/sentinel. It would be more complicated for the multi-consumer case but that is atypical for Python threads (because the GIL limits getting any benefit). The multi-consumer case is more likely to arise in an async environment. These are only first impressions. I will think about it more. In the mean time, it would help if you could find a few real-world examples of existing code that would be improved by having a close() method, that would allow me to think more concretely about the subject. FWIW, I don't normally think of queues as short-lived objects. It is like having a email account (an atomic message queue) which never close off or shut down. ---------- nosy: +davin, tim.peters priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 23:16:06 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 04:16:06 +0000 Subject: [issue28893] Make sure exceptions raised in __aiter__ are properly chained in ceval In-Reply-To: <1481085693.53.0.293766364883.issue28893@psf.upfronthosting.co.za> Message-ID: <1488514566.35.0.806755446022.issue28893@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset dea5101ae101aefed14de98e6bb1658f4cae8712 by Yury Selivanov in branch '3.6': bpo-28893: Set __cause__ for errors in async iteration protocol (#407) https://github.com/python/cpython/commit/dea5101ae101aefed14de98e6bb1658f4cae8712 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 23:18:21 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Mar 2017 04:18:21 +0000 Subject: [issue29696] Use namedtuple in string.Formatter.parse iterator response In-Reply-To: <1488468843.51.0.704010418399.issue29696@psf.upfronthosting.co.za> Message-ID: <1488514701.0.0.33085041717.issue29696@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think this is all C coded, so it would entail making a new structseq object. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 23:20:31 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 04:20:31 +0000 Subject: [issue29271] Task.current_task(None) returns unexpected result In-Reply-To: <1484345484.86.0.127501941011.issue29271@psf.upfronthosting.co.za> Message-ID: <1488514831.49.0.306457482111.issue29271@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 13802a3b11eb5202b16e464cbfb85c144f8581ce by Yury Selivanov in branch '3.6': bpo-29271: Fix Task.current_task and Task.all_tasks to accept None. (#406) https://github.com/python/cpython/commit/13802a3b11eb5202b16e464cbfb85c144f8581ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 23:33:41 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 04:33:41 +0000 Subject: [issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes In-Reply-To: <1488493463.16.0.114641402405.issue29704@psf.upfronthosting.co.za> Message-ID: <1488515621.64.0.825469793134.issue29704@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +346 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 2 23:34:25 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 04:34:25 +0000 Subject: [issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes In-Reply-To: <1488493463.16.0.114641402405.issue29704@psf.upfronthosting.co.za> Message-ID: <1488515665.62.0.459293834688.issue29704@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +347 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 00:11:26 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 05:11:26 +0000 Subject: [issue28963] Use-after-free in _asyncio_Future_remove_done_callback() of _asynciomodule.c In-Reply-To: <1481657201.46.0.37032067172.issue28963@psf.upfronthosting.co.za> Message-ID: <1488517886.26.0.375442541335.issue28963@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset d8b72e4a0673c414120b029065dbe77055f12e82 by Yury Selivanov in branch '3.6': bpo-28963: Fix out of bound iteration in asyncio.Future.remove_done_callback/C (#408) https://github.com/python/cpython/commit/d8b72e4a0673c414120b029065dbe77055f12e82 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 00:30:00 2017 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 03 Mar 2017 05:30:00 +0000 Subject: [issue26389] Expand traceback module API to accept just an exception as an argument In-Reply-To: <1455836350.85.0.0162824201978.issue26389@psf.upfronthosting.co.za> Message-ID: <1488519000.39.0.726327261789.issue26389@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: > (Optional) Change 'value' to 'exc' in the API to reflect the 3.x restriction Keep the synonym until after 2.7. Do you mean after 2.7 EOL, or after 3.7 ? > etype: In 3.5+ document that it is an ignored dummy argument and that one can just pass 0, '', or None. > (Optional) Deprecate the parameter and make it optional. This can be handled* in the code and would be like range having option 'start'. This is messy but would be temporary. That seem hard to do if we want to allow func(exception), should we attempt to emit a deprecation warning only when etype is used in the Legacy Form ? > Remove after 2.7. Same question as above, unsure what you mean. > (Optional) Change 'value' to 'exc' in the API to reflect the 3.x restriction. Document 'value' as a deprecated synonym for keyword usage. That seem like overly complicated as now the actual exception object can be either in etype, value, or exc. Let my try to give example to see if I understood correctly 2.7 compat print_exception(etype, value, tb) print_exception(etype=etype, value=value, tb=tb) 3.5 compat print_exception(None, value, tb) print_exception(etype=None, value=value, tb=tb) 3.7 print_exception(value) == print_exception(type(value), value, value.__traceback__) print_exception(value, tb=True) == print_exception(type(value), value, value.__traceback__) print_exception(value, tb=None) == print_exception(type(value), value, None) print_exception(value, tb=False) == print_exception(type(value), value, None) print_exception(value, tb=faketb) == print_exception(type(value), value, faketb) # tb can be positional print_exception(value, tb) == print_exception(value, tb=tb) Signature would thus be: if first param isinstance BaseException: # 3.7+, prefered form print_exception(exc, [tb ,] *, [limit, file, chain]) else: print_exception(etype, value, tb, [limit, file, chain]) # etype being ignored Should exc be positional only ? print_exception(exc, /, [tb ,] *, [limit, file, chain]) Should `limit`, `file`, `chain` be allowed to be positional ? print_exception(exc, [tb , limit, file, chain]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 00:35:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 05:35:28 +0000 Subject: [issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc In-Reply-To: <1488358332.92.0.449242887398.issue29683@psf.upfronthosting.co.za> Message-ID: <1488519328.25.0.437381803183.issue29683@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Brian. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 00:42:00 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Mar 2017 05:42:00 +0000 Subject: [issue29026] time.time() documentation should mention UTC timezone In-Reply-To: <1482243889.09.0.538886851254.issue29026@psf.upfronthosting.co.za> Message-ID: <1488519720.67.0.844343482103.issue29026@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +348 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 00:42:50 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Mar 2017 05:42:50 +0000 Subject: [issue29026] time.time() documentation should mention UTC timezone In-Reply-To: <1482243889.09.0.538886851254.issue29026@psf.upfronthosting.co.za> Message-ID: <1488519770.77.0.588108000869.issue29026@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +349 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 00:47:39 2017 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 03 Mar 2017 05:47:39 +0000 Subject: [issue28963] Use-after-free in _asyncio_Future_remove_done_callback() of _asynciomodule.c In-Reply-To: <1481657201.46.0.37032067172.issue28963@psf.upfronthosting.co.za> Message-ID: <1488520059.86.0.251753355719.issue28963@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 01:19:43 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Mar 2017 06:19:43 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1488521983.25.0.686290702115.issue29706@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I presume you would like 'async' and 'await' highlighted as keywords. However, IDLE takes its definition of 'keyword' from keyword.kwlist. 'Async' and 'await' are currently not on that list as they are not yet keywords. >>> async = 1 >>> await = 2 According to https://www.python.org/dev/peps/pep-0492/#transition-plan, the intention was (is?) to make them keywords in 3.7. As of Feb 11, that had not happened yet. If and when it does, this issue will be taken care of. I may consider adding a special context sensitive case for 3.6, if the colorizer code makes it easily possible. Care is needed since it would be a mistake to mark them as keywords in the above statements. The difficulty is that colorizer uses regexes and a bit of context sensitive code, while python is using a full grammar parse. I believe that either at the beginning of a line and 'async' followed by 'for' or 'with' or 'await' not followed by certain punctuation ('.', ',', or '=') should be treated as a keyword. Yury, does the rule above look about right? 'Await' seems trickier than 'async'. I think it may be possible to add regexes that are not literal words to the kwlist. If so, adding 'async +def ', 'async +for ', 'async +with ', and 'await +[^.,=]' and not worrying about 'beginning or line' or tabs (instead of spaces) between would be easy and probably good enough. ---------- nosy: +yselivanov stage: -> test needed type: behavior -> enhancement versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 01:22:28 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 06:22:28 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1488522148.33.0.869219553107.issue29706@psf.upfronthosting.co.za> Yury Selivanov added the comment: >According to https://www.python.org/dev/peps/pep-0492/#transition-plan, the intention was (is?) to make them keywords in 3.7. As of Feb 11, that had not happened yet. If and when it does, this issue will be taken care of. I plan to do that in the next couple of weeks. > I may consider adding a special context sensitive case for 3.6, if the colorizer code makes it easily possible. Care is needed since it would be a mistake to mark them as keywords in the above statements. If possible I would make 'async' and 'await' to be always highlighted. Even if a user writes <3.7 code and uses 'async' as a variable, it would still be great to let the user know that there is something wrong with this variable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 01:50:16 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 03 Mar 2017 06:50:16 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1488523816.56.0.816298798338.issue28261@psf.upfronthosting.co.za> Oren Milman added the comment: Do you mean that in each case PyArg_ParseTuple fails, we should chain to the exception raised by PyArg_ParseTuple an exception that specifies the name of the tuple that PyArg_ParseTuple failed to parse, without specifying the function name? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:01:16 2017 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 03 Mar 2017 07:01:16 +0000 Subject: [issue29693] DeprecationWarning/SyntaxError in test_import In-Reply-To: <1488461509.07.0.849251480688.issue29693@psf.upfronthosting.co.za> Message-ID: <1488524476.27.0.236951888438.issue29693@psf.upfronthosting.co.za> Changes by Matthias Bussonnier : ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:01:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 07:01:47 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1488524507.67.0.136425023253.issue28261@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: An error message is not passed in the function name. PyArg_ParseTuple() allows you to pass an arbitrary error message. I think this feature is specially designed for these cases. I didn't look the patch close, but Oren's approach LGTM in general. ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:01:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 07:01:57 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1488524517.75.0.709333353291.issue28261@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:07:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 07:07:11 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1488524831.22.0.0397343816352.issue29706@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:09:34 2017 From: report at bugs.python.org (ollieparanoid) Date: Fri, 03 Mar 2017 07:09:34 +0000 Subject: [issue29707] os.path.ismount() always returns false for mount --bind on same filesystem Message-ID: <1488524974.65.0.103028894103.issue29707@psf.upfronthosting.co.za> New submission from ollieparanoid: After mounting a folder to another folder on the same filesystem with mount --bind, os.path.ismount() still returns False on the destination folder (although there is a mountpoint). A shell script to reproduce this is below. (Maybe this can be fixed by using /proc/mounts (if available, may not be the case eg. for chroots) for verifying, if the destination folder is really a mountpoint on POSIX/Linux. Although I am not sure how consistent that is through POSIX.) --- #!/bin/sh # Output: # contents of /tmp/destination (should have test.py -> obviously mounted): # test.py # os.path.ismount(): False # create source and destination folders source=/tmp/source destination=/tmp/destination mkdir -p $source $destination # add the python script in the source folder echo "import os.path" >> $source/test.py echo "print('os.path.ismount(): ' + str(os.path.ismount('$destination')))" >> $source/test.py # do the mount --bind sudo mount --bind $source $destination echo "contents of $destination (should have test.py -> obviously mounted):" ls $destination # show the python bug python3 $source/test.py # clean up sudo umount $destination rm $source/test.py rm -d $source $destination ---------- components: Library (Lib) messages: 288863 nosy: Oliver Smith priority: normal severity: normal status: open title: os.path.ismount() always returns false for mount --bind on same filesystem type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:12:51 2017 From: report at bugs.python.org (Anish Shah) Date: Fri, 03 Mar 2017 07:12:51 +0000 Subject: [issue29693] DeprecationWarning/SyntaxError in test_import In-Reply-To: <1488461509.07.0.849251480688.issue29693@psf.upfronthosting.co.za> Message-ID: <1488525171.94.0.436810704435.issue29693@psf.upfronthosting.co.za> Anish Shah added the comment: I will try to work on this! :) ---------- nosy: +anish.shah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:14:12 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 03 Mar 2017 07:14:12 +0000 Subject: [issue28272] a redundant check in maybe_small_long In-Reply-To: <1474807129.82.0.382884780028.issue28272@psf.upfronthosting.co.za> Message-ID: <1488525252.73.0.14514193717.issue28272@psf.upfronthosting.co.za> Oren Milman added the comment: So, should I open a pull request? (as some time had passed, I would also run again the tests, etc.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:20:16 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 03 Mar 2017 07:20:16 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1488525616.22.0.610409756894.issue28298@psf.upfronthosting.co.za> Oren Milman added the comment: ping ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:22:03 2017 From: report at bugs.python.org (Anish Shah) Date: Fri, 03 Mar 2017 07:22:03 +0000 Subject: [issue29693] DeprecationWarning/SyntaxError in test_import In-Reply-To: <1488461509.07.0.849251480688.issue29693@psf.upfronthosting.co.za> Message-ID: <1488525723.17.0.58128862282.issue29693@psf.upfronthosting.co.za> Anish Shah added the comment: I'm not able to reproduce the SyntaxError on latest commit 902e9c50e31209e796b6bbe26f8d2f57ec12071b on master branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:23:12 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Mar 2017 07:23:12 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1488525792.36.0.108437293099.issue29706@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Always coloring 'async' and 'await' is trivial (augment expression and add test line) and acceptable to me. I am a git neophyte and am waiting for workflow development to settle down before working on new setup for git. If you want to submit the change for 3.6.1, go ahead. (But leave issue open.) Otherwise, I will get it into 3.6.2 (and 3.7). Patch is against 3.6 idlelib.colorize, but 3.7 is identical. The test is to run colorizer.py as main module (python -m idlelib.colorize, or F5 in IDLE editor). Click 'Test' button and check that 'async' and 'await' have same color as other keywords. This cannot affect anything in test suite; colorizer is only used by turtledemo, which is not tested, and which will not notice anyway. ---------- keywords: +patch Added file: http://bugs.python.org/file46693/colorize_async.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:25:46 2017 From: report at bugs.python.org (Anish Shah) Date: Fri, 03 Mar 2017 07:25:46 +0000 Subject: [issue29693] DeprecationWarning/SyntaxError in test_import In-Reply-To: <1488461509.07.0.849251480688.issue29693@psf.upfronthosting.co.za> Message-ID: <1488525946.61.0.781827951161.issue29693@psf.upfronthosting.co.za> Changes by Anish Shah : ---------- pull_requests: +350 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:39:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 07:39:11 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1488526751.49.0.017841241039.issue28261@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oren, could you write reproducers for all affected cases? I don't think we need to add them as regular tests, but we should be able to check changes manually. There are conflicts in Modules/itertoolsmodule.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:40:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 07:40:47 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1488526847.36.0.423356729065.issue28298@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:40:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 07:40:55 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1488526855.61.0.688908539178.issue28298@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:44:59 2017 From: report at bugs.python.org (Anish Shah) Date: Fri, 03 Mar 2017 07:44:59 +0000 Subject: [issue27645] Supporting native backup facility of SQLite In-Reply-To: <1469728098.24.0.732586701981.issue27645@psf.upfronthosting.co.za> Message-ID: <1488527099.05.0.526414068503.issue27645@psf.upfronthosting.co.za> Changes by Anish Shah : ---------- nosy: +anish.shah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:48:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Mar 2017 07:48:04 +0000 Subject: [issue26389] Expand traceback module API to accept just an exception as an argument In-Reply-To: <1455836350.85.0.0162824201978.issue26389@psf.upfronthosting.co.za> Message-ID: <1488527284.15.0.917846175082.issue26389@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Matthias, I will try to respond tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:48:57 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Mar 2017 07:48:57 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1488527337.35.0.0643027858212.issue20087@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- pull_requests: +351 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 02:51:48 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 03 Mar 2017 07:51:48 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1488527508.97.0.834989926708.issue29571@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- pull_requests: +352 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 03:06:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 08:06:38 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1488528398.34.0.259626568717.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Needed a test for few common locales (en_IN, ru_RU) and maybe for unusual locales (uz_uz, uz_uz at cyrillic). I would prefer to have a separate issue that updates the aliases table to glibc 2.24. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 03:13:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 08:13:21 +0000 Subject: [issue29693] DeprecationWarning/SyntaxError in test_import In-Reply-To: <1488461509.07.0.849251480688.issue29693@psf.upfronthosting.co.za> Message-ID: <1488528801.25.0.778580801688.issue29693@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Anish. DeprecationWarning is converted to SyntaxError when run Python with -We. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 03:28:52 2017 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 03 Mar 2017 08:28:52 +0000 Subject: [issue29696] Use namedtuple in string.Formatter.parse iterator response In-Reply-To: <1488468843.51.0.704010418399.issue29696@psf.upfronthosting.co.za> Message-ID: <1488529732.37.0.686078604085.issue29696@psf.upfronthosting.co.za> Eric V. Smith added the comment: It's in string.py, so it would be easy just to add a namedtuple there: class Formatter: ... def parse(self, format_string): return _string.formatter_parser(format_string) I don't see a need to add a structseq to _string, since it's a private API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 03:32:39 2017 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 03 Mar 2017 08:32:39 +0000 Subject: [issue29696] Use namedtuple in string.Formatter.parse iterator response In-Reply-To: <1488468843.51.0.704010418399.issue29696@psf.upfronthosting.co.za> Message-ID: <1488529959.39.0.977409625143.issue29696@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 03:46:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 08:46:34 +0000 Subject: [issue29696] Use namedtuple in string.Formatter.parse iterator response In-Reply-To: <1488468843.51.0.704010418399.issue29696@psf.upfronthosting.co.za> Message-ID: <1488530794.62.0.0515170991979.issue29696@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: collections is a moderately heavy module with many dependencies. string is a light module, it imports only _string. I'm -1 for using namedtuple in the string module. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 05:26:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Mar 2017 10:26:08 +0000 Subject: [issue28272] a redundant check in maybe_small_long In-Reply-To: <1474807129.82.0.382884780028.issue28272@psf.upfronthosting.co.za> Message-ID: <1488536768.48.0.774201650471.issue28272@psf.upfronthosting.co.za> STINNER Victor added the comment: > So, should I open a pull request? I consider that Mark Dickinson is the maintained of longobject.c, so please for his feedback before going further. It seems like Mark consider that the change is worthless and bad for maintainability/sustainability. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 05:59:13 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Mar 2017 10:59:13 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1488538753.02.0.795404889771.issue9303@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: postponed -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 06:06:15 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Mar 2017 11:06:15 +0000 Subject: [issue26187] sqlite3 trace callback prints duplicate line In-Reply-To: <1453577672.38.0.77226221379.issue26187@psf.upfronthosting.co.za> Message-ID: <1488539175.23.0.559436357672.issue26187@psf.upfronthosting.co.za> Berker Peksag added the comment: It would be nice to add a test case to https://github.com/python/cpython/blob/86a670543ff97d52fd9b8ca0477f8b6d27ee946d/Lib/sqlite3/test/hooks.py#L204 before closing this. ---------- nosy: +berker.peksag stage: -> test needed versions: +Python 3.7 -Python 3.4, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 06:11:58 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Mar 2017 11:11:58 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1488539518.79.0.172807703759.issue9303@psf.upfronthosting.co.za> Berker Peksag added the comment: I will add commit information manually: https://github.com/python/cpython/commit/86a670543ff97d52fd9b8ca0477f8b6d27ee946d Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 06:19:44 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 03 Mar 2017 11:19:44 +0000 Subject: [issue28272] a redundant check in maybe_small_long In-Reply-To: <1474807129.82.0.382884780028.issue28272@psf.upfronthosting.co.za> Message-ID: <1488539984.21.0.770024657513.issue28272@psf.upfronthosting.co.za> Mark Dickinson added the comment: Without a demonstrable performance improvement, I'm opposed to making this change. Closing. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 06:32:31 2017 From: report at bugs.python.org (Martin Panter) Date: Fri, 03 Mar 2017 11:32:31 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1488540751.89.0.833856203691.issue29706@psf.upfronthosting.co.za> Martin Panter added the comment: See also Issue 26264 about the ?keyword? module ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 06:36:06 2017 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Fri, 03 Mar 2017 11:36:06 +0000 Subject: [issue29708] support reproducible Python builds Message-ID: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> New submission from Bernhard M. Wiedemann: See https://reproducible-builds.org/ and https://reproducible-builds.org/docs/buy-in/ for why this is a good thing to have in general. Fedora, openSUSE and possibly other Linux distributions package .pyc files as part of their binary rpm packages and they are not trivial to drop [1]. A .pyc header includes the timestamp of the source .py file which creates non-reproducible builds when the .py file is touched during build time (e.g. for a version.py). As of 2017-02-10 in openSUSE Factory this affected 476 packages (such as python-amqp and python3-Twisted). [1] http://lists.opensuse.org/opensuse-packaging/2017-02/msg00086.html ---------- components: Build, Distutils messages: 288880 nosy: bmwiedemann, dstufft, merwok priority: normal pull_requests: 353 severity: normal status: open title: support reproducible Python builds versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 07:11:40 2017 From: report at bugs.python.org (Stefan Pochmann) Date: Fri, 03 Mar 2017 12:11:40 +0000 Subject: [issue29709] Short-circuiting not only on False and True Message-ID: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> New submission from Stefan Pochmann: The notes at https://docs.python.org/3/library/stdtypes.html#boolean-operations-and-or-not say that `or` "only evaluates the second argument if the first one is False" and that `and` "only evaluates the second argument if the first one is True". Should say "false" and "true" instead of "False" and "True". ---------- assignee: docs at python components: Documentation messages: 288881 nosy: Stefan Pochmann, docs at python priority: normal severity: normal status: open title: Short-circuiting not only on False and True type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 07:33:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 12:33:38 +0000 Subject: [issue29709] Short-circuiting not only on False and True In-Reply-To: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> Message-ID: <1488544418.55.0.22098271706.issue29709@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +easy stage: -> needs patch versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 07:41:28 2017 From: report at bugs.python.org (Andrew Nester) Date: Fri, 03 Mar 2017 12:41:28 +0000 Subject: [issue29649] struct.pack_into check boundary error message didn't respect offset In-Reply-To: <1488030784.09.0.674246877605.issue29649@psf.upfronthosting.co.za> Message-ID: <1488544888.73.0.0516153151031.issue29649@psf.upfronthosting.co.za> Changes by Andrew Nester : ---------- pull_requests: +354 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 07:41:53 2017 From: report at bugs.python.org (Andrew Nester) Date: Fri, 03 Mar 2017 12:41:53 +0000 Subject: [issue29649] struct.pack_into check boundary error message didn't respect offset In-Reply-To: <1488030784.09.0.674246877605.issue29649@psf.upfronthosting.co.za> Message-ID: <1488544913.02.0.235705829536.issue29649@psf.upfronthosting.co.za> Andrew Nester added the comment: Thanks! Just added PR fixing this. ---------- nosy: +andrewnester _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 08:20:40 2017 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 03 Mar 2017 13:20:40 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <5DB46354-AEBC-4957-AF28-85D211FD9956@trueblade.com> Eric V. Smith added the comment: -- Eric. > On Mar 3, 2017, at 6:36 AM, Bernhard M. Wiedemann wrote: > > > New submission from Bernhard M. Wiedemann: > > See https://reproducible-builds.org/ and https://reproducible-builds.org/docs/buy-in/ for why this is a good thing to have in general. > > Fedora, openSUSE and possibly other Linux distributions package .pyc files as part of their binary rpm packages and they are not trivial to drop [1]. > > A .pyc header includes the timestamp of the source .py file > which creates non-reproducible builds when the .py file is touched during build time (e.g. for a version.py). > As of 2017-02-10 in openSUSE Factory this affected 476 packages (such as python-amqp and python3-Twisted). > > > [1] http://lists.opensuse.org/opensuse-packaging/2017-02/msg00086.html > > ---------- > components: Build, Distutils > messages: 288880 > nosy: bmwiedemann, dstufft, merwok > priority: normal > pull_requests: 353 > severity: normal > status: open > title: support reproducible Python builds > versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > New-bugs-announce mailing list > New-bugs-announce at python.org > https://mail.python.org/mailman/listinfo/new-bugs-announce > ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 08:23:01 2017 From: report at bugs.python.org (Serhiy Int) Date: Fri, 03 Mar 2017 13:23:01 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1488547381.51.0.582038156542.issue29636@psf.upfronthosting.co.za> Changes by Serhiy Int : ---------- pull_requests: +355 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 08:41:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 13:41:45 +0000 Subject: [issue29649] struct.pack_into check boundary error message didn't respect offset In-Reply-To: <1488030784.09.0.674246877605.issue29649@psf.upfronthosting.co.za> Message-ID: <1488548505.04.0.50876129859.issue29649@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure the new error message is better. It is not known what is wrong -- the size of the buffer, or the offset? I think that the better error message should include three numbers: the offset, the size of the destination buffer, and the size of packed data or the minimal size of the destination buffer. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 08:44:35 2017 From: report at bugs.python.org (Andrew Nester) Date: Fri, 03 Mar 2017 13:44:35 +0000 Subject: [issue29649] struct.pack_into check boundary error message didn't respect offset In-Reply-To: <1488030784.09.0.674246877605.issue29649@psf.upfronthosting.co.za> Message-ID: <1488548675.1.0.405381769642.issue29649@psf.upfronthosting.co.za> Andrew Nester added the comment: yeah, I also thought about this too. Something like 'pack_into requires a buffer of at least 6 bytes (size is 1, offset is 5)' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 08:56:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 13:56:47 +0000 Subject: [issue29649] struct.pack_into check boundary error message didn't respect offset In-Reply-To: <1488030784.09.0.674246877605.issue29649@psf.upfronthosting.co.za> Message-ID: <1488549407.15.0.283202519652.issue29649@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Or "pack_into requires a buffer of at least 6 bytes for packing 1 bytes at offset 5". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 09:01:13 2017 From: report at bugs.python.org (Andrew Nester) Date: Fri, 03 Mar 2017 14:01:13 +0000 Subject: [issue29649] struct.pack_into check boundary error message didn't respect offset In-Reply-To: <1488030784.09.0.674246877605.issue29649@psf.upfronthosting.co.za> Message-ID: <1488549673.77.0.74918694392.issue29649@psf.upfronthosting.co.za> Andrew Nester added the comment: thanks Serhiy! just implemented your variant in my PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 09:02:04 2017 From: report at bugs.python.org (Marco Buttu) Date: Fri, 03 Mar 2017 14:02:04 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1488549724.97.0.907870055792.issue16355@psf.upfronthosting.co.za> Changes by Marco Buttu : ---------- pull_requests: +356 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 09:20:33 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Mar 2017 14:20:33 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1488550833.13.0.0764131708153.issue16355@psf.upfronthosting.co.za> Berker Peksag added the comment: I think David's comment about tests was for the second patch. Looking at msg199395 and msg199397, my understanding is that tests are still needed. ---------- nosy: +berker.peksag versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 09:23:08 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 03 Mar 2017 14:23:08 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1488550988.69.0.792441279811.issue29708@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 09:25:10 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 03 Mar 2017 14:25:10 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1488551110.55.0.781849527289.issue29708@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Shouldn't this at least also cover Python 3.7? And should it be officially backported? I would think that if https://github.com/python/cpython/pull/296 gets accepted for 3.7, then distros that care can cherry pick it back into whatever versions they still support. It probably needn't be officially cherry picked upstream. (FWIW, this doesn't affect the Debian ecosystem since we don't ship pycs in debs.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 09:38:39 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 03 Mar 2017 14:38:39 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs Message-ID: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> New submission from Nick Coghlan: The docs on bitwise operations at https://docs.python.org/3/library/stdtypes.html#bitwise-operations-on-integer-types include the caveated sentence: Negative numbers are treated as their 2?s complement value (this assumes that there are enough bits so that no overflow occurs during the operation). This sentence isn't correct now that integers are always arbitrary length. The bitwise inversion will never overflow, and is instead calculated as "-(n+1)" rather than literally flipping bits in the representation: https://docs.python.org/3/reference/expressions.html#unary-arithmetic-and-bitwise-operations ---------- assignee: docs at python components: Documentation messages: 288890 nosy: docs at python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Incorrect representation caveat on bitwise operation docs type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 09:40:49 2017 From: report at bugs.python.org (Armen Levonian) Date: Fri, 03 Mar 2017 14:40:49 +0000 Subject: [issue29702] Error 0x80070003: Failed to launch elevated child process In-Reply-To: <1488511255.0.0.688413888186.issue29702@psf.upfronthosting.co.za> Message-ID: <1807936499.356533.1488551791782@mail.yahoo.com> Armen Levonian added the comment: Hi Eryk, I did think of that as well so I actually navigated to that temp folder (from the log) which the installer created (every time it runs, it creates a new temp folder and places the executable there) and executed that directly and got exactly the same log message. So the folder exists, since the installer is creating it, and the .exe exists. Armen From: Eryk Sun To: alevonian at yahoo.com Sent: Thursday, March 2, 2017 7:20 PM Subject: [issue29702] Error 0x80070003: Failed to launch elevated child process Eryk Sun added the comment: The error message is misleading. It happens that WiX is trying to run an elevated process (see the WiX functions CoreLaunchApprovedExe, CoreElevate, ElevationElevate, and PipeLaunchChildProcess). However, the actual error code has nothing to do with elevation. Error code 0x80070003 is a 32-bit HRESULT error originating from the Windows API (0x8007). The 16-bit Windows error is ERROR_PATH_NOT_FOUND (0x0003). According to the installation log, this error is from trying to shell execute "C:\Users\ALEVON~1\AppData\Local\Temp\{8D001A8F-7F1F-4183-A574-76127D642F75}\.be\python-3.5.3-amd64.exe". Notably the error is in the path instead of ERROR_FILE_NOT_FOUND (0x0002), so the problem may have been that one of the parent directories was missing. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 09:43:39 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 03 Mar 2017 14:43:39 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1488552219.07.0.744282825013.issue16355@psf.upfronthosting.co.za> R. David Murray added the comment: Correct. Tests are good, it's the fix I was rejecting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 09:48:31 2017 From: report at bugs.python.org (Sanyam Khurana) Date: Fri, 03 Mar 2017 14:48:31 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1488552511.07.0.760157334069.issue29710@psf.upfronthosting.co.za> Sanyam Khurana added the comment: Hi, I'm working on this issue. ---------- nosy: +CuriousLearner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 09:54:46 2017 From: report at bugs.python.org (Julien Duponchelle) Date: Fri, 03 Mar 2017 14:54:46 +0000 Subject: [issue29711] When you use stop_serving in proactor loop it's kill all listening servers Message-ID: <1488552886.51.0.862043273037.issue29711@psf.upfronthosting.co.za> New submission from Julien Duponchelle: If you stop a server when you use the proactor loop all other servers will be killed. ---------- components: asyncio messages: 288894 nosy: gvanrossum, noplay, yselivanov priority: normal severity: normal status: open title: When you use stop_serving in proactor loop it's kill all listening servers versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 09:55:06 2017 From: report at bugs.python.org (Julien Duponchelle) Date: Fri, 03 Mar 2017 14:55:06 +0000 Subject: [issue29711] When you use stop_serving in proactor loop it's kill all listening servers In-Reply-To: <1488552886.51.0.862043273037.issue29711@psf.upfronthosting.co.za> Message-ID: <1488552906.93.0.255951275206.issue29711@psf.upfronthosting.co.za> Julien Duponchelle added the comment: I will provide a patch for this ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 10:06:53 2017 From: report at bugs.python.org (Julien Duponchelle) Date: Fri, 03 Mar 2017 15:06:53 +0000 Subject: [issue29711] When you use stop_serving in proactor loop it's kill all listening servers In-Reply-To: <1488552886.51.0.862043273037.issue29711@psf.upfronthosting.co.za> Message-ID: <1488553613.28.0.665346354338.issue29711@psf.upfronthosting.co.za> Changes by Julien Duponchelle : ---------- pull_requests: +357 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 10:30:34 2017 From: report at bugs.python.org (Francis Deslauriers) Date: Fri, 03 Mar 2017 15:30:34 +0000 Subject: [issue28909] Adding LTTng-UST tracing support In-Reply-To: <1481227474.94.0.337411886613.issue28909@psf.upfronthosting.co.za> Message-ID: <1488555034.33.0.104831792891.issue28909@psf.upfronthosting.co.za> Francis Deslauriers added the comment: > What about `PyProbe`? Given the multitude of tools and techniques in this space, wouldn't it be worthwhile to clarify things before adding this? I think conflating `dtrace` and `lttng` would only lead to more confusion for users as they really are distinct technologies. I like the PyProbe name too. PyTracepoint could be another option. Here is the tests patch. The tests are using the same test cases as the DTrace and SystemTap tests. It still uses the same name as before and the tests were added to the existing test_dtrace.py file. I will send an updated version once we have the final name. ---------- Added file: http://bugs.python.org/file46694/0002-LTTng-UST-tracing-tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 10:31:03 2017 From: report at bugs.python.org (Francis Deslauriers) Date: Fri, 03 Mar 2017 15:31:03 +0000 Subject: [issue28909] Adding LTTng-UST tracing support In-Reply-To: <1481227474.94.0.337411886613.issue28909@psf.upfronthosting.co.za> Message-ID: <1488555063.83.0.0498877168846.issue28909@psf.upfronthosting.co.za> Francis Deslauriers added the comment: Here is the documentation patch. ---------- Added file: http://bugs.python.org/file46695/0003-Documentation-of-LTTng-UST-tracing-instrumentation.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 10:34:12 2017 From: report at bugs.python.org (Wolfgang Maier) Date: Fri, 03 Mar 2017 15:34:12 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1488555252.9.0.870940084321.issue29710@psf.upfronthosting.co.za> Changes by Wolfgang Maier : ---------- nosy: +wolma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 10:42:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 15:42:50 +0000 Subject: [issue29402] Problem with Checkbutton and duplicate last name components In-Reply-To: <1485898494.74.0.656128703551.issue29402@psf.upfronthosting.co.za> Message-ID: <1488555770.43.0.935313823124.issue29402@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 10:45:23 2017 From: report at bugs.python.org (Lai, Yian) Date: Fri, 03 Mar 2017 15:45:23 +0000 Subject: [issue29712] --enable-optimizations does not work with --enbale-shared Message-ID: <1488555923.14.0.550158164587.issue29712@psf.upfronthosting.co.za> New submission from Lai, Yian: I want to altinstall 3.6 with LTO+PGO optimizations, so: ./configure --enable-shared --enable-optimizations --prefix=$HOME/.local LDFLAGS=-Wl,-rpath=$HOME/.local/lib make (./configure arguments refer to issue #27685) But I get in trouble when running compiled python to generate posix vars: ... gcc -pthread -shared -Wl,-rpath=/home/halfcoder/.local/lib -fprofile-generate -Wl,--no-as-needed -o libpython3.so -Wl,-hlibpython3.so libpython3.6m.so gcc -pthread -Wl,-rpath=/home/halfcoder/.local/lib -fprofile-generate -Xlinker -export-dynamic -o python Programs/python.o -L. -lpython3.6m -lpthread -ldl -lutil -lm LD_LIBRARY_PATH=/home/halfcoder/.local/src/Python-3.6.0-optmiz ./python -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi ./python: symbol lookup error: ./python: undefined symbol: __gcov_indirect_call_profiler generate-posix-vars failed make[2]: *** [pybuilddir.txt] Error 1 make[2]: Leaving directory `/home/halfcoder/.local/src/Python-3.6.0-optmiz' make[1]: *** [build_all_generate_profile] Error 2 make[1]: Leaving directory `/home/halfcoder/.local/src/Python-3.6.0-optmiz' make: *** [profile-opt] Error 2 gcc information below: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux Thread model: posix gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ---------- components: Build messages: 288898 nosy: halfcoder priority: normal severity: normal status: open title: --enable-optimizations does not work with --enbale-shared versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 10:58:44 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 03 Mar 2017 15:58:44 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1488556724.94.0.529955057417.issue29710@psf.upfronthosting.co.za> Mark Dickinson added the comment: > This sentence isn't correct now that integers are always arbitrary length. It's not really clear what that line in the docs means for Python 2, either: if values x and y both fit in an int, then so do ~x, x|y and x&y. We already assume in the Python source that the underlying representation is two's complement (no padding bits, no trap representation, etc.), so there aren't any complications from platforms where the C representation is ones' complement or sign-magnitude. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 11:04:44 2017 From: report at bugs.python.org (dagnam) Date: Fri, 03 Mar 2017 16:04:44 +0000 Subject: [issue29713] String changes whether or not '\x81' is present Message-ID: <1488557084.0.0.892901950688.issue29713@psf.upfronthosting.co.za> New submission from dagnam: print '\xa3\xb5\xdd\xf7\xa9\xa7\xab\xd8\xef\xc7\xac\xf4\xfb\xb7' #gives ?????????????? print '\xa3\xb5\xdd\xf7\xa9\xa7\xab\xd8\xef\xc7\xac\xf4\xfb\xb7\x81' #gives ?????????????? print '\x81\xa3' print '\xa3' ?? ? ---------- messages: 288900 nosy: dagnam priority: normal severity: normal status: open title: String changes whether or not '\x81' is present type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 11:13:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 16:13:42 +0000 Subject: [issue29712] --enable-optimizations does not work with --enable-shared In-Reply-To: <1488555923.14.0.550158164587.issue29712@psf.upfronthosting.co.za> Message-ID: <1488557622.93.0.999009920324.issue29712@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: --enable-optimizations does not work with --enbale-shared -> --enable-optimizations does not work with --enable-shared _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 11:23:12 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 03 Mar 2017 16:23:12 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1488558192.04.0.733020311374.issue29710@psf.upfronthosting.co.za> Mark Dickinson added the comment: > It's not really clear what that line in the docs means for Python 2, either Ah, I guess it still kinda sorta applies for the left-shift operator, though even then, Python has promoted the result to long for many versions now. So the only "overflow" that's really relevant on Python 2 is "overflow" from int to long in the case of left shift. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 11:25:32 2017 From: report at bugs.python.org (David E. Franco G.) Date: Fri, 03 Mar 2017 16:25:32 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1488558332.81.0.931285382809.issue29706@psf.upfronthosting.co.za> David E. Franco G. added the comment: >I presume you would like 'async' and 'await' highlighted as keywords. Yes. Some others tools like IPython and the Spider IDE that come with the Anaconda package already highlighted them as keywords, even if you can use them as normal variables. >The test is to run colorizer.py as main module (python -m >idlelib.colorize, or F5 in IDLE editor). Click 'Test' button and check >that 'async' and 'await' have same color as other keywords. This >cannot affect anything in test suite; colorizer is only used by >turtledemo, which is not tested, and which will not notice anyway. super, what I have to do to put the patch so I can test it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 12:17:36 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 03 Mar 2017 17:17:36 +0000 Subject: [issue29713] String changes whether or not '\x81' is present In-Reply-To: <1488557084.0.0.892901950688.issue29713@psf.upfronthosting.co.za> Message-ID: <1488561456.37.0.669995098928.issue29713@psf.upfronthosting.co.za> R. David Murray added the comment: It works fine for me. If I write the data to a file (using print) and look at it with vi, I see your expected string with <81> on the end. It also works fine in my console (which otherwise produces mostly unknown character glyphs; I'm using a utf8 locale) if I use unicode, or python3. So, the problem is not with python, it must be your terminal emulator or whatever else it is you are using to inspect the results. ---------- nosy: +r.david.murray resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 12:22:12 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Mar 2017 17:22:12 +0000 Subject: [issue29623] configparser.ConfigParser.read() does not accept Pathlib path as a single argument. In-Reply-To: <1487789335.63.0.00643279339965.issue29623@psf.upfronthosting.co.za> Message-ID: <1488561732.73.0.0613665182927.issue29623@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +358 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 12:26:38 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Mar 2017 17:26:38 +0000 Subject: [issue29026] time.time() documentation should mention UTC timezone In-Reply-To: <1482243889.09.0.538886851254.issue29026@psf.upfronthosting.co.za> Message-ID: <1488561998.86.0.652284560209.issue29026@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi, does this need backport to 2.7? I'm getting a lot of conflicts while trying to do that... Not sure how to proceed. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 12:43:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 17:43:47 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1488563027.39.0.364654132543.issue29636@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The discussion is scattered between different tracker issues and pull requests. Let continue it in one place. I don't think we should add too much options for controlling any little detail. json.tools is just small utility purposed mainly for debugging. If you need to control more details, it is not hard to write simple Python script. For example, for "compact" output: $ python3 -c "import sys, json; json.dump(json.load(sys.stdin), sys.stdout, separators=(',', ':'))" ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 12:46:02 2017 From: report at bugs.python.org (Andrew Nester) Date: Fri, 03 Mar 2017 17:46:02 +0000 Subject: [issue29657] os.symlink: FileExistsError shows wrong message In-Reply-To: <1488099144.41.0.738429373533.issue29657@psf.upfronthosting.co.za> Message-ID: <1488563162.4.0.850337815376.issue29657@psf.upfronthosting.co.za> Andrew Nester added the comment: I've been investigating this issue and did not come up with some easy solution. So the problem is: os_symlink uses `path_error2` to throw exception. the order of file arguments now is src then dest. For provided example src is `a` and dest is `sym_link`. As a result `src` -> `dest` is generated here https://github.com/python/cpython/blob/master/Objects/exceptions.c#L1059 If we change order of arguments passed to `path_error2`, error message will be generated properly but OSError.filename will be incorrect (a_link instead of a) and following test will fail for `link`/`symlink` https://github.com/python/cpython/blob/master/Lib/test/test_os.py#L2901 Not sure if it's OK or not, so it definitely needs some input from Python core developers. ---------- nosy: +andrewnester _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 12:58:53 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Mar 2017 17:58:53 +0000 Subject: [issue29696] Use namedtuple in string.Formatter.parse iterator response In-Reply-To: <1488468843.51.0.704010418399.issue29696@psf.upfronthosting.co.za> Message-ID: <1488563933.17.0.00103440593645.issue29696@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would also rather see string.py left light weight. It would be better to change the upstream C code to use structseq. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 13:00:40 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Mar 2017 18:00:40 +0000 Subject: [issue29709] Short-circuiting not only on False and True In-Reply-To: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> Message-ID: <1488564040.32.0.866732242156.issue29709@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Mariatta, would you like to fix this one (False -> false and True -> true). ---------- assignee: docs at python -> Mariatta nosy: +Mariatta, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 13:09:30 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Mar 2017 18:09:30 +0000 Subject: [issue29709] Short-circuiting not only on False and True In-Reply-To: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> Message-ID: <1488564570.85.0.466960234833.issue29709@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +359 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 13:14:56 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Mar 2017 18:14:56 +0000 Subject: [issue29709] Short-circuiting not only on False and True In-Reply-To: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> Message-ID: <1488564896.17.0.639167671331.issue29709@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks, Raymond. I made the PR :) I can backport to 2.7, 3.5, and 3.6 once it's accepted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 13:25:22 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 03 Mar 2017 18:25:22 +0000 Subject: [issue29623] configparser.ConfigParser.read() does not accept Pathlib path as a single argument. In-Reply-To: <1487789335.63.0.00643279339965.issue29623@psf.upfronthosting.co.za> Message-ID: <1488565522.59.0.0559558654825.issue29623@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 13:44:02 2017 From: report at bugs.python.org (Eryk Sun) Date: Fri, 03 Mar 2017 18:44:02 +0000 Subject: [issue29702] Error 0x80070003: Failed to launch elevated child process In-Reply-To: <1488491344.75.0.39896878007.issue29702@psf.upfronthosting.co.za> Message-ID: <1488566642.71.0.681832493807.issue29702@psf.upfronthosting.co.za> Eryk Sun added the comment: When run directly from the temp directory path that's reported in the log, does the new log say that the installer is trying to run python-3.5.3-amd64.exe from that same path, or is it trying to run it from a new directory? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 13:56:03 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 03 Mar 2017 18:56:03 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1488567363.03.0.453784121311.issue28261@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -0 The new code looks awful, and in the case of the itertools module, these are messages that users are unlikely to see (the methods are typically only called by pickle, and pickling itself is rare for itertools). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 14:04:56 2017 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 03 Mar 2017 19:04:56 +0000 Subject: [issue29711] When you use stop_serving in proactor loop it's kill all listening servers In-Reply-To: <1488552886.51.0.862043273037.issue29711@psf.upfronthosting.co.za> Message-ID: <1488567896.76.0.74782952797.issue29711@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 14:05:28 2017 From: report at bugs.python.org (Nick Huber) Date: Fri, 03 Mar 2017 19:05:28 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier Message-ID: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> New submission from Nick Huber: Python 3.6.0 (default, Mar 3 2017, 00:15:36) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> b'a\x00%i' % 1 Traceback (most recent call last): File "", line 1, in TypeError: not all arguments converted during bytes formatting >>> b'a%i' % 1 b'a1' >>> b'a%i\x00' % 1 b'a1\x00' On python3.5, this works in all the scenarios Python 3.5.1 (default, Jan 14 2017, 03:58:20) [GCC 4.9.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> b'a\x00%i' % 1 b'a\x001' >>> b'a%i' % 1 b'a1' >>> b'a%i\x00' % 1 b'a1\x00' ---------- components: Interpreter Core messages: 288912 nosy: Nick Huber priority: normal severity: normal status: open title: can't interpolate byte string with \x00 before replacement identifier versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 14:06:42 2017 From: report at bugs.python.org (Anish Shah) Date: Fri, 03 Mar 2017 19:06:42 +0000 Subject: [issue26187] sqlite3 trace callback prints duplicate line In-Reply-To: <1453577672.38.0.77226221379.issue26187@psf.upfronthosting.co.za> Message-ID: <1488568002.45.0.389338812047.issue26187@psf.upfronthosting.co.za> Anish Shah added the comment: I can work on this. ---------- nosy: +anish.shah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 14:14:03 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 03 Mar 2017 19:14:03 +0000 Subject: [issue29697] Wrong ECDH configuration with OpenSSL 1.1 In-Reply-To: <1488471502.97.0.24501918149.issue29697@psf.upfronthosting.co.za> Message-ID: <1488568443.68.0.658830778035.issue29697@psf.upfronthosting.co.za> Ned Deily added the comment: Since the PRs have been merged, can this issue be closed now? ---------- nosy: +dstufft, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 14:15:13 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 03 Mar 2017 19:15:13 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1488568513.05.0.125575073712.issue29703@psf.upfronthosting.co.za> Ned Deily added the comment: With the PRs merged, can this issue be closed now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 14:15:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 19:15:41 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> Message-ID: <1488568541.69.0.442569263264.issue29714@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could this be due to using _PyBytesWriter? ---------- keywords: +3.6regression nosy: +haypo, serhiy.storchaka stage: -> needs patch type: -> behavior versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 14:18:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 19:18:57 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1488568737.08.0.345592453005.issue28261@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Would it look less awful if remove "xxxxxx.__setstate__: "? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 14:20:13 2017 From: report at bugs.python.org (Daniel Himmelstein) Date: Fri, 03 Mar 2017 19:20:13 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1488568813.97.0.565121589745.issue29636@psf.upfronthosting.co.za> Daniel Himmelstein added the comment: To recap the discussion from https://git.io/vyCY8: there are three potential mutually exclusive command line options that have been suggested. There are as follows. ```python import json obj = [1, 2] print('--indent=4') print(json.dumps(obj, indent=4)) print('--no-indent') print(json.dumps(obj, indent=None)) print('--compact') print(json.dumps(obj, separators=(',', ':'))) ``` which produces the following output: ``` --indent=4 [ 1, 2 ] --no-indent [1, 2] --compact [1,2] ``` Currently, https://github.com/python/cpython/pull/345 has implemented --indent and --no-indent. One suggestion was to replace --no-indent with --compact, but that would prevent json.tool from outputting YAML < 1.2 compatible JSON. Therefore, the main question is whether to add --compact or not? There is a clear use case for --compact. However, it requires a bit more "logic" as there is no `compact` argument in json.dump. Therefore @serhiy.storchaka suggests not adding --compact to keep json.tool lightweight. I disagree that json.tool is "mainly for debugging". I encounter lot's of applications were JSON needs to be reformatted, so I see json.tool as a cross-platform command line utility. However, I am more concerned that the JSON API may change, especially with respect to the compact encoding (see http://bugs.python.org/issue29540). Therefore, it seems prudent to let the API evolve and later revisit whether a --compact argument makes sense. The danger of adding --compact now would be if json.dump adopts an argument for --compact that is not compact. Then aligning the json.tool and json.dump terminology could require backwards incompatible changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 14:21:10 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 03 Mar 2017 19:21:10 +0000 Subject: [issue29697] Wrong ECDH configuration with OpenSSL 1.1 In-Reply-To: <1488471502.97.0.24501918149.issue29697@psf.upfronthosting.co.za> Message-ID: <1488568870.96.0.0886824732184.issue29697@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 14:28:23 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 19:28:23 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1488569303.97.0.134348254174.issue29703@psf.upfronthosting.co.za> Yury Selivanov added the comment: Yes, closing the issue. Thanks, Ned! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 14:39:04 2017 From: report at bugs.python.org (Anish Shah) Date: Fri, 03 Mar 2017 19:39:04 +0000 Subject: [issue26187] sqlite3 trace callback prints duplicate line In-Reply-To: <1453577672.38.0.77226221379.issue26187@psf.upfronthosting.co.za> Message-ID: <1488569944.2.0.953594711284.issue26187@psf.upfronthosting.co.za> Changes by Anish Shah : ---------- pull_requests: +360 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 15:20:36 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Mar 2017 20:20:36 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1488572436.6.0.717868992422.issue29706@psf.upfronthosting.co.za> Terry J. Reedy added the comment: David, the easiest thing to do would be to copy and paste the following + ['async', 'await'] into this line of colorizer.py (ColorDelegator.py in 3.5) kw = r"\b" + any("KEYWORD", keyword.kwlist) + r"\b" about line 17, to get kw = r"\b" + any("KEYWORD", keyword.kwlist + ['async', 'await']) + r"\b" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 15:21:40 2017 From: report at bugs.python.org (Rishav Kumar) Date: Fri, 03 Mar 2017 20:21:40 +0000 Subject: [issue29471] AST: add an attribute to FunctionDef to distinguish functions from generators and coroutines In-Reply-To: <1486458539.58.0.744778606798.issue29471@psf.upfronthosting.co.za> Message-ID: <1488572500.63.0.773272753533.issue29471@psf.upfronthosting.co.za> Rishav Kumar added the comment: I'd like to work on this issue. ---------- nosy: +aptrishu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 15:24:29 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 03 Mar 2017 20:24:29 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1488572669.78.0.25130510728.issue29116@psf.upfronthosting.co.za> Ned Deily added the comment: I'm removing myself as assignee as this doesn't seem to need a 3.6 RM decision at this point. If necessary, we can discuss a 3.6 backport after the issue has been resolved for 3.7. ---------- assignee: ned.deily -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 15:34:14 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 03 Mar 2017 20:34:14 +0000 Subject: [issue29076] Mac installer shell updater script silently fails if default shell is fish In-Reply-To: <1482778000.76.0.584407589583.issue29076@psf.upfronthosting.co.za> Message-ID: <1488573254.11.0.320802286763.issue29076@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- stage: -> needs patch title: Py 3.6 Mac installer doesn't update "python3" shell command -> Mac installer shell updater script silently fails if default shell is fish versions: +Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 15:37:32 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Mar 2017 20:37:32 +0000 Subject: [issue29688] Document Path.absolute In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1488573452.44.0.669016631657.issue29688@psf.upfronthosting.co.za> Brett Cannon added the comment: As brought up on the PR, it turns out Path.absolute() is extremely under-tested. Perhaps we should deprecate Path.absolute() instead of document it and properly test it (and the testing will be necessary to move forward with the documentation)? Path.resolve() handles absolute paths already while also resolving '.' and '..': https://docs.python.org/3/library/pathlib.html#pathlib.Path.resolve. It also works with non-existent paths so unless there's some performance issue I'm not aware of for resolving '.' and '..', then I say we deprecate Path.absolute(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 15:40:04 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 03 Mar 2017 20:40:04 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1488573604.65.0.528076032399.issue29572@psf.upfronthosting.co.za> Ned Deily added the comment: Steve, Zach: can we get this in for 3.6.1? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 15:44:01 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 03 Mar 2017 20:44:01 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1488573841.58.0.286291666819.issue29572@psf.upfronthosting.co.za> Zachary Ware added the comment: Yes*. ---------- assignee: christian.heimes -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 15:46:14 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Mar 2017 20:46:14 +0000 Subject: [issue29455] Mention coverage.py in trace module documentation In-Reply-To: <1486352347.76.0.0578982981399.issue29455@psf.upfronthosting.co.za> Message-ID: <1488573974.77.0.098661498809.issue29455@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- pull_requests: +361 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 15:52:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 20:52:20 +0000 Subject: [issue29402] Problem with Checkbutton and duplicate last name components In-Reply-To: <1485898494.74.0.656128703551.issue29402@psf.upfronthosting.co.za> Message-ID: <1488574340.47.0.328303525828.issue29402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a sample patch that makes implicit variables for checkbuttons unique. This is one of ways to solve this issue. But I'm not sure that this issue needs to be solved at all. In real applications Checkbutton() is called with the variable argument, otherwise it would be not very useful. Only sample code can call Checkbutton() without the variable argument. ---------- keywords: +patch stage: test needed -> patch review Added file: http://bugs.python.org/file46696/tkinter-checkbutton-unique-variables.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:01:05 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Mar 2017 21:01:05 +0000 Subject: [issue29455] Mention coverage.py in trace module documentation In-Reply-To: <1486352347.76.0.0578982981399.issue29455@psf.upfronthosting.co.za> Message-ID: <1488574865.66.0.672110219147.issue29455@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the PR, Marco! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:04:44 2017 From: report at bugs.python.org (Armen Levonian) Date: Fri, 03 Mar 2017 21:04:44 +0000 Subject: [issue29702] Error 0x80070003: Failed to launch elevated child process In-Reply-To: <1488566642.71.0.681832493807.issue29702@psf.upfronthosting.co.za> Message-ID: <451963885.644311.1488574840247@mail.yahoo.com> Armen Levonian added the comment: If I close the failure to run dialog, the temp directory is also destroyed, thus getting rid of the temp executable, however, while the fail dialog is up and I travel to where it says it fails to run the executable, it then yet creates another temp guid directory and logs a failure as unable to run from the thing it just created.So I can recursively launch and fail. I don't understand why it wants to run another executable that is itself when it is already running it. From: Eryk Sun To: alevonian at yahoo.com Sent: Friday, March 3, 2017 10:44 AM Subject: [issue29702] Error 0x80070003: Failed to launch elevated child process Eryk Sun added the comment: When run directly from the temp directory path that's reported in the log, does the new log say that the installer is trying to run python-3.5.3-amd64.exe from that same path, or is it trying to run it from a new directory? ---------- _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:07:15 2017 From: report at bugs.python.org (Max Rothman) Date: Fri, 03 Mar 2017 21:07:15 +0000 Subject: [issue29715] Arparse improperly handles "-_" Message-ID: <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za> New submission from Max Rothman: In the case detailed below, argparse.ArgumentParser improperly parses the argument string "-_": ``` import argparse parser = argparse.ArgumentParser() parser.add_argument('first') print(parser.parse_args(['-_'])) ``` Expected behavior: prints Namespace(first='-_') Actual behavior: prints usage message The issue seems to be specific to the string "-_". Either character alone or both in the opposite order does not trigger the issue. ---------- components: Library (Lib) messages: 288929 nosy: Max Rothman priority: normal severity: normal status: open title: Arparse improperly handles "-_" type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:16:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Mar 2017 21:16:16 +0000 Subject: [issue29645] webbrowser module import has heavy side effects In-Reply-To: <1488014818.45.0.347439137836.issue29645@psf.upfronthosting.co.za> Message-ID: <1488575776.07.0.040442107321.issue29645@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This will help IDLE startup (though webbrowser should not be imported on windows, where os.startfile is used instead). This is a somewhat separate issue, but should the Windows code be modified for Win10 and Microsoft Edge? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:17:05 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Mar 2017 21:17:05 +0000 Subject: [issue29688] Document Path.absolute In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1488575825.79.0.847152292248.issue29688@psf.upfronthosting.co.za> Brett Cannon added the comment: I've closed the PR on GitHub until we decide whether we just want to deprecate Path.absolute() in favour of Path.resolve(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:18:25 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Mar 2017 21:18:25 +0000 Subject: [issue29649] struct.pack_into check boundary error message ignores offset In-Reply-To: <1488030784.09.0.674246877605.issue29649@psf.upfronthosting.co.za> Message-ID: <1488575905.37.0.230725383489.issue29649@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> patch review title: struct.pack_into check boundary error message didn't respect offset -> struct.pack_into check boundary error message ignores offset type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:20:32 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 21:20:32 +0000 Subject: [issue29688] Document Path.absolute In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1488576032.39.0.190884638875.issue29688@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:21:09 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Mar 2017 21:21:09 +0000 Subject: [issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs In-Reply-To: <1488051927.22.0.367579438822.issue29651@psf.upfronthosting.co.za> Message-ID: <1488576069.75.0.0138928634948.issue29651@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +orsenthil stage: -> needs patch versions: -Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:22:17 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Mar 2017 21:22:17 +0000 Subject: [issue29709] Short-circuiting not only on False and True In-Reply-To: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> Message-ID: <1488576137.09.0.556058521659.issue29709@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +362 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:22:53 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Mar 2017 21:22:53 +0000 Subject: [issue29709] Short-circuiting not only on False and True In-Reply-To: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> Message-ID: <1488576173.14.0.935306183039.issue29709@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +363 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:23:34 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Mar 2017 21:23:34 +0000 Subject: [issue29709] Short-circuiting not only on False and True In-Reply-To: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> Message-ID: <1488576214.27.0.569162240799.issue29709@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +364 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:25:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Mar 2017 21:25:34 +0000 Subject: [issue29656] Change "make patchcheck" to be branch aware In-Reply-To: <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za> Message-ID: <1488576334.39.0.447853185317.issue29656@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> patch review versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:26:13 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Mar 2017 21:26:13 +0000 Subject: [issue26213] Document BUILD_*_UNPACK opcodes In-Reply-To: <1453851645.07.0.698993321818.issue26213@psf.upfronthosting.co.za> Message-ID: <1488576373.18.0.208807792046.issue26213@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: docs at python -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:26:26 2017 From: report at bugs.python.org (James O) Date: Fri, 03 Mar 2017 21:26:26 +0000 Subject: [issue29716] Python 3 Module doc still sounds like __init__.py is required Message-ID: <1488576386.83.0.924613404524.issue29716@psf.upfronthosting.co.za> New submission from James O: PEP 420 says "Allowing implicit namespace packages means that the requirement to provide an __init__.py file can be dropped completely..." (as described here: http://stackoverflow.com/questions/37139786/is-init-py-not-required-for-packages-in-python-3) The documentation for modules doesn't seem to reflect this change. My "enhancement suggestion" is that a sentence (and perhaps an example) be added that explicitly states or shows an import from another directory. (P.S. This is my first Python bug submission, so if it's silly, let me know. Thanks!) ---------- assignee: docs at python components: Documentation messages: 288932 nosy: James O, docs at python priority: normal severity: normal status: open title: Python 3 Module doc still sounds like __init__.py is required type: enhancement versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:27:06 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 21:27:06 +0000 Subject: [issue29471] AST: add an attribute to FunctionDef to distinguish functions from generators and coroutines In-Reply-To: <1486458539.58.0.744778606798.issue29471@psf.upfronthosting.co.za> Message-ID: <1488576426.67.0.364344991842.issue29471@psf.upfronthosting.co.za> Yury Selivanov added the comment: I'm not sure we need this feature TBH. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:27:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Mar 2017 21:27:32 +0000 Subject: [issue29657] os.symlink: FileExistsError shows wrong message In-Reply-To: <1488099144.41.0.738429373533.issue29657@psf.upfronthosting.co.za> Message-ID: <1488576452.7.0.841497361618.issue29657@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:36:46 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Mar 2017 21:36:46 +0000 Subject: [issue29709] Short-circuiting not only on False and True In-Reply-To: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> Message-ID: <1488577006.72.0.52433179549.issue29709@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Committed and backported to 2.7, 3.5, and 3.6. Thanks all :) ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:42:58 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 03 Mar 2017 21:42:58 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1488577378.65.0.82593219287.issue29572@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- pull_requests: +365 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:44:26 2017 From: report at bugs.python.org (David E. Franco G.) Date: Fri, 03 Mar 2017 21:44:26 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1488577466.62.0.782063607847.issue29706@psf.upfronthosting.co.za> David E. Franco G. added the comment: Ok, Done. that work in both 3.5 and 3.6 I also did the python -m idlelib.ColorDelegator and python -m idlelib.colorizer and they turn ok I also open those modules in their respective idle and run them, ColorDelegator work ok but colorizer throw me this error Traceback (most recent call last): File "C:\Anaconda3\Lib\idlelib\colorizer.py", line 279, in verbosity=2, exit=False) File "C:\Anaconda3\lib\unittest\main.py", line 63, in __init__ self.module = __import__(module) File "C:\Anaconda3\lib\idlelib\idle_test\test_colorizer.py", line 8, in from test.support import requires ImportError: bad magic number in 'test': b'\x03\xf3\r\n' >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:45:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Mar 2017 21:45:10 +0000 Subject: [issue29657] os.symlink: FileExistsError shows wrong message In-Reply-To: <1488099144.41.0.738429373533.issue29657@psf.upfronthosting.co.za> Message-ID: <1488577510.15.0.427729064427.issue29657@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The current error message looks good to me. What is wrong with it? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:55:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Mar 2017 21:55:28 +0000 Subject: [issue29659] Expose the `length` arg from shutil.copyfileobj for public use In-Reply-To: <1488157044.73.0.933925559387.issue29659@psf.upfronthosting.co.za> Message-ID: <1488578128.25.0.346371443751.issue29659@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy stage: -> test needed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:55:54 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Mar 2017 21:55:54 +0000 Subject: [issue26213] Document BUILD_*_UNPACK opcodes In-Reply-To: <1453851645.07.0.698993321818.issue26213@psf.upfronthosting.co.za> Message-ID: <1488578154.35.0.835640470887.issue26213@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- pull_requests: +366 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:56:31 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Mar 2017 21:56:31 +0000 Subject: [issue26213] Document BUILD_*_UNPACK opcodes In-Reply-To: <1453851645.07.0.698993321818.issue26213@psf.upfronthosting.co.za> Message-ID: <1488578191.29.0.978508999976.issue26213@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- pull_requests: +367 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 16:58:51 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Mar 2017 21:58:51 +0000 Subject: [issue29670] argparse: does not respect required args pre-populated into namespace In-Reply-To: <1488227590.23.0.0462095560451.issue29670@psf.upfronthosting.co.za> Message-ID: <1488578331.18.0.845565905292.issue29670@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Can you test on 3.6? This might have been fixed and not back-ported. ---------- nosy: +bethard, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 17:01:10 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 03 Mar 2017 22:01:10 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1488578470.3.0.569616353957.issue29572@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- pull_requests: +368 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 17:02:22 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 03 Mar 2017 22:02:22 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1488578542.47.0.848378972801.issue29572@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- pull_requests: +369 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 17:02:57 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 03 Mar 2017 22:02:57 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1488578577.32.0.0567907088267.issue29572@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- pull_requests: +370 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 17:09:56 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 03 Mar 2017 22:09:56 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1488578996.29.0.139429123432.issue29572@psf.upfronthosting.co.za> Zachary Ware added the comment: Done on Windows except for PR444 for 2.7, which is waiting on Travis. ---------- assignee: -> ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 17:24:55 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 03 Mar 2017 22:24:55 +0000 Subject: [issue29715] Arparse improperly handles "-_" In-Reply-To: <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za> Message-ID: <1488579895.02.0.895448165784.issue29715@psf.upfronthosting.co.za> R. David Murray added the comment: Have you tried '-' plus any other character? argparse treats '-' and '--' specially, and this is a known issue. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 17:32:49 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Mar 2017 22:32:49 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1488580369.49.0.290686830524.issue29706@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If 'import test' fails that way, then there is a problem either with Anaconda or your installation. You might try deleting .../Lib/test/__pycache__/__init__*.pyc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 17:33:57 2017 From: report at bugs.python.org (Vahid Mardani) Date: Fri, 03 Mar 2017 22:33:57 +0000 Subject: [issue29717] `loop.add_reader` and `< New submission from Vahid Mardani: Assume this simple script for reading from stdin: ```python #! /usr/bin/env python3 import sys import os import asyncio async def main(loop): done = False fileno = sys.stdin.fileno() def _reader(): nonlocal done chunk = os.read(fileno, 1024) if not chunk: loop.remove_reader(fileno) done = True return print(chunk.decode(), end='') loop.add_reader(fileno, _reader) while not done: await asyncio.sleep(1) if __name__ == '__main__': main_loop = asyncio.get_event_loop() main_loop.run_until_complete(main(main_loop)) ``` When I run it by: ```bash $ ./stdin_issue.py < hello > EOF ``` I get: ``` Traceback (most recent call last): File "/usr/lib/python3.5/asyncio/selector_events.py", line 234, in add_reader key = self._selector.get_key(fd) File "/usr/lib/python3.5/selectors.py", line 191, in get_key raise KeyError("{!r} is not registered".format(fileobj)) from None KeyError: '0 is not registered' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "./stdin_issue.py", line 41, in main_loop.run_until_complete(main(main_loop)) File "/usr/lib/python3.5/asyncio/base_events.py", line 387, in run_until_complete return future.result() File "/usr/lib/python3.5/asyncio/futures.py", line 274, in result raise self._exception File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step result = coro.send(None) File "./stdin_issue.py", line 34, in main loop.add_reader(fileno, _reader) File "/usr/lib/python3.5/asyncio/selector_events.py", line 237, in add_reader (handle, None)) File "/usr/lib/python3.5/selectors.py", line 411, in register self._epoll.register(key.fd, epoll_events) PermissionError: [Errno 1] Operation not permitted ``` But the: ```bash echo "Hello" | ./stdin_issue.py ``` Is working well. I was already tried this with the `select.select` directly, and it working: ``` def using_select(): files = [sys.stdin.fileno()] while True: readables, _, errors = select(files, [], files) if errors: print('ERROR:', errors) return if readables: for f in readables: chunk = os.read(f, 1024) if not chunk: return print(chunk.decode(), end='') ``` ---------- components: asyncio messages: 288941 nosy: gvanrossum, vahid.mardani, yselivanov priority: normal severity: normal status: open title: `loop.add_reader` and `< _______________________________________ From report at bugs.python.org Fri Mar 3 17:40:43 2017 From: report at bugs.python.org (Rishav Kumar) Date: Fri, 03 Mar 2017 22:40:43 +0000 Subject: [issue29454] Shutting down consumer on a remote queue In-Reply-To: <1486311518.72.0.101525789296.issue29454@psf.upfronthosting.co.za> Message-ID: <1488580843.07.0.716001246086.issue29454@psf.upfronthosting.co.za> Rishav Kumar added the comment: I'd like to work on this issue. ---------- nosy: +aptrishu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 17:48:42 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Mar 2017 22:48:42 +0000 Subject: [issue26213] Document BUILD_*_UNPACK opcodes In-Reply-To: <1453851645.07.0.698993321818.issue26213@psf.upfronthosting.co.za> Message-ID: <1488581322.81.0.463602664419.issue26213@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks to Ivan for the PRs! ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 18:07:04 2017 From: report at bugs.python.org (Glenn Linderman) Date: Fri, 03 Mar 2017 23:07:04 +0000 Subject: [issue29654] SimpleHTTPRequestHandler should support browser cache In-Reply-To: <1488057635.77.0.128841709763.issue29654@psf.upfronthosting.co.za> Message-ID: <1488582424.35.0.520700157049.issue29654@psf.upfronthosting.co.za> Changes by Glenn Linderman : ---------- nosy: +v+python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 18:10:28 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 23:10:28 +0000 Subject: [issue29271] Task.current_task(None) returns unexpected result In-Reply-To: <1484345484.86.0.127501941011.issue29271@psf.upfronthosting.co.za> Message-ID: <1488582628.55.0.552004444315.issue29271@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 18:10:38 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 23:10:38 +0000 Subject: [issue28893] Make sure exceptions raised in __aiter__ are properly chained in ceval In-Reply-To: <1481085693.53.0.293766364883.issue28893@psf.upfronthosting.co.za> Message-ID: <1488582638.78.0.01922761312.issue28893@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 18:11:51 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 23:11:51 +0000 Subject: [issue24329] __qualname__ and __slots__ In-Reply-To: <1432930157.09.0.507147768187.issue24329@psf.upfronthosting.co.za> Message-ID: <1488582711.53.0.619974031982.issue24329@psf.upfronthosting.co.za> Yury Selivanov added the comment: Xiang, can you make a PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 18:12:12 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 23:12:12 +0000 Subject: [issue24329] __qualname__ and __slots__ In-Reply-To: <1432930157.09.0.507147768187.issue24329@psf.upfronthosting.co.za> Message-ID: <1488582732.36.0.517016407317.issue24329@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 18:12:44 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 23:12:44 +0000 Subject: [issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes In-Reply-To: <1488493463.16.0.114641402405.issue29704@psf.upfronthosting.co.za> Message-ID: <1488582764.39.0.190809161598.issue29704@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 18:12:56 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 03 Mar 2017 23:12:56 +0000 Subject: [issue28963] Use-after-free in _asyncio_Future_remove_done_callback() of _asynciomodule.c In-Reply-To: <1481657201.46.0.37032067172.issue28963@psf.upfronthosting.co.za> Message-ID: <1488582776.12.0.795040281721.issue28963@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 18:25:45 2017 From: report at bugs.python.org (Nikolay Kim) Date: Fri, 03 Mar 2017 23:25:45 +0000 Subject: [issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers In-Reply-To: <1485909545.04.0.650924943503.issue29406@psf.upfronthosting.co.za> Message-ID: <1488583545.24.0.789166079488.issue29406@psf.upfronthosting.co.za> Changes by Nikolay Kim : ---------- pull_requests: +371 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 18:34:18 2017 From: report at bugs.python.org (David E. Franco G.) Date: Fri, 03 Mar 2017 23:34:18 +0000 Subject: [issue29706] IDLE needs syntax highlighting for async and await In-Reply-To: <1488512637.52.0.156111675331.issue29706@psf.upfronthosting.co.za> Message-ID: <1488584058.23.0.0615676857445.issue29706@psf.upfronthosting.co.za> David E. Franco G. added the comment: I found the problem, it was a test.pyc file that was in my personal folder... once deleted it work perfect the build-in test module should have some other name... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 19:32:46 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 04 Mar 2017 00:32:46 +0000 Subject: [issue29715] Arparse improperly handles "-_" In-Reply-To: <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za> Message-ID: <1488587566.96.0.430918757087.issue29715@psf.upfronthosting.co.za> Martin Panter added the comment: This is actually expected behaviour of the ?argparse?, as well as general Unix CLI programs. See the documentation . The general workaround is to use a double-dash separator: >>> parser.parse_args(['--', '-_']) Namespace(first='-_') Example with the Gnu ?rm? command: $ echo "make a file" >-_ $ rm -_ rm: invalid option -- '_' Try 'rm ./-_' to remove the file '-_'. Try 'rm --help' for more information. [Exit 1] $ rm -- -_ # Double dash also works Although I suppose the error message could be improved. Currently it looks like it ignores the argument: >>> parser.parse_args(['-_']) usage: [-h] first : error: the following arguments are required: first __main__.SystemExit: 2 ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 19:34:11 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Mar 2017 00:34:11 +0000 Subject: [issue26187] sqlite3 trace callback prints duplicate line In-Reply-To: <1453577672.38.0.77226221379.issue26187@psf.upfronthosting.co.za> Message-ID: <1488587651.53.0.411977712295.issue26187@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 22:21:11 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 04 Mar 2017 03:21:11 +0000 Subject: [issue29657] os.symlink: FileExistsError shows wrong message In-Reply-To: <1488099144.41.0.738429373533.issue29657@psf.upfronthosting.co.za> Message-ID: <1488597671.2.0.194140620558.issue29657@psf.upfronthosting.co.za> Eryk Sun added the comment: A symbolic link is typically represented the other way around, from the point of view of the link pointing at the target. However, Python conceptualizes linking as something like a copy or rename operation, with source and destination filenames, and the current error message represents this point of view. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 22:30:40 2017 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Sat, 04 Mar 2017 03:30:40 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1488598240.3.0.504140238257.issue29708@psf.upfronthosting.co.za> Bernhard M. Wiedemann added the comment: backports are optional. It can help reduce duplicated work for the various distributions. Currently, I think master and 2.7 are the most relevant targets. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 22:49:42 2017 From: report at bugs.python.org (Decorater) Date: Sat, 04 Mar 2017 03:49:42 +0000 Subject: [issue29718] Fixed compile on cygwin. Message-ID: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> New submission from Decorater: Cygwin had an issue with building and installing python after it was configured. The main issue was the TLS key stuff which would make python fail to fully build or work correctly. This issue contains a patch for cygwin specifically to make it compile and work fully. It uses the __CYGWIN__ macro for separating the code from this patch with the TLS code on the other targets. This should help fix issues that was present in the standard library and setup.py in the repo for cygwin as well. ---------- components: Build, Installation, Interpreter Core messages: 288949 nosy: Decorater priority: normal severity: normal status: open title: Fixed compile on cygwin. versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 22:50:18 2017 From: report at bugs.python.org (Decorater) Date: Sat, 04 Mar 2017 03:50:18 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488599418.79.0.837306998362.issue29718@psf.upfronthosting.co.za> Changes by Decorater : ---------- keywords: +patch Added file: http://bugs.python.org/file46697/cygwin_build.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 22:56:07 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Mar 2017 03:56:07 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488599767.25.0.971726546426.issue27593@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +372 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 22:58:48 2017 From: report at bugs.python.org (Decorater) Date: Sat, 04 Mar 2017 03:58:48 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488599928.04.0.792504669988.issue29718@psf.upfronthosting.co.za> Changes by Decorater : ---------- pull_requests: +373 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 23:12:15 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Mar 2017 04:12:15 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488600735.0.0.242706547333.issue27593@psf.upfronthosting.co.za> Ned Deily added the comment: I finally took a close look at this and I think the approach Brett advocated here is a bit too simple and does not cover the use case I had in mind when I suggested we needed to have a replacement for sys._mercurial. Previously when building from a source repo, if the repo was checked out to a tag (like a release tag, say, "v3.6.0"), that tag showed up in sys._mercurial and sys.version making it very easy to identify release builds. For example, with the macOS pythons we provide on python.org, you see versions like this: $ /usr/local/bin/python3.5 -c 'import sys;print(sys.version)' 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10: $ /usr/local/bin/python3.5 Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> ^D Having the tag, if available, is very important, IMO. Also, the original patch didn't deal with the platform module which also uses the SCM info. Since we've now made the transition to git, it seems to me there's no reason to complicate the code by trying to support either hg or git; we don't support svn anymore. So the PR is simpler and follows very much the hg support. I think this also means that Steve's PR for the Windows installer should be changed back to use tags again. I'd like to get this into 3.6.1 if possible. Better late than never! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 23:45:15 2017 From: report at bugs.python.org (INADA Naoki) Date: Sat, 04 Mar 2017 04:45:15 +0000 Subject: [issue29716] Python 3 Module doc still sounds like __init__.py is required In-Reply-To: Message-ID: INADA Naoki added the comment: namespace package is very advanced topic. I don't think tutorial should mention it. Putting __init__.py always in normal package is highly recommended. Otherwise, many tools can't distinguish normal directory and python package. 2017/03/04 ??6:26 "James O" : New submission from James O: PEP 420 says "Allowing implicit namespace packages means that the requirement to provide an __init__.py file can be dropped completely..." (as described here: http://stackoverflow.com/questions/37139786/is-init-py- not-required-for-packages-in-python-3) The documentation for modules doesn't seem to reflect this change. My "enhancement suggestion" is that a sentence (and perhaps an example) be added that explicitly states or shows an import from another directory. (P.S. This is my first Python bug submission, so if it's silly, let me know. Thanks!) ---------- assignee: docs at python components: Documentation messages: 288932 nosy: James O, docs at python priority: normal severity: normal status: open title: Python 3 Module doc still sounds like __init__.py is required type: enhancement versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ _______________________________________________ docs mailing list docs at python.org https://mail.python.org/mailman/listinfo/docs ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 23:52:45 2017 From: report at bugs.python.org (paul j3) Date: Sat, 04 Mar 2017 04:52:45 +0000 Subject: [issue29670] argparse: does not respect required args pre-populated into namespace In-Reply-To: <1488227590.23.0.0462095560451.issue29670@psf.upfronthosting.co.za> Message-ID: <1488603165.13.0.434201824791.issue29670@psf.upfronthosting.co.za> paul j3 added the comment: What issue might have changed this behavior? I'm not aware of any that were trying to change either the `seen_actions` and the 'required' tests, not any dealing with pre-existing values in Namespace. The current handling of defaults complicates respecting pre-existing values. Defaults are added to the namespace at the start of parsing (provided they aren't already present - that respects pre-existing values). At the end of parsing, the same block that tests for required actions also tests if the defaults in the Namespace need to be converted with the `type` function. So the code at the end of _parse_known_args has limited ability to distinguish between values in the Namespace that were preloaded, were loaded as defaults, or were loaded during parsing. I agree that _parse_known_args is complicated and difficult to customize. But it's been like that from the start. And the handling of defaults is also complicated (and made worse by the 'delayed evaluation' change some years ago). For another bug/issue I'd like to make seen_actions (or seen_non_default_actions) available to the user for testing. But that isn't easy in a backward compatible fashion. I think the best choice is to pre-load non-required Actions only. Preloading should be seen as an alternative way of setting defaults, not a way of getting around the 'required' test. And if that isn't enough, do some of your own 'required' tests after parsing. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 3 23:52:59 2017 From: report at bugs.python.org (James O) Date: Sat, 04 Mar 2017 04:52:59 +0000 Subject: [issue29716] Python 3 Module doc still sounds like __init__.py is required In-Reply-To: <1488576386.83.0.924613404524.issue29716@psf.upfronthosting.co.za> Message-ID: <1488603179.76.0.227500400722.issue29716@psf.upfronthosting.co.za> James O added the comment: Ah, I didn't realize some tools depended on it. Should I set the status to closed? (like I said, I'm new to this) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:00:52 2017 From: report at bugs.python.org (Decorater) Date: Sat, 04 Mar 2017 05:00:52 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488603652.46.0.0436675998299.issue29718@psf.upfronthosting.co.za> Changes by Decorater : Removed file: http://bugs.python.org/file46697/cygwin_build.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:01:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Mar 2017 05:01:21 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488603681.5.0.995626621997.issue29718@psf.upfronthosting.co.za> STINNER Victor added the comment: https://github.com/python/cpython/pull/324#issuecomment-283931430 @AraHaan: "By the way guys I will be working on cpython to work on some changes to a few things for cygwin to compile using the official cpython source code on 3.5, 3.6, and 3.7. (...)" Cygwin is not currently officially supported by CPython (or am I wrong?), so changes should only be made in Python 3.7 (master branch). I'm neutral on supporting Cygwin. In the meanwhile, you can prepare a CPython fork, and then come back with atomic commits as PR? Since I expect many changes, you may also discuss Cygwin support on python-dev. What is the current status of the Cygwin support? Is it possible to build Python using Cygwin? How many tests fail? To have an official support, we need an assigned developer and a buildbot: https://www.python.org/dev/peps/pep-0011/#supporting-platforms ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:05:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Mar 2017 05:05:24 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488603924.73.0.0845588312264.issue29718@psf.upfronthosting.co.za> STINNER Victor added the comment: +/* Define if pthread_key_t is compatible with int. */ +#undef PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT Is this change the implementation of the issue #25658? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:00:05 2017 From: report at bugs.python.org (Decorater) Date: Sat, 04 Mar 2017 05:00:05 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488603605.97.0.429067623034.issue29718@psf.upfronthosting.co.za> Changes by Decorater : Added file: http://bugs.python.org/file46698/cygwin_build.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:12:44 2017 From: report at bugs.python.org (Decorater) Date: Sat, 04 Mar 2017 05:12:44 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488604364.87.0.75572855165.issue29718@psf.upfronthosting.co.za> Decorater added the comment: Yes, it is because of the fact in Cygwin it will cause an compile Error when ints are involved forcing other methods to be put in place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:13:48 2017 From: report at bugs.python.org (Decorater) Date: Sat, 04 Mar 2017 05:13:48 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488604428.33.0.889592427468.issue29718@psf.upfronthosting.co.za> Decorater added the comment: For now I stuck it under cygwin only but it could easily move out to not only cygwin if desired. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:14:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 04 Mar 2017 05:14:23 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488604463.09.0.332154564061.issue29718@psf.upfronthosting.co.za> STINNER Victor added the comment: Please explain why you want to support Cygwin. Which Cygwin and Windows versions are you targetingW ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:15:17 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Mar 2017 05:15:17 +0000 Subject: [issue29651] Inconsistent/undocumented urlsplit/urlparse behavior on invalid inputs In-Reply-To: <1488051927.22.0.367579438822.issue29651@psf.upfronthosting.co.za> Message-ID: <1488604517.83.0.517873365453.issue29651@psf.upfronthosting.co.za> Raymond Hettinger added the comment: A note in the docs would be useful. This API is far too well established to make any behavioral changes at this point. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:20:37 2017 From: report at bugs.python.org (INADA Naoki) Date: Sat, 04 Mar 2017 05:20:37 +0000 Subject: [issue29716] Python 3 Module doc still sounds like __init__.py is required In-Reply-To: <1488603179.76.0.227500400722.issue29716@psf.upfronthosting.co.za> Message-ID: INADA Naoki added the comment: I think so. namespace package is topic for packaging ecosystem developers, like setuptools and pip. Normal python programmer shouldn't omit __init__.py. Python tutorial is for people who want to be normal python programmer. 2017/03/04 ??1:53 "James O" : > > James O added the comment: > > Ah, I didn't realize some tools depended on it. Should I set the status to > closed? (like I said, I'm new to this) > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:21:11 2017 From: report at bugs.python.org (Decorater) Date: Sat, 04 Mar 2017 05:21:11 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488604871.17.0.215982314251.issue29718@psf.upfronthosting.co.za> Decorater added the comment: I use cygwin to test things that I write in python to see if they work under linux without having to boot up into an linux VM to find out as it would be too slow to even do that with the computer I have. And besides cygwin makes all of this faster. The version of Cygwin I have is 2.877 (64 bit). Long story short this thing for a 64 bit computer is limited to only 2 CPU cores and 4 GB's of memory right now. All of that plays into why an VM would be too slow to even run or compile python (it would take forever to even open up the terminal). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:26:00 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Mar 2017 05:26:00 +0000 Subject: [issue29659] Expose the `length` arg from shutil.copyfileobj for public use In-Reply-To: <1488157044.73.0.933925559387.issue29659@psf.upfronthosting.co.za> Message-ID: <1488605160.65.0.506376740372.issue29659@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This seems reasonable to me. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:31:09 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 04 Mar 2017 05:31:09 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488605469.42.0.445843590199.issue27593@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: +374 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:31:30 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 04 Mar 2017 05:31:30 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488605490.25.0.975169906866.issue27593@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: +375 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:32:02 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 04 Mar 2017 05:32:02 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488605522.24.0.207485774406.issue27593@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: +376 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 00:50:30 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 04 Mar 2017 05:50:30 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488606630.18.0.512922353847.issue27593@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- pull_requests: +377 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 01:03:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Mar 2017 06:03:52 +0000 Subject: [issue29657] os.symlink: FileExistsError shows wrong message In-Reply-To: <1488099144.41.0.738429373533.issue29657@psf.upfronthosting.co.za> Message-ID: <1488607432.14.0.79265995051.issue29657@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is not about how a symbolic link is represented. This is about how the operation of creating a symbolic link is represented. The first filename is the first argument of os.symlink(), the second filename is the second argument. Try to run os.symlink('a', 'a_link') os.symlink('b', 'a_link') You should get an error: FileExistsError: [Errno 17] File exists: 'b' -> 'a_link' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 01:04:03 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Mar 2017 06:04:03 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488607443.76.0.327262494831.issue27593@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +378 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 01:21:53 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 04 Mar 2017 06:21:53 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488608513.53.0.558046779316.issue27593@psf.upfronthosting.co.za> Steve Dower added the comment: Here's some sample output with the change: C:\build\cpython36>PCbuild\win32\python_d.exe Python 3.6.0+ (3.6:95c50e5aed9e5683676e18349dd94b11901a66b3, Mar 4 2017, 06:08:54) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys._git ('CPython', '3.6', '95c50e5aed9e5683676e18349dd94b11901a66b3') I wonder whether we should shorten the revision hash for the copyright string? I think sys._git[2] should keep the whole output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 01:23:38 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 04 Mar 2017 06:23:38 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488608618.94.0.627603182084.issue27593@psf.upfronthosting.co.za> Steve Dower added the comment: copyright==>version string (sys.version) Also, that part is clearly not release blocking. My PR for 2.7 is waiting for Travis to catch up, so once that's done and Ned has finished his backports (or Larry and Ben have backported to their versions?) we can lower the priority on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 01:25:16 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Mar 2017 06:25:16 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488608716.91.0.078598500952.issue27593@psf.upfronthosting.co.za> Ned Deily added the comment: Yeah, shortening the hash in the version string might be nice. Feel free to do so. It can probably wait for 3.6.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 01:27:07 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 04 Mar 2017 06:27:07 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488608827.55.0.185687356363.issue27593@psf.upfronthosting.co.za> Steve Dower added the comment: GitHub trims to the first 7 characters. I see no harm in doing that for sys.version (but not tonight) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 01:33:44 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Mar 2017 06:33:44 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488609224.04.0.364233999267.issue27593@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +379 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 01:46:07 2017 From: report at bugs.python.org (Decorater) Date: Sat, 04 Mar 2017 06:46:07 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488609967.52.0.961048210662.issue29718@psf.upfronthosting.co.za> Decorater added the comment: Well then I am thinking about figuring out how to make an batch file under tools/buildbot to target cygwin building in windows. tbh windows 7 or newer on cygwin is fine with me. It is just that I need to figure out how to make it invoke Cygwin.bat and yet also somehow input everything it needs to the cygwin console for building and testing python. Feel free to let me know if anyone has an idea on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 01:48:18 2017 From: report at bugs.python.org (Decorater) Date: Sat, 04 Mar 2017 06:48:18 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488610098.66.0.504600014522.issue29718@psf.upfronthosting.co.za> Decorater added the comment: Also I just realized my Cygwin updated to 2.7.0 as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 02:11:57 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Mar 2017 07:11:57 +0000 Subject: [issue29701] Add close method to queue.Queue In-Reply-To: <1488485532.45.0.976459019786.issue29701@psf.upfronthosting.co.za> Message-ID: <1488611517.31.0.223161903373.issue29701@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Notes: ------ * Ruby has a Queue.close() method like the one being proposed here. There is also a ?closed() call for testing the status: https://ruby-doc.org/core-2.3.0/Queue.html * Java queues do not have a closing method: https://docs.oracle.com/javase/8/docs/api/java/util/AbstractQueue.html * This idea came up once for Python on StackOverflow. The was little interest and the OP selected his own answer. Concrete use cases were not discussed. http://stackoverflow.com/questions/3605188/communicating-end-of-queue * C# message queues have a close() method but it behaves much differently (it frees resources, doesn't raise exceptions, and will reacquire resources if used again). * The Bull project NodeJS accessing Redis has a close() method for queues. Its purpose is to perform a graceful shutdown of a remote service. There doesn't seem to be a parallel using for Python threads (though it might make sense for async). This use seems more akin to a connection.close() for databases. https://github.com/OptimalBits/bull#close Open Questions -------------- * Is try/except logic in a consumer preferable to the if-logic that would be used with a sentinel object. * What the right vehicle for communicating out-of-band information like a requests for a consumer to shutdown-when-queue-empty, shut-down-immediately, restart, clear, pause-consumption, or reset? Should there be a shared variable that consumers would monitor? Should the communication be through a message in the queue itself? Should there be a way to inject an exception much like a generator.throw()? * Do we have any concrete examples from real code that we could study to help inform the design decision? * If there are concrete use cases, are they common or rare? If it is rare, would it be better to use existing approaches (sending a messages through the queue, checking a shared variable after a timeout, having a second queue for control-flow information, etc). * How would a producer indicate a reduced need for consumers (I no longer need ten workers, only two will suffice)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 02:15:53 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Mar 2017 07:15:53 +0000 Subject: [issue29550] Mac build-installer touch step fails after github conversion In-Reply-To: <1487021086.07.0.216604793795.issue29550@psf.upfronthosting.co.za> Message-ID: <1488611753.61.0.303487188065.issue29550@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +380 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 02:33:03 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Mar 2017 07:33:03 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1488612783.08.0.786677199228.issue29572@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +381 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 02:34:29 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 04 Mar 2017 07:34:29 +0000 Subject: [issue29657] os.symlink: FileExistsError shows wrong message In-Reply-To: <1488099144.41.0.738429373533.issue29657@psf.upfronthosting.co.za> Message-ID: <1488612869.09.0.833163758679.issue29657@psf.upfronthosting.co.za> Eryk Sun added the comment: To me the error message is in the model of a source -> destination operation, in which the arrow indicates the operation's information flow (e.g. of the target path or inode number) from the source file to the destination file. I've never viewed it superficially as just an ordering of parameter1 -> parameter2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 02:34:42 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Mar 2017 07:34:42 +0000 Subject: [issue29701] Add close method to queue.Queue In-Reply-To: <1488485532.45.0.976459019786.issue29701@psf.upfronthosting.co.za> Message-ID: <1488612882.22.0.859238763681.issue29701@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Another Note ------------ * The current Python multiprocessing module version of Queue has a close() method. It isn't clear that use cases there are also applicable to plain queue module queues for threads. https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Queue.close ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 02:49:00 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Mar 2017 07:49:00 +0000 Subject: [issue29454] Shutting down consumer on a remote queue In-Reply-To: <1486311518.72.0.101525789296.issue29454@psf.upfronthosting.co.za> Message-ID: <1488613740.78.0.878695107316.issue29454@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Expected: items stay in the queue until a consumer consumes it That would be my expectation as well. Davin, do you know why the example in the docs uses queue.Queue() instead of multiprocessing.Queue()? Would there be a difference? Also, I'm curious about the best practice for message queues when a consumer is killed. Even if the message getting is atomic and never loses a message, what do people normally do to resurrect a task that was already underway when the consumer is killed? I presume there is no easy way to find-out whether the task had just started, was in-process and changed the state of the system, or mostly finished. Is there some sort of coding pattern for begin_transaction, commit, and rollback? ISTM, that killing consumers is a perilous business. The only reliable pattern I can think of is for the consumer to send back messages through another queue to indicate that a task was received and underway, and to indicate that a task was completed. ---------- assignee: -> davin nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 02:54:56 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Mar 2017 07:54:56 +0000 Subject: [issue29550] Mac build-installer touch step fails after github conversion In-Reply-To: <1487021086.07.0.216604793795.issue29550@psf.upfronthosting.co.za> Message-ID: <1488614096.37.0.366978907275.issue29550@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +382 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 03:04:35 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Mar 2017 08:04:35 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1488614675.88.0.818223416239.issue29572@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 04:06:50 2017 From: report at bugs.python.org (INADA Naoki) Date: Sat, 04 Mar 2017 09:06:50 +0000 Subject: [issue29659] Expose the `length` arg from shutil.copyfileobj for public use In-Reply-To: <1488157044.73.0.933925559387.issue29659@psf.upfronthosting.co.za> Message-ID: <1488618410.36.0.857382595861.issue29659@psf.upfronthosting.co.za> INADA Naoki added the comment: How about increasing default value to 32KiB or 64KiB too? binutils's cp works well for most cases, while it doesn't have option to specify blocksize. I want Python's copy functions works nice enough for common cases too. binutils cp uses 128KiB block for normal file. see more information in https://github.com/coreutils/coreutils/blob/master/src/ioblksize.h But copyfileobj can be used other file-likes. On Linux, typical socket buffer size is 128KiB, and typical pipe buffer size is 64KiB. So block size larger than 64KiB may cause unneeded blocking. That's why I suggested 32KiB or 64KiB. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 04:31:25 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Sat, 04 Mar 2017 09:31:25 +0000 Subject: [issue26187] sqlite3 trace callback prints duplicate line In-Reply-To: <1453577672.38.0.77226221379.issue26187@psf.upfronthosting.co.za> Message-ID: <1488619885.34.0.793150952871.issue26187@psf.upfronthosting.co.za> Changes by Aviv Palivoda : ---------- pull_requests: +384 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 05:52:59 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Sat, 04 Mar 2017 10:52:59 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488624779.23.0.145310235567.issue29718@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: The patch can split to several issues, moreover, some issues are able to pick up as general not Cygwin specific. Perhaps, it will be an opportunity to fix even if Cygwin specific, if we could explain the implicit issue on implementation. See #4032, #25658, #25720, #27374, #28441 and #28459. Of course your patch has solutions for issues that are not yet known in the bug tracker. ---------- nosy: +masamoto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 05:58:59 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Mar 2017 10:58:59 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1488625139.57.0.0466564112915.issue28087@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +385 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 06:18:15 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Mar 2017 11:18:15 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1488626295.82.0.0169834995763.issue28087@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +386 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 06:42:25 2017 From: report at bugs.python.org (INADA Naoki) Date: Sat, 04 Mar 2017 11:42:25 +0000 Subject: [issue29719] "Date" of what's new is confusing Message-ID: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> New submission from INADA Naoki: See https://docs.python.org/3/whatsnew/3.6.html At top: :Release: |release| :Date: |today| :Editors: Elvis Pranskevichus , Yury Selivanov This |today| is replaced with day when HTML is build (like "Last updated:" in footer). This is near to the date this page is modified last on docs.python.org, until clean rebuild happens. But other cases, this shows only when this HTML is built. It's confusing. How about replacing |today| to Python 3.6.0 release date, or removing the ":Date: |today|" line? ---------- messages: 288976 nosy: inada.naoki priority: normal severity: normal status: open title: "Date" of what's new is confusing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 07:17:26 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Mar 2017 12:17:26 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1488629846.89.0.346740421691.issue29719@psf.upfronthosting.co.za> Ned Deily added the comment: It's a bit confusing but: 1. https://docs.python.org/3/whatsnew/3.6.html is the URL for the current 3.6 branch, in other words, what will be in the next 3.6 release. These are rebuilt as changes are checked in. 2. https://docs.python.org/release/3.6.0/whatsnew/3.6.html (which is linked from https://www.python.org/doc/versions/) is the URL for the docs corresponding to the 3.6.0 release. These are built at release time and then never change. Does that help? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 08:55:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Mar 2017 13:55:49 +0000 Subject: [issue29649] struct.pack_into check boundary error message ignores offset In-Reply-To: <1488030784.09.0.674246877605.issue29649@psf.upfronthosting.co.za> Message-ID: <1488635749.96.0.50882350469.issue29649@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Different error messages are needed if original offset < 0. For example packing 4 bytes with offset -2 always fails, not depending of the size of the buffer. Packing into buffer of size 10 with offset -11 always fails, not depending of the size of packed data. struct.pack_into(' serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 10:15:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Mar 2017 15:15:06 +0000 Subject: [issue29104] Left bracket remains in format string result when '\' preceeds it In-Reply-To: <1483012585.51.0.342717701316.issue29104@psf.upfronthosting.co.za> Message-ID: <1488640506.3.0.939185745614.issue29104@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I am not experienced with git and am waiting until new workflow be described in the devguide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 10:32:52 2017 From: report at bugs.python.org (Davin Potts) Date: Sat, 04 Mar 2017 15:32:52 +0000 Subject: [issue29454] Shutting down consumer on a remote queue In-Reply-To: <1486311518.72.0.101525789296.issue29454@psf.upfronthosting.co.za> Message-ID: <1488641572.87.0.255350235462.issue29454@psf.upfronthosting.co.za> Davin Potts added the comment: My understanding is that example uses a queue.Queue() to demonstrate how to create a custom, remote service from scratch. The implementation in this simple example lacks the sophistication of multiprocessing.Queue() for handling situations such as the one raised by the OP. The example was not attempting to demonstrate a comprehensive replacement for multiprocessing.Queue(), rather it was attempting to demonstrate the mechanism for creating and consuming a callable service hosted by a remote manager. The documentation currently does not introduce this example well nor describe the above motivation. As to why this simplistic implementation of a distributed queue appears to lose an item when the client is killed, it works in the following way: 1. Let's say a server is started to hold a queue.Queue() which is populated with 1 item. 2. A client requests an item from the server. 3. The server receives the request and performs a blocking q.get() (where q is the queue.Queue() object held by the server). 4. When the q.get() releases and returns an item, q has had one item removed leaving a queue size of 0 in our scenario, and then that item is sent from the server to the client. 5. A client requests another item from the server. 6. The server receives the request and performs a blocking q.get() on the queue. Because there's nothing left to grab from the queue, the server blocks and waits for something to magically appear in the queue. We'll have a "producer" put something into the queue in a moment but for the time being the server is stuck waiting on the q.get() and likewise the client is waiting on a response from the server. 7. That client is killed in an unexpected, horrible death because someone accidentally hits it with a Cntrl-C. 8. A "producer" comes along and puts a new item into the server's queue. 9. The server's blocking q.get() call releases, q has had one item removed leaving a queue size of 0 again, and then that item is sent from the server to the client only the client is dead and the transmission fails. 10. A "producer" comes along and puts another new item into the server's queue. 11. The someone who accidentally, horribly killed the client now frantically restarts the client; the client requests an item from the server and the server responds with a new item. However, this is the item introduced in step 10 and not the item from step 8. Hence the item from step 8 appears lost. Note that in our simplistic example from the docs, there is no functionality to repopulate the queue object when communication of the item fails to complete. In general, a multiprocessing.manager has no idea what a manager will contain and has no insight on what to do when a connection to a client is severed. Augmenting the example in the docs to cover situations like this would significantly complicate the example but there are many others to consider on the way to building a comprehensive solution -- instead a person should choose multiprocessing.Queue() unless they have something particular in mind. I think the example should be better introduced (the intro is terse) to explain its purpose and warn that it does not offer a comprehensive replacement for multiprocessing.Queue(). It does not need to go into all of the above explanation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 10:36:20 2017 From: report at bugs.python.org (Davin Potts) Date: Sat, 04 Mar 2017 15:36:20 +0000 Subject: [issue29454] Shutting down consumer on a remote queue In-Reply-To: <1486311518.72.0.101525789296.issue29454@psf.upfronthosting.co.za> Message-ID: <1488641780.55.0.33963624154.issue29454@psf.upfronthosting.co.za> Changes by Davin Potts : ---------- stage: -> needs patch type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 10:45:10 2017 From: report at bugs.python.org (Davin Potts) Date: Sat, 04 Mar 2017 15:45:10 +0000 Subject: [issue29454] Shutting down consumer on a remote queue In-Reply-To: <1486311518.72.0.101525789296.issue29454@psf.upfronthosting.co.za> Message-ID: <1488642310.76.0.599921579942.issue29454@psf.upfronthosting.co.za> Davin Potts added the comment: My understanding of other message queueing systems is that many are motivated by speed to the point that they will permit messages to be "lost" due to specific scenarios that would be overly costly to defend against. Other message queueing systems adopt a philosophy that no message should ever be lost but as a compromise to speed do not promise that a message will be immediately recovered when caught in one of these problematic scenarios, only that it will eventually be recovered and processed fully. It appears that the philosophy adopted or really the solution requirements lead to different best practices. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 10:52:47 2017 From: report at bugs.python.org (Decorater) Date: Sat, 04 Mar 2017 15:52:47 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488642767.35.0.189389917976.issue29718@psf.upfronthosting.co.za> Decorater added the comment: hmm maybe if TSS is available on all platforms maybe python could use that instead of TLS so that way I would not have to have a lot of __CYGWIN__'s all over the place. However I am not sure if all of the OS's that are on the buildbot for python supports TSS. hmm ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 10:54:33 2017 From: report at bugs.python.org (Decorater) Date: Sat, 04 Mar 2017 15:54:33 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488642873.11.0.613962352408.issue29718@psf.upfronthosting.co.za> Decorater added the comment: And yeah that is why I stuck most of the changes in here under __CYGWIN__ macros for now until I know otherwise that all of the changes will not break other platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 11:00:58 2017 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 04 Mar 2017 16:00:58 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1488643258.23.0.0292031587001.issue29708@psf.upfronthosting.co.za> Changes by Chi Hsuan Yen : ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 11:12:04 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 04 Mar 2017 16:12:04 +0000 Subject: [issue29720] potential silent truncation in PyLong_AsVoidPtr Message-ID: <1488643924.71.0.864156118334.issue29720@psf.upfronthosting.co.za> New submission from Oren Milman: I am not sure whether such a platform exists, but on a platform where SIZEOF_VOID_P < SIZEOF_LONG, PyLong_AsVoidPtr (which is in Objects/longobject.c) is: long x; if (PyLong_Check(vv) && _PyLong_Sign(vv) < 0) x = PyLong_AsLong(vv); else x = PyLong_AsUnsignedLong(vv); if (x == -1 && PyErr_Occurred()) return NULL; return (void *)x; Thus, for example, 'PyLong_AsVoidPtr(PyLong_FromUnsignedLong(ULONG_MAX))' would silently truncate ULONG_MAX, and return without an error. An easy fix would be (mainly) to add to PyLong_AsVoidPtr 'Py_BUILD_ASSERT(SIZEOF_LONG <= SIZEOF_VOID_P);', but I am not sure we can make that assumption. Note that a compile time error is already raised: - by Objects/longobject.h, in case SIZEOF_VOID_P is different from SIZEOF_INT, SIZEOF_LONG and SIZEOF_LONG_LONG - by Modules/_multiprocessing/multiprocessing.h, in case SIZEOF_VOID_P is different from SIZEOF_LONG and SIZEOF_LONG_LONG ---------- components: Interpreter Core messages: 288984 nosy: Oren Milman priority: normal severity: normal status: open title: potential silent truncation in PyLong_AsVoidPtr type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 11:35:48 2017 From: report at bugs.python.org (Marco Buttu) Date: Sat, 04 Mar 2017 16:35:48 +0000 Subject: [issue29716] Python 3 Module doc still sounds like __init__.py is required In-Reply-To: <1488576386.83.0.924613404524.issue29716@psf.upfronthosting.co.za> Message-ID: <1488645348.47.0.78073835703.issue29716@psf.upfronthosting.co.za> Changes by Marco Buttu : ---------- nosy: +marco.buttu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 11:46:05 2017 From: report at bugs.python.org (Davin Potts) Date: Sat, 04 Mar 2017 16:46:05 +0000 Subject: [issue29701] Add close method to queue.Queue In-Reply-To: <1488485532.45.0.976459019786.issue29701@psf.upfronthosting.co.za> Message-ID: <1488645965.85.0.0437582728907.issue29701@psf.upfronthosting.co.za> Davin Potts added the comment: The example of AMQP is perhaps a stronger argument for why multiprocessing.Queue.close should (or does) exist, not as much a reason for queue.Queue. The strongest point, I think, is the argument that existing patterns are lacking. In the multiprocessing module, the pattern of placing None into a queue.Queue to communicate between threads is also used but with a slightly different use case: a queue may have multiple None's added to it so that the queue's contents may be fully consumed and at the end the consumers understand to not look for more work when they each get a None. It might be restated as "do your work, then close". If close were introduced to queue.Queue as proposed, it would not eliminate the need for this pattern. Thankfully inside multiprocessing the number of threads is known (for example, a thread to manage each process created by multiprocessing) making code possible such as: `inqueue.queue.extend([None] * size)`. In the more general case, the point that `size` is not always known is a valid one. In this same vein, other parts of multiprocessing could potentially make use of queue.Queue.close but at least in multiprocessing's specific case I'm not sure I see a compelling simplification to warrant the change. Though multiprocessing doesn't provide one, I think it would be helpful to see concrete use cases where there would be a clear benefit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 11:56:55 2017 From: report at bugs.python.org (INADA Naoki) Date: Sat, 04 Mar 2017 16:56:55 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1488646615.24.0.894009134536.issue29719@psf.upfronthosting.co.za> INADA Naoki added the comment: > is the URL for the current 3.6 branch, in other words, what will be in the next 3.6 release. "next 3.6 release" means 3.6.1? > These are rebuilt as changes are checked in. There are some commit for fixing something after 3.6.0 released. But I think rebuild can be happen without changing the page. For example, major sphinx version up, fixing template, update version of imported js libraries. And as I said, the document may be built on other machine. In this case, this |today| is not related to last commit date of this page. It seems unmeaningful. So I still this ":Date:" should be release date, or removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 12:09:36 2017 From: report at bugs.python.org (Max Rothman) Date: Sat, 04 Mar 2017 17:09:36 +0000 Subject: [issue29715] Arparse improperly handles "-_" In-Reply-To: <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za> Message-ID: <1488647376.94.0.396536825972.issue29715@psf.upfronthosting.co.za> Max Rothman added the comment: Martin: huh, I didn't notice that documentation. The error message definitely could be improved. It still seems like an odd choice given that argparse knows about the expected spec, so it knows whether there are any options or not. Perhaps one could enable/disable this cautious behavior with a flag passed to ArgumentParser? It was rather surprising in my case, since I was parsing morse code and the arguments were random combinations of "-", "_", and "*", so it wasn't immediately obvious what the issue was. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 12:30:13 2017 From: report at bugs.python.org (Brett Cannon) Date: Sat, 04 Mar 2017 17:30:13 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488648613.03.0.690104396466.issue27593@psf.upfronthosting.co.za> Brett Cannon added the comment: git actually does not always shorten to 7 characters. In git 2.11 (I think) they shorten to the shortest length to guarantee uniqueness. So `git rev-parse --short HEAD` gives a hash of de04644627 which is 10 characters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 12:32:38 2017 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 04 Mar 2017 17:32:38 +0000 Subject: [issue29176] /tmp does not exist on Android and is used by curses.window.putwin() In-Reply-To: <1483699620.77.0.827616599041.issue29176@psf.upfronthosting.co.za> Message-ID: <1488648758.66.0.404934700578.issue29176@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: I've just tried with the latest git-master. With NDK r13b and my build scripts, [1] test_curses passed. shell at ASUS_Z00E_2:/data/local/tmp $ python3.7m -m test test_curses -u curses Run tests sequentially 0:00:00 [1/1] test_curses 1 test OK. Total duration: 1 sec Tests result: SUCCESS abcshell at ASUS_Z00E_2:/data/local/tmp $ By the way, with NDK r14 and unified headers, [2] the test also passed. Note that this configuration is not officially supported by CPython yet. (issue29040) [1] https://github.com/yan12125/python3-android/tree/ndk-r13 [2] https://github.com/yan12125/python3-android/tree/master ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 13:17:35 2017 From: report at bugs.python.org (paul j3) Date: Sat, 04 Mar 2017 18:17:35 +0000 Subject: [issue29670] argparse: does not respect required args pre-populated into namespace In-Reply-To: <1488227590.23.0.0462095560451.issue29670@psf.upfronthosting.co.za> Message-ID: <1488651455.03.0.615734415921.issue29670@psf.upfronthosting.co.za> paul j3 added the comment: One refactoring that I'd like to see is to move all the tests at the end of _parse_know_known_args to its caller, parse_known_args. It would have to return more values than the current namespace and extras, in particular the see_actions and seen_non_default_actions. This would have, I think, several benefits: - it would make easier to customize the testing as proposed by Matthew. It probably would also make it easier to implement the nested-logical-groups that I propose in http://bugs.python.org/issue11588. - It would put the '# Convert action default now instead of doing it before parsing arguments' step at the same code level as when the defaults were first loaded. Currently defaults are set at the start of parse_known_args, but evaluated at the end of _parse_known_args. That asymmetry has bugged me for some time. I'm not aware of any bug/issues that have arisen from that, but still it doesn't look right. Last time the 'required' tests were revised, it introduced an error in the handling of subparsers. http://bugs.python.org/issue9253 Subparsers used to be required (default for positionals). But now they are optional unless you add an explicit 'subparsers.required = True' statement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 14:21:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Mar 2017 19:21:19 +0000 Subject: [issue29721] "abort: repository . not found!" during the build of Python 2.7 Message-ID: <1488655279.64.0.490520715338.issue29721@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The message "abort: repository . not found!" is output to stderr three times during the build of Python 2.7. To be more precise, it happens during the build of getbuildinfo.c. $ touch Modules/getbuildinfo.c $ make -s abort: repository . not found! abort: repository . not found! abort: repository . not found! libpython2.7.a(posixmodule.o): ? ??????? ?posix_tmpnam?: /home/serhiy/py/cpython2.7/./Modules/posixmodule.c:7614: ????????????: the use of `tmpnam_r' is dangerous, better use `mkstemp' libpython2.7.a(posixmodule.o): ? ??????? ?posix_tempnam?: /home/serhiy/py/cpython2.7/./Modules/posixmodule.c:7561: ????????????: the use of `tempnam' is dangerous, better use `mkstemp' building dbm using gdbm Python build finished, but the necessary bits to build these modules were not found: _bsddb bsddb185 sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. All works correctly when build Python 3.x. This looks related to issue12346. ---------- components: Build messages: 288991 nosy: benjamin.peterson, r.david.murray, serhiy.storchaka priority: normal severity: normal status: open title: "abort: repository . not found!" during the build of Python 2.7 type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 14:30:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Mar 2017 19:30:54 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1488655854.83.0.899004742871.issue29464@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file46699/fastcall-no-keywords-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 14:35:31 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Mar 2017 19:35:31 +0000 Subject: [issue29464] Specialize FASTCALL for functions with positional-only parameters In-Reply-To: <1486394565.83.0.903919283463.issue29464@psf.upfronthosting.co.za> Message-ID: <1488656131.04.0.526062507692.issue29464@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Proposed patch renames METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS > and makes bare METH_FASTCALL be used for functions with > positional-only parameters. +1 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 15:28:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Mar 2017 20:28:22 +0000 Subject: [issue24037] Argument Clinic: add the boolint converter In-Reply-To: <1429785188.86.0.806042190219.issue24037@psf.upfronthosting.co.za> Message-ID: <1488659302.39.0.536534318029.issue24037@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch uses bool(accept={int}) rather of boolint. It also updates more functions converted to Argument Clinic. ---------- versions: +Python 3.7 -Python 3.5 Added file: http://bugs.python.org/file46700/clinic-boolint-converter-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 15:42:35 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 04 Mar 2017 20:42:35 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1488660154.99.0.562536332169.issue27593@psf.upfronthosting.co.za> Steve Dower added the comment: I just did my build for 3.6.1rc1 and it looks like `git name-rev --name-only --tags HEAD` returns "3.6.1rc1^0" for some reason. Perhaps "git describe" is the better command to use here? From what I've seen of that, it should do "tag if tagged, else short hash" by default, and we can do "git describe --dirty=" to get an extra marker for when it has been modified. (Though this may mean taking GITTAG back out of our scripts.) Otherwise, I think the releases are no longer blocked on this, and we can take a bit of time to figure out the right format. ---------- priority: release blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 17:41:42 2017 From: report at bugs.python.org (David Robins) Date: Sat, 04 Mar 2017 22:41:42 +0000 Subject: [issue13986] ValueError: cannot convert float NaN to integer In-Reply-To: <1328874238.47.0.897260032056.issue13986@psf.upfronthosting.co.za> Message-ID: <1488667302.39.0.159779729993.issue13986@psf.upfronthosting.co.za> David Robins added the comment: I saw a similar error with Python 3.6 on a MIPS (32-bit - mipsisa32r2el-axis-linux-gnu) platform, but during interpreter startup, not install (perhaps because it was cross-compiled so install on the host doesn't run the target Python). It was due to building with a hard-float compiler when soft-float was needed (GCC 6.3.0, worked with --with-float=soft). Full error: Fatal Python error: Py_Initialize: Unable to get the locale encoding Traceback (most recent call last): File "", line 961, in _find_and_load File "", line 950, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 674, in exec_module File "", line 762, in get_code ValueError: cannot convert float NaN to integer Program received signal SIGABRT, Aborted. ---------- nosy: +dbr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 18:38:18 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 04 Mar 2017 23:38:18 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488670698.65.0.671753338154.issue29638@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- pull_requests: +387 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 21:45:50 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 02:45:50 +0000 Subject: [issue20774] collections.deque should ship with a stdlib json serializer In-Reply-To: <1393362950.58.0.308283739635.issue20774@psf.upfronthosting.co.za> Message-ID: <1488681950.43.0.733144619575.issue20774@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See also, the same feature request from Tarek Ziad?, http://bugs.python.org/issue29663 , "collections.deque could be serialized in JSON as a simple array. The only thing we can lose in the process is the maxlen value, but I think it's a decent behaviour to ignore it when encoding and to set it to None when decoding." +1 from me as well. This isn't really different that how we handle tuples and I can see that it would be useful to be able to dump a deque into JSON. I concur that it is reasonable to ignore maxlen because that is primarily a convenience feature (auto-popping on overflow) rather than something that is intrinsic to the semantics of data itself. For now, just adding deque support is reasonable. We can't just do all sequences because string/bytearray like objects would need to be excluded. ---------- versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 22:26:38 2017 From: report at bugs.python.org (Adam) Date: Sun, 05 Mar 2017 03:26:38 +0000 Subject: [issue29722] heapq.merge docs don't handle reverse flag well Message-ID: <1488684398.15.0.985624873811.issue29722@psf.upfronthosting.co.za> New submission from Adam: The docs for heapq.merge are a little misleading. Iterables passed into heapq.merge with the reversed flag set to True must be sorted from largest to smallest to achieve the desired sorting effect, but the paragraph describing the function in the general case states that they should be sorted from smallest to largest. ---------- assignee: docs at python components: Documentation messages: 288997 nosy: adamniederer, docs at python priority: normal pull_requests: 388 severity: normal status: open title: heapq.merge docs don't handle reverse flag well type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 22:29:29 2017 From: report at bugs.python.org (Adam) Date: Sun, 05 Mar 2017 03:29:29 +0000 Subject: [issue29722] heapq.merge docs are misleading with the "reversed" flag In-Reply-To: <1488684398.15.0.985624873811.issue29722@psf.upfronthosting.co.za> Message-ID: <1488684569.76.0.0761629332921.issue29722@psf.upfronthosting.co.za> Changes by Adam : ---------- title: heapq.merge docs don't handle reverse flag well -> heapq.merge docs are misleading with the "reversed" flag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 22:36:46 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 05 Mar 2017 03:36:46 +0000 Subject: [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1488685006.56.0.778704146939.issue29710@psf.upfronthosting.co.za> Nick Coghlan added the comment: Added 2.7 to the list of affected versions. Clearly my 2's-complement arithmetic is incredibly rusty, as for some reason I was thinking "~(-sys.maxint-1)" could overflow, but no, the answer to that is just "sys.maxint" :) ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 4 22:38:13 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 03:38:13 +0000 Subject: [issue29701] Add close method to queue.Queue In-Reply-To: <1488485532.45.0.976459019786.issue29701@psf.upfronthosting.co.za> Message-ID: <1488685093.49.0.86203385738.issue29701@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Here's a link to the feature request for Ruby, https://bugs.ruby-lang.org/issues/10600 . It looks like the feature was implemented without examining any concrete use cases. A quick code search on Github did not reveal any cases where the feature was ever used after it was added to Ruby. For now, I think we should pass on this one. Python's GIL limits what people typically do with threads (use cases focus on I/O bound tasks instead of CPU bound). Consequently, it is atypical to have a multi-producer-multi-consumer use case, and it would be even more rare for that case to also need the queue to inform all the consumers to shutdown (pure daemons are the norm). In addition, we already have work-arounds for those cases (shared variables, multiple poison-pills, secondary command queues, timeouts, etc). The single consumer example in the standard library is already satisfactorily handled using None as a sentinel. AFAICT, that code would not read any better with the new API. The library itself is not typically a good indicator of end-user need (our needs tend to be more exotic). The queue module has had a long life and this feature request hasn't arisen before, so that may indicate that this isn't a recurring or prevalent need. It seems that what the OP really wants is for this feature to be implemented in asyncio. I don't have much of an opinion on that one. It seems to me that in a single-thread-single-process there isn't any benefit that would come from having multiple consumers, so I'm not sure why someone would need this feature (passing in None for a single consumer is already simple and doesn't require API expansion). Without a recurring need, I think it is better not to do this one because the negatives would outweigh the positives. It would open the door to a requests for is_closed(), for a closing context manager, and for a way to re-open a closed queue. This request would make more sense in a distributed or multi-processing environment (where multiple consumers have real benefits), but for plain threads, where it may be more distracting than helpful. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 00:00:08 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 05:00:08 +0000 Subject: [issue29722] heapq.merge docs are misleading with the "reversed" flag In-Reply-To: <1488684398.15.0.985624873811.issue29722@psf.upfronthosting.co.za> Message-ID: <1488690008.16.0.575268019896.issue29722@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 01:01:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 06:01:16 +0000 Subject: [issue20774] collections.deque should ship with a stdlib json serializer In-Reply-To: <1393362950.58.0.308283739635.issue20774@psf.upfronthosting.co.za> Message-ID: <1488693676.84.0.811043532413.issue20774@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue27362 for more general approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 01:23:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 06:23:51 +0000 Subject: [issue27362] json.dumps to check for obj.__json__ before raising TypeError In-Reply-To: <1466514558.58.0.537455774899.issue27362@psf.upfronthosting.co.za> Message-ID: <1488695031.58.0.721926526929.issue27362@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This could fix other issues: * issue16535 -- for Decimal. * issue20774 -- for deque. * issue24313 -- for NumPy numeric types. * issue26263 -- for array. Currently the blessed way of JSON encoder customization is to implement the default method in JSONEncoder subclass or pass the default argument to dump(). But that requires changing every JSON serialization call and handling all non-standard types in one function. I think it would be handly to pick the type-specific serialization function from: 1) per-encoder dispatch table, 2) global dispatch type (registry), 3) __json__ method. This can be done after the default function fails or be included in the default default method. This will add JSON support of standard library types (e.g. collections other than list, tuple and dict, numbers other than int and float) and will help to implement task specific serialization of user classes. ---------- nosy: +serhiy.storchaka resolution: later -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 01:51:15 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 05 Mar 2017 06:51:15 +0000 Subject: [issue29557] binhex documentation claims unknown bug In-Reply-To: <1487089244.04.0.406287394607.issue29557@psf.upfronthosting.co.za> Message-ID: <1488696675.25.0.326361335774.issue29557@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +389 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 01:51:46 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 05 Mar 2017 06:51:46 +0000 Subject: [issue29557] binhex documentation claims unknown bug In-Reply-To: <1487089244.04.0.406287394607.issue29557@psf.upfronthosting.co.za> Message-ID: <1488696706.38.0.272694262042.issue29557@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +390 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 02:12:56 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 05 Mar 2017 07:12:56 +0000 Subject: [issue28180] sys.getfilesystemencoding() should default to utf-8 In-Reply-To: <1474024622.65.0.838685461995.issue28180@psf.upfronthosting.co.za> Message-ID: <1488697976.62.0.710295899882.issue28180@psf.upfronthosting.co.za> Nick Coghlan added the comment: An updated reference implementation has been pushed to the pep538-coerce-c-locale branch in my GitHub fork: https://github.com/python/cpython/compare/master...ncoghlan:pep538-coerce-c-locale (That doesn't include Xavier's Android fixes yet, though) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 02:46:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 07:46:31 +0000 Subject: [issue29557] binhex documentation claims unknown bug In-Reply-To: <1487089244.04.0.406287394607.issue29557@psf.upfronthosting.co.za> Message-ID: <1488699991.85.0.44555640442.issue29557@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue29566. Perhaps hexbin() bug is related to that bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 03:08:03 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 05 Mar 2017 08:08:03 +0000 Subject: [issue27476] Introduce a .github folder with PULL_REQUEST_TEMPLATE In-Reply-To: <1468176772.48.0.730450174113.issue27476@psf.upfronthosting.co.za> Message-ID: <1488701283.84.0.439726505676.issue27476@psf.upfronthosting.co.za> Ned Deily added the comment: Now that the transition has occurred, is it time to remove this file and its .github directory? ---------- nosy: +ned.deily resolution: fixed -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 03:50:10 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 08:50:10 +0000 Subject: [issue20774] collections.deque should ship with a stdlib json serializer In-Reply-To: <1393362950.58.0.308283739635.issue20774@psf.upfronthosting.co.za> Message-ID: <1488703810.15.0.179800838991.issue20774@psf.upfronthosting.co.za> Raymond Hettinger added the comment: For now, just hardcoding deque support is fine. Support for a __json__ attribute or JSON array registry is a topic for another day. Even then, I don't think that within the standard library support for JSONification should have its responsibility shifted outside the of json module itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 03:54:31 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 08:54:31 +0000 Subject: [issue27362] json.dumps to check for obj.__json__ before raising TypeError In-Reply-To: <1466514558.58.0.537455774899.issue27362@psf.upfronthosting.co.za> Message-ID: <1488704071.05.0.936858018723.issue27362@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with David Murray that this should be kicked around on python-dev or python-ideas first. Also, we should ask Bob Ippolito for his thoughts. ---------- assignee: -> bob.ippolito nosy: +bob.ippolito, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 05:03:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 10:03:59 +0000 Subject: [issue27362] json.dumps to check for obj.__json__ before raising TypeError In-Reply-To: <1466514558.58.0.537455774899.issue27362@psf.upfronthosting.co.za> Message-ID: <1488708239.15.0.773031076559.issue27362@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This feature already was proposed for simplejson (https://github.com/simplejson/simplejson/issues/52). Special __json__ method is used in wild in a number of projects for exactly this purpose. It looks to me the main disagreement in the past Python-Idea discussion (https://mail.python.org/pipermail/python-ideas/2010-July/007811.html) was about whether implement the customization as a special method or as a registry. I suggest to implement both. Special methods are good for standard collection and numeric classes, global registry is good for application-wide serialization, local dispatch table or the default method are good for more specific task-specific customization. Here is a draft implementation. It follows the design of pickle and copy modules. There are few design questions. 1. What is the order of using different customization methods? Should registries and __json__ be checked before calling the default method, after calling the default method (if it fails), or inside the default implementation of the default method? 2. For Decimal we need to customize raw JSON representation. In the past it was possible to implement an intermediate float or int subclass with __str__ or __repr__ returning raw JSON representation. But this hack no longer works. Needed to add explicit support of special JSON representation objects. Other way -- add yet one special method (__raw_json__ or __json_str__). 3. Do we need the json.registry() function for global registration, or it is enough to expose the json.dispatch_table mapping? ---------- keywords: +patch Added file: http://bugs.python.org/file46701/json-customize.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 06:47:17 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Sun, 05 Mar 2017 11:47:17 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: <1488599382.84.0.138970896501.issue29718@psf.upfronthosting.co.za> Message-ID: <1488714437.55.0.408853044634.issue29718@psf.upfronthosting.co.za> Masayuki Yamamoto added the comment: We should avoid to submit quickfix to official as much as we can. Especially the case of unofficial (or inarticulate) support platform, a patch for specific platform is probably rejected because the code won't be maintained. Thread Specific Storage API (TSS) has been designed to work on more platforms, but it has incompatible changing and the API merging needs official acceptance for the PEP 539. (Please wait PEP author, or you can discuss for the new API or alternatives, see #25658 for details) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 08:31:48 2017 From: report at bugs.python.org (Ned Batchelder) Date: Sun, 05 Mar 2017 13:31:48 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not Message-ID: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> New submission from Ned Batchelder: 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py Previous versions, including 3.6.0, did not. Is this intentional? $ pwd /Users/ned/foo $ cat main361/__main__.py import pprint, sys pprint.pprint(sys.path) $ for ver in 2.7.13 3.4.6 3.5.3 3.6.0 3.6.1rc1; do > py=/usr/local/pythonz/pythons/CPython-$ver/bin/python > $py -V > $py main361 > done Python 2.7.13 ['main361', '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python27.zip', '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7', '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/plat-darwin', '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/plat-mac', '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/lib-tk', '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/lib-old', '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/lib-dynload', '/usr/local/pythonz/pythons/CPython-2.7.13/lib/python2.7/site-packages'] Python 3.4.6 ['main361', '/usr/local/pythonz/pythons/CPython-3.4.6/lib/python34.zip', '/usr/local/pythonz/pythons/CPython-3.4.6/lib/python3.4', '/usr/local/pythonz/pythons/CPython-3.4.6/lib/python3.4/plat-darwin', '/usr/local/pythonz/pythons/CPython-3.4.6/lib/python3.4/lib-dynload', '/usr/local/pythonz/pythons/CPython-3.4.6/lib/python3.4/site-packages'] Python 3.5.3 ['main361', '/usr/local/pythonz/pythons/CPython-3.5.3/lib/python35.zip', '/usr/local/pythonz/pythons/CPython-3.5.3/lib/python3.5', '/usr/local/pythonz/pythons/CPython-3.5.3/lib/python3.5/plat-darwin', '/usr/local/pythonz/pythons/CPython-3.5.3/lib/python3.5/lib-dynload', '/usr/local/pythonz/pythons/CPython-3.5.3/lib/python3.5/site-packages'] Python 3.6.0 ['main361', '/usr/local/pythonz/pythons/CPython-3.6.0/lib/python36.zip', '/usr/local/pythonz/pythons/CPython-3.6.0/lib/python3.6', '/usr/local/pythonz/pythons/CPython-3.6.0/lib/python3.6/lib-dynload', '/usr/local/pythonz/pythons/CPython-3.6.0/lib/python3.6/site-packages'] Python 3.6.1rc1 ['main361', '/Users/ned/foo', '/usr/local/pythonz/pythons/CPython-3.6.1rc1/lib/python36.zip', '/usr/local/pythonz/pythons/CPython-3.6.1rc1/lib/python3.6', '/usr/local/pythonz/pythons/CPython-3.6.1rc1/lib/python3.6/lib-dynload', '/usr/local/pythonz/pythons/CPython-3.6.1rc1/lib/python3.6/site-packages'] $ ---------- messages: 289009 nosy: nedbat priority: normal severity: normal status: open title: 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 08:39:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 13:39:41 +0000 Subject: [issue16535] json encoder unable to handle decimal In-Reply-To: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za> Message-ID: <1488721181.61.0.591565920918.issue16535@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The trick from msg176158 no longer works since issue26719. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 08:49:43 2017 From: report at bugs.python.org (Ned Batchelder) Date: Sun, 05 Mar 2017 13:49:43 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1488721783.91.0.607878292964.issue29723@psf.upfronthosting.co.za> Ned Batchelder added the comment: BTW, I don't know if this is relevant, but PyPy has added the current directory in this situation for a long time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 09:32:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 05 Mar 2017 14:32:36 +0000 Subject: [issue29718] Fixed compile on cygwin. In-Reply-To: Message-ID: STINNER Victor added the comment: Please remove TSS from the Cygwin patch in that case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 09:58:55 2017 From: report at bugs.python.org (R. David Murray) Date: Sun, 05 Mar 2017 14:58:55 +0000 Subject: [issue20774] collections.deque should ship with a stdlib json serializer In-Reply-To: <1393362950.58.0.308283739635.issue20774@psf.upfronthosting.co.za> Message-ID: <1488725935.68.0.544738858867.issue20774@psf.upfronthosting.co.za> R. David Murray added the comment: I disagree, I think a __json__ protocol is sensible. But this is why it needs to be discussed on python-dev or python-ideas first :) In the meantime adding deque support like we added enum support is reasonable, but IMO we shouldn't go to crazy adding support for non-base types before talking about a __json__ protocol. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 10:11:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 15:11:12 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488726672.69.0.509619406437.issue29638@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If there are problems with ABC caches of typing.ChainMap, typing.Counter, and typing.DefaultDict, why not add corresponding clearing methods obj._abc_cache.clear and obj._abc_negative_cache.clear to typing._cleanups ? Why there are problems only with ABC caches of these three types? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 10:13:27 2017 From: report at bugs.python.org (Petr MOTEJLEK) Date: Sun, 05 Mar 2017 15:13:27 +0000 Subject: [issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch In-Reply-To: <1487709025.37.0.198613157816.issue29615@psf.upfronthosting.co.za> Message-ID: <1488726807.78.0.310102327218.issue29615@psf.upfronthosting.co.za> Changes by Petr MOTEJLEK : ---------- pull_requests: +391 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 10:21:32 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 05 Mar 2017 15:21:32 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488727292.22.0.821440717967.issue29638@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > why not add corresponding clearing methods obj._abc_cache.clear and obj._abc_negative_cache.clear to typing._cleanups ? OK, this is another possible solution. I didn't think about this, because now typing._cleanups only clear generic caches (not ABC caches). > Why there are problems only with ABC caches of these three types? Normally, ABC caches are cleared in dash_R_cleanup, but I think that the problem is that inspect.isabstract returns False for these three types (unlike other types in typing module), see line 147 in refleak.py: if not isabstract(abc): continue Actually now I think that the code in dash_R_cleanup might not clear some other caches also. So maybe we just need to add all ABC caches to typing._cleanups (just in case). What do you think, Serhiy? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 10:27:01 2017 From: report at bugs.python.org (Petr MOTEJLEK) Date: Sun, 05 Mar 2017 15:27:01 +0000 Subject: [issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch In-Reply-To: <1487709025.37.0.198613157816.issue29615@psf.upfronthosting.co.za> Message-ID: <1488727621.7.0.359538586373.issue29615@psf.upfronthosting.co.za> Changes by Petr MOTEJLEK : ---------- pull_requests: +392 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 10:45:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 15:45:50 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488728750.61.0.978840663008.issue29638@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > So maybe we just need to add all ABC caches to typing._cleanups (just in case). I don't know. Sorry, I didn't remember exactly reasons why I didn't move the clearing of all ABC caches into clear_caches(). Perhaps I suspected that this can have unwanted consequences or decrease performance too much. Are typing.ChainMap and others actually abstract classes? If yes, then perhaps there is something wrong with inspect.isabstract(). If no, then why ABC caches for these classes exist and non-empty? ---------- nosy: +haypo, rhettinger, stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 11:03:27 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 05 Mar 2017 16:03:27 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488729807.21.0.757874039404.issue29638@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > Are typing.ChainMap and others actually abstract classes? They are abstract classes in the sense that they are instances of abc.ABCMeta. However, for some reasons inspect checks __flags__ attribute. The latter probably reflects the fact that Deque etc. do not have abstract methods (they still need to be instances of abc.ABCMeta because they need to be generic). I don't think that we need to change behaviour of inspect because it could be backward incompatible. I would either make changes to refleak or typing (adding few more cleanups in either place). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 11:13:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 16:13:00 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488730380.01.0.593898618503.issue29638@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What if explicitly set __abstractmethods__ = True for these types? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 11:30:42 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 05 Mar 2017 16:30:42 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488731442.53.0.839492288666.issue29638@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > What if explicitly set __abstractmethods__ = True for these types? Unfortunately this does not help. I think this is because dash_R_cleanup only clears caches for classes in collections.abc.__all__ and their immediate .__subclasses__(). Making this recursive (i.e. also clearing caches of __subclasses__() of __subclasses__() etc) will probably fix the problem (provided we also add __abstractmethods__ = True). However, this looks a bit too complex for me. I would rather add few more typing._cleanups (anyway this failure only happens with typing ABCs) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 11:32:04 2017 From: report at bugs.python.org (Chris Warrick) Date: Sun, 05 Mar 2017 16:32:04 +0000 Subject: =?utf-8?q?=5Bissue29724=5D_Itertools_docs_propose_a_harmful_=E2=80=9Cspee?= =?utf-8?q?dup=E2=80=9D_without_any_explanation?= Message-ID: <1488731524.9.0.615939918768.issue29724@psf.upfronthosting.co.za> New submission from Chris Warrick: The itertools recipes list [0] ends with the following dubious advice: > Note, many of the above recipes can be optimized by replacing global lookups with local variables defined as default values. For example, the dotproduct recipe can be written as: > > def dotproduct(vec1, vec2, sum=sum, map=map, mul=operator.mul): > return sum(map(mul, vec1, vec2)) This is presented in the document without any explanation. It may confuse beginners into always doing it in their code (as evidenced in #python today), leading to unreadable code and function signatures. There is also no proof of there being a significant speed difference by using this ?trick?. In my opinion, this should not be part of the documentation, or should provide proof that it can provide a real, noticeable speedup and is not premature optimization. (Added in [1] by Raymond Hettinger ? added to nosy list) [0]: https://docs.python.org/3/library/itertools.html#itertools-recipes [1]: https://github.com/python/cpython/commit/fc91aa28fd8dad5280fd4d3a4747b5e08ee37ac0 ---------- assignee: docs at python components: Documentation messages: 289020 nosy: Kwpolska, docs at python, rhettinger priority: normal severity: normal status: open title: Itertools docs propose a harmful ?speedup? without any explanation versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 11:33:21 2017 From: report at bugs.python.org (Andrew Nester) Date: Sun, 05 Mar 2017 16:33:21 +0000 Subject: [issue29649] struct.pack_into check boundary error message ignores offset In-Reply-To: <1488030784.09.0.674246877605.issue29649@psf.upfronthosting.co.za> Message-ID: <1488731601.8.0.704509984838.issue29649@psf.upfronthosting.co.za> Andrew Nester added the comment: Thanks Serhiy! Just implemented new error messages in my PR for case you mentioned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 11:35:54 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 16:35:54 +0000 Subject: [issue20774] collections.deque should ship with a stdlib json serializer In-Reply-To: <1393362950.58.0.308283739635.issue20774@psf.upfronthosting.co.za> Message-ID: <1488731754.08.0.835393191098.issue20774@psf.upfronthosting.co.za> Raymond Hettinger added the comment: There is a difference. An __json__ attribute would have to convert to a list first. Adding support directly to the json module would allow the deque to be read directly. I think you all are leaning towards premature generalization and making this harder than it needs to be. Chris and Tarek's proposal is a reasonable and straight-forward, but it is not being pushed towards PEP territory and I think Guido would need to opine on whether to enshrine yet another dunder method that would infest the library and privilege the json serialization format over all formats. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 11:47:29 2017 From: report at bugs.python.org (=?utf-8?q?J=C3=BCrgen_A=2E_Erhard?=) Date: Sun, 05 Mar 2017 16:47:29 +0000 Subject: [issue29725] sqlite3.Cursor doesn't properly document "arraysize" Message-ID: <1488732449.69.0.822466282685.issue29725@psf.upfronthosting.co.za> New submission from J?rgen A. Erhard: It's an attribute mentioned in fetchmany and fetchall, but it's not in the list with those two, but it should be, since the section says "A Cursor instance has the following attributes and methods." and it is an attribute. ---------- assignee: docs at python components: Documentation messages: 289023 nosy: docs at python, jae priority: normal severity: normal status: open title: sqlite3.Cursor doesn't properly document "arraysize" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 11:52:47 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 16:52:47 +0000 Subject: [issue20774] collections.deque should ship with a stdlib json serializer In-Reply-To: <1393362950.58.0.308283739635.issue20774@psf.upfronthosting.co.za> Message-ID: <1488732767.19.0.496293462534.issue20774@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, one of the design goal for deques was to make them easily substitutable for lists when needed. This feature request is a nice-to-have that moves us a little closer. That said, I think a __json__ attribute is too big of a hammer for this simple proposal. Also, please add Bob Ippolito to all JSON issues. He has excellent design sensibilities and considerable contact with users of the json module. ---------- nosy: +bob.ippolito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 11:57:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 16:57:39 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488733059.79.0.67518437817.issue29638@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I just wonder is there any other negative consequences? inspect.isabstract() returning False for abstract class looks a bug to me. If you just want to add a workaround in dash_R_cleanup, I think it would be better to generate the list of all abstract classes and add three typing classes to it. clear_caches() is called before running every test, but ABC caches are cleared not so often. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 11:57:56 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 05 Mar 2017 16:57:56 +0000 Subject: =?utf-8?q?=5Bissue29724=5D_Itertools_docs_propose_a_harmful_=E2=80=9Cspee?= =?utf-8?q?dup=E2=80=9D_without_any_explanation?= In-Reply-To: <1488731524.9.0.615939918768.issue29724@psf.upfronthosting.co.za> Message-ID: <1488733076.73.0.730366986363.issue29724@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 12:15:54 2017 From: report at bugs.python.org (dillon.brock) Date: Sun, 05 Mar 2017 17:15:54 +0000 Subject: [issue29726] test_xmlrpc raises DeprecationWarnings Message-ID: <1488734154.48.0.272131402942.issue29726@psf.upfronthosting.co.za> New submission from dillon.brock: In 3 unit tests, test_xmlrpc calls assertRaises(Exception, expectedRegex='method'), causing DeprecationWarnings. These calls should be replaced with assertRaisesRegex(Exception, 'method'). 0:20:56 [378/404] test_xmlrpc 127.0.0.1 - - [05/Mar/2017 11:53:45] "POST / HTTP/1.1" 200 - 127.0.0.1 - - [05/Mar/2017 11:53:45] "POST / HTTP/1.1" 200 - /home/dillon/src/cpython/Lib/test/test_xmlrpc.py:430: DeprecationWarning: 'expected_regex' is an invalid keyword argument for this function with self.assertRaises(Exception, expected_regex='method'): /home/dillon/src/cpython/Lib/test/test_xmlrpc.py:423: DeprecationWarning: 'expected_regex' is an invalid keyword argument for this function with self.assertRaises(Exception, expected_regex='method'): /home/dillon/src/cpython/Lib/test/test_xmlrpc.py:415: DeprecationWarning: 'expected_regex' is an invalid keyword argument for this function with self.assertRaises(Exception, expected_regex='method'): ---------- components: Tests messages: 289026 nosy: dillon.brock priority: normal severity: normal status: open title: test_xmlrpc raises DeprecationWarnings type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 12:21:46 2017 From: report at bugs.python.org (dillon.brock) Date: Sun, 05 Mar 2017 17:21:46 +0000 Subject: [issue29726] test_xmlrpc raises DeprecationWarnings In-Reply-To: <1488734154.48.0.272131402942.issue29726@psf.upfronthosting.co.za> Message-ID: <1488734506.49.0.749650628246.issue29726@psf.upfronthosting.co.za> Changes by dillon.brock : ---------- pull_requests: +393 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 12:25:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 17:25:18 +0000 Subject: [issue29726] test_xmlrpc raises DeprecationWarnings In-Reply-To: <1488734154.48.0.272131402942.issue29726@psf.upfronthosting.co.za> Message-ID: <1488734718.1.0.316506676003.issue29726@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +petr at motejlek.net, serhiy.storchaka stage: -> patch review versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 12:29:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 17:29:12 +0000 Subject: [issue29726] test_xmlrpc raises DeprecationWarnings In-Reply-To: <1488734154.48.0.272131402942.issue29726@psf.upfronthosting.co.za> Message-ID: <1488734952.53.0.819907933658.issue29726@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Dillon! Could you backport your changes to 3.6 and 3.5? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 12:32:38 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 05 Mar 2017 17:32:38 +0000 Subject: =?utf-8?q?=5Bissue29724=5D_Itertools_docs_propose_a_harmful_=E2=80=9Cspee?= =?utf-8?q?dup=E2=80=9D_without_any_explanation?= In-Reply-To: <1488731524.9.0.615939918768.issue29724@psf.upfronthosting.co.za> Message-ID: <1488735158.37.0.824750546179.issue29724@psf.upfronthosting.co.za> Steven D'Aprano added the comment: On my computer, running Python 3.5 and continuing to do other tasks while the tests are running, I get a reproducible 5% speedup by using the "default values" trick. Here's my code: import operator def dotproduct(vec1, vec2): return sum(map(operator.mul, vec1, vec2)) def dotproduct2(vec1, vec2, sum=sum, map=map, mul=operator.mul): return sum(map(mul, vec1, vec2)) setup = 'from __main__ import a, b, dotproduct, dotproduct2' from random import random as r a = [[r(), r(), r()] for i in range(10000)] b = [[r(), r(), r()] for i in range(10000)] t1 = Timer('for v1, v2 in zip(a, b): dotproduct(v1, v2)', setup) t2 = Timer('for v1, v2 in zip(a, b): dotproduct2(v1, v2)', setup) I then ran and compared min(t1.repeat(number=200, repeat=10)) min(t2.repeat(number=200, repeat=10)) a few times while reading email and doing local editing of files. Normal desktop activity. Each time, t2 (the dotproduct with the micro-optimizations) was about 5% faster. Victor will probably tell me I'm micro-benchmarking this the wrong way, so to satisfy him I did one more run: py> import statistics py> d1 = t1.repeat(number=200, repeat=10) py> d2 = t2.repeat(number=200, repeat=10) py> py> statistics.mean(d1); statistics.stdev(d1) 5.277554708393291 0.15216686556059497 py> statistics.mean(d2); statistics.stdev(d2) 4.929395379964262 0.05397586490809523 So I'm satisfied that this trick gives a real, if small, speed up for at least the example given. YMMV. ---------- nosy: +haypo type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 12:45:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 17:45:07 +0000 Subject: =?utf-8?q?=5Bissue29724=5D_Itertools_docs_propose_a_harmful_=E2=80=9Cspee?= =?utf-8?q?dup=E2=80=9D_without_any_explanation?= In-Reply-To: <1488731524.9.0.615939918768.issue29724@psf.upfronthosting.co.za> Message-ID: <1488735907.63.0.563519385986.issue29724@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: How it comparing with return vec1[0]*vec2[0]+vec1[1]*vec2[1]+vec1[2]*vec2[2] and x1, y1, z1 = vec1 x2, y2, z2 = vec2 return x1*x2+y1*y2+z1*z2 and x1, y1, z1 = vec1 x2, y2, z2 = vec2 return sum(a*b for a, b in zip(vec1, vec2)) ? A 5% speed up may be not enough high for cluttering the educational example. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 12:47:35 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 05 Mar 2017 17:47:35 +0000 Subject: =?utf-8?q?=5Bissue29724=5D_Itertools_docs_propose_a_harmful_=E2=80=9Cspee?= =?utf-8?q?dup=E2=80=9D_without_any_explanation?= In-Reply-To: <1488731524.9.0.615939918768.issue29724@psf.upfronthosting.co.za> Message-ID: <1488736055.37.0.897084630494.issue29724@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: The localization using keyword parameters is a very old trick to avoid global lookups. It does give a noticeable speedup, esp. when the localized variables are used in tight loops or the function itself is used in such loops. The 5% speedup Steven measured matches my experience with this trick as well. In some cases, it can provide a more dramatic speedup, but this depends a lot on how the code is written. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 12:56:02 2017 From: report at bugs.python.org (Leonid R.) Date: Sun, 05 Mar 2017 17:56:02 +0000 Subject: =?utf-8?q?=5Bissue29724=5D_Itertools_docs_propose_a_harmful_=E2=80=9Cspee?= =?utf-8?q?dup=E2=80=9D_without_any_explanation?= In-Reply-To: <1488731524.9.0.615939918768.issue29724@psf.upfronthosting.co.za> Message-ID: <1488736562.12.0.206091597273.issue29724@psf.upfronthosting.co.za> Leonid R. added the comment: I think this is a "last resort" optimization and shouldn't be encouraged, especially in the official documentation. There are plenty of real optimizations you can do before doing micro-optimizations like this, and there is no reason it should be mentioned in the docs. ---------- nosy: +leovp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 12:56:02 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 05 Mar 2017 17:56:02 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488736562.38.0.205753413862.issue29638@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > If you just want to add a workaround in dash_R_cleanup, I think it would be better to generate the list of all abstract classes and add three typing classes to it. Yes, I just updated the PR. I have found something else unrelated to typing, this test (in exactly this order): ./python -m test -R 5:5 test_abc test_functools fails with a reproducible pattern: test_functools leaked [0, 3, 1, 0, 0] memory blocks, sum=4 If you are happy with the PR now, we could open two separate issues for possible bug in inspect.isabstract and refleak in test_functools after test_abc. (the latter however might be potentially somehow related to abc caches) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 12:58:12 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 05 Mar 2017 17:58:12 +0000 Subject: [issue27476] Introduce a .github folder with PULL_REQUEST_TEMPLATE In-Reply-To: <1468176772.48.0.730450174113.issue27476@psf.upfronthosting.co.za> Message-ID: <1488736692.13.0.572756827557.issue27476@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The .github directory needs to stay and is being used for other purposes (like providing contributing guidelines (https://github.com/blog/1184-contributing-guidelines)). The old pull request template has already been deleted: https://github.com/python/cpython/commit/6f0eb93183519024cb360162bdd81b9faec97ba6 This bug can be closed IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 12:58:23 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 05 Mar 2017 17:58:23 +0000 Subject: [issue27476] Introduce a .github folder with PULL_REQUEST_TEMPLATE In-Reply-To: <1468176772.48.0.730450174113.issue27476@psf.upfronthosting.co.za> Message-ID: <1488736703.27.0.616497959345.issue27476@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 13:04:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 18:04:26 +0000 Subject: =?utf-8?q?=5Bissue29724=5D_Itertools_docs_propose_a_harmful_=E2=80=9Cspee?= =?utf-8?q?dup=E2=80=9D_without_any_explanation?= In-Reply-To: <1488731524.9.0.615939918768.issue29724@psf.upfronthosting.co.za> Message-ID: <1488737066.08.0.823089833533.issue29724@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have got 15% speed up. But two of my variants (the first and the second) speed up the calculation by 2.8 and 3.6 times correspondingly. It doesn't make sense to talk about microoptimization of the example if rewriting it without using iterator tools can get much larger speed up. The example still is good for the case when use vectors of large dimensions. But in that case the effect of the microoptimization is dwarfed by the time of iteration and calculation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 13:09:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 18:09:38 +0000 Subject: [issue25744] Reference leaks in test_collections In-Reply-To: <1448647458.47.0.750758594214.issue25744@psf.upfronthosting.co.za> Message-ID: <1488737378.17.0.896551518346.issue25744@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Closed in favor of issue29638. The latter has a patch. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Spurious failures in test_collections in releak hunting mode after typing is imported _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 13:18:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 18:18:15 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488737895.69.0.606118337358.issue29638@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Ivan! Seems this has fixed issue25744. Don't you mind to backport your changes to 3.6 and 3.5? ---------- versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 13:23:54 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 05 Mar 2017 18:23:54 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488738234.49.0.0284152075777.issue29638@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > Seems this has fixed issue25744. This is interesting, if I remember correctly the relevant typing classes were added only recently. I will take a look at how to back-port this (probably this will require some code changes) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 13:26:44 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 18:26:44 +0000 Subject: =?utf-8?q?=5Bissue29724=5D_Itertools_docs_propose_a_harmful_=E2=80=9Cspee?= =?utf-8?q?dup=E2=80=9D_without_any_explanation?= In-Reply-To: <1488731524.9.0.615939918768.issue29724@psf.upfronthosting.co.za> Message-ID: <1488738404.53.0.655156651273.issue29724@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 13:32:37 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 18:32:37 +0000 Subject: =?utf-8?q?=5Bissue29724=5D_Itertools_docs_propose_a_harmful_=E2=80=9Cspee?= =?utf-8?q?dup=E2=80=9D_without_any_explanation?= In-Reply-To: <1488731524.9.0.615939918768.issue29724@psf.upfronthosting.co.za> Message-ID: <1488738757.58.0.233163668848.issue29724@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The reason that this comment was added was to note the recipes themselves are unoptimized and to provide some guideance on how that could be done. The recipes themselves are provided in the cleaner looking form. FWIW, localizing variables is one of the few code optimizations available to python programmers. It is not uncommon in the standard library eventhough there are some people who just don't like it (including apparently the OP). Sorry Chris, I'm going to reject this. The note is correct, the optimization is valid, and so is the original purpose for adding it. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 13:49:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 18:49:23 +0000 Subject: [issue29727] collections.abc.Reversible doesn't fully support the reversing protocol Message-ID: <1488739763.14.0.639498346483.issue29727@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: collections.abc.Reversible doesn't work with types that are supported by reserved() but neither have the __reversed__ method nor are explicitly registered as collections.abc.Sequence. For example: >>> issubclass(array.array, collections.abc.Reversible) False The reversing protocol as well as the iterating protocol is supported not only by special method, but implicitly if the class has implemented __getitem__ and __len__ methods. >>> class Counter(int): ... def __getitem__(s, i): return i ... def __len__(s): return s ... >>> list(reversed(Counter(10))) [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] >>> issubclass(Counter, collections.abc.Reversible) False typing.Reversible starves from the same bug. See https://github.com/python/typing/issues/170. ---------- components: Library (Lib) messages: 289039 nosy: gvanrossum, rhettinger, serhiy.storchaka, stutzbach priority: normal severity: normal status: open title: collections.abc.Reversible doesn't fully support the reversing protocol type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 14:00:10 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 05 Mar 2017 19:00:10 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488740410.03.0.262603933036.issue29638@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- pull_requests: +394 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 14:02:38 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 19:02:38 +0000 Subject: [issue29727] collections.abc.Reversible doesn't fully support the reversing protocol In-Reply-To: <1488739763.14.0.639498346483.issue29727@psf.upfronthosting.co.za> Message-ID: <1488740558.57.0.290330846489.issue29727@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think this is a bug. The purpose collections.abc.Reversible is to recognize type where the behavior has been guaranteed, not to recognize all types where it happens to work. Part of the original reason for introducing ABCs in the first place was that in general there is no reliable way to detect whether a class defining __getitem__ is a sequence or a mapping. A creator of such a class either needs to subclass from Sequence or register as a Sequence. The fact that reversed(Counter(10)) happens to work is no more interesting that the fact Counter(10)[5] happens to work eventhough isinstance(Counter, Sequence) returns False. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 14:07:58 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 05 Mar 2017 19:07:58 +0000 Subject: [issue29728] Expose TCP_NOTSENT_LOWAT Message-ID: <1488740878.04.0.852546577047.issue29728@psf.upfronthosting.co.za> New submission from Nathaniel Smith: https://github.com/python/cpython/pull/477 ---------- components: Library (Lib) messages: 289041 nosy: njs priority: normal severity: normal status: open title: Expose TCP_NOTSENT_LOWAT _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 14:09:12 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 19:09:12 +0000 Subject: =?utf-8?q?=5Bissue29724=5D_Itertools_docs_propose_a_harmful_=E2=80=9Cspee?= =?utf-8?q?dup=E2=80=9D_without_any_explanation?= In-Reply-To: <1488731524.9.0.615939918768.issue29724@psf.upfronthosting.co.za> Message-ID: <1488740952.39.0.277342389034.issue29724@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Additional note: For folks interested in performance, it is common for people not to realize that function call overhead can dominate their timings (see this recent SO question as a recent, but typical example http://stackoverflow.com/questions/41772054 ). In any case, the note needs to remain because people commonly move these recipes into production code and need to be warned that basic optimizations were skipped. This is important in a module where improved performance is one of the primary goals. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 14:15:41 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 05 Mar 2017 19:15:41 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1488741341.56.0.495729468769.issue29638@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- pull_requests: +395 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 14:18:23 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 19:18:23 +0000 Subject: [issue29727] collections.abc.Reversible doesn't fully support the reversing protocol In-Reply-To: <1488739763.14.0.639498346483.issue29727@psf.upfronthosting.co.za> Message-ID: <1488741503.24.0.307893284113.issue29727@psf.upfronthosting.co.za> Raymond Hettinger added the comment: One other thought: array.array() object should probably be registered so that it recognizable as a Sequence and as Reversible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 14:36:22 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 05 Mar 2017 19:36:22 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1488742582.07.0.217532481789.issue29723@psf.upfronthosting.co.za> Ned Deily added the comment: I think this is a result of the changes introduced with Issue29319. Perhaps a more prominent NEWS entry is needed? Nick? Ned, does this change in behavior cause problems? ---------- nosy: +ncoghlan, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 14:59:58 2017 From: report at bugs.python.org (Nic Watson) Date: Sun, 05 Mar 2017 19:59:58 +0000 Subject: [issue29729] UUID bytes constructor has too-tight an assertion Message-ID: <1488743998.42.0.177002814613.issue29729@psf.upfronthosting.co.za> New submission from Nic Watson: The assertion: File "/usr/lib/python3.6/uuid.py", line 150, in __init__ assert isinstance(bytes, bytes_), repr(bytes) is too specific (and IMHO, unpythonic). One may want to pass a bytearray or a memoryview. See int.from_bytes for an example that takes "bytes" but accepts anything that acts like a bytes. A simple solution may be to delete the assertion (it worked for me). Example code: import uuid b = uuid.uuid1().bytes ba = bytearray(b) print(uuid.UUID(bytes=b)) # another API that works similarly, accepts a bytearray print(int.from_bytes(ba, byteorder='big')) # fails on assertion print(uuid.UUID(bytes=ba)) ---------- components: Extension Modules messages: 289045 nosy: jnwatson priority: normal severity: normal status: open title: UUID bytes constructor has too-tight an assertion type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 15:30:59 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 05 Mar 2017 20:30:59 +0000 Subject: [issue29728] Expose TCP_NOTSENT_LOWAT In-Reply-To: <1488740878.04.0.852546577047.issue29728@psf.upfronthosting.co.za> Message-ID: <1488745859.75.0.199770494907.issue29728@psf.upfronthosting.co.za> Changes by Nathaniel Smith : ---------- pull_requests: +396 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 15:32:09 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 05 Mar 2017 20:32:09 +0000 Subject: [issue29728] Expose TCP_NOTSENT_LOWAT In-Reply-To: <1488740878.04.0.852546577047.issue29728@psf.upfronthosting.co.za> Message-ID: <1488745929.93.0.296269363013.issue29728@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 16:38:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 21:38:08 +0000 Subject: [issue29645] webbrowser module import has heavy side effects In-Reply-To: <1488014818.45.0.347439137836.issue29645@psf.upfronthosting.co.za> Message-ID: <1488749888.73.0.326692470401.issue29645@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +397 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 16:43:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 21:43:13 +0000 Subject: [issue24037] Argument Clinic: add the boolint converter In-Reply-To: <1429785188.86.0.806042190219.issue24037@psf.upfronthosting.co.za> Message-ID: <1488750193.08.0.526743069584.issue24037@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +398 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 16:55:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 21:55:08 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488750908.05.0.749621370112.issue29695@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +399 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 17:00:47 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 05 Mar 2017 22:00:47 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1488751247.85.0.360824935284.issue29723@psf.upfronthosting.co.za> Eryk Sun added the comment: That's not the current directory. It's the 'script' directory (i.e. the parent of main361), as set by PySys_SetArgv when Py_IsolatedFlag isn't set. The old behavior was for RunMainFromImporter to unconditionally replace this directory in sys.path with the import source for "__main__.py", which is the correct behavior, except I think it should try to get an absolute path. The resolution for #29319 changed this such that when sys.path[0] is non-empty it now inserts the import source at index 0 rather than replace index 0. It seems to me that this new logic should only be used in isolated mode. Otherwise it should be replacing this bogus script directory like it used to. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 17:01:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 05 Mar 2017 22:01:01 +0000 Subject: =?utf-8?q?=5Bissue29724=5D_Itertools_docs_propose_a_harmful_=E2=80=9Cspee?= =?utf-8?q?dup=E2=80=9D_without_any_explanation?= In-Reply-To: <1488735158.37.0.824750546179.issue29724@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Victor will probably tell me I'm micro-benchmarking this the wrong way, so to satisfy him I did one more run: You are doing it the wrong way :-D Please replace Timeit(...) with runner=perf.Runner() and then runner.timeit('bench1', ...). Runner spaws multiples processes and then test if a comparison is significant (perf compare_to a.json b.json). Moreover, for microbenchmaks, I highly recommand to tune your system for benchmarks: python3 -m perf system tune, and see also perf doc ;-) 5% is not significant on a microbenchmark, it can be pure noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 17:01:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 22:01:42 +0000 Subject: [issue28749] Fixed the documentation of the mapping codec APIs In-Reply-To: <1479637798.25.0.994184606714.issue28749@psf.upfronthosting.co.za> Message-ID: <1488751302.61.0.499509118171.issue28749@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +400 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 17:15:13 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 05 Mar 2017 22:15:13 +0000 Subject: [issue29729] UUID bytes constructor has too-tight an assertion In-Reply-To: <1488743998.42.0.177002814613.issue29729@psf.upfronthosting.co.za> Message-ID: <1488752113.2.0.202328022007.issue29729@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 17:22:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 22:22:17 +0000 Subject: [issue29196] Remove old-deprecated plistlib features In-Reply-To: <1483807940.54.0.471253591392.issue29196@psf.upfronthosting.co.za> Message-ID: <1488752537.37.0.890268384222.issue29196@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +401 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 17:27:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 22:27:15 +0000 Subject: [issue28682] Bytes support in os.fwalk() In-Reply-To: <1479029050.5.0.426622691368.issue28682@psf.upfronthosting.co.za> Message-ID: <1488752835.33.0.817967186812.issue28682@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +402 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 17:37:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 05 Mar 2017 22:37:23 +0000 Subject: [issue29104] Left bracket remains in format string result when '\' preceeds it In-Reply-To: <1483012585.51.0.342717701316.issue29104@psf.upfronthosting.co.za> Message-ID: <1488753443.26.0.42760109287.issue29104@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +403 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 18:11:18 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 05 Mar 2017 23:11:18 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check Message-ID: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> New submission from Oren Milman: ------------ current state ------------ if (PyNumber_Check(obj)) { someVar = PyNumber_AsSsize_t(obj, SomeError); if (someVar == -1 && PyErr_Occurred()) { return errVal; } } else { PyErr_Format(PyExc_TypeError, "integer argument expected, got '%.200s'", Py_TYPE(obj)->tp_name); return errVal; } Something similar to this happens in: - Modules/mmapmodule.c in mmap_convert_ssize_t - Modules/_io/_iomodule.c in _PyIO_ConvertSsize_t - Modules/_io/stringio.c in: * _io_StringIO_read_impl * _io_StringIO_readline_impl * _io_StringIO_truncate_impl (Moreover, in: - Objects/bytes_methods.c in parse_args_finds_byte - Objects/exceptions.c in oserror_init PyNumber_AsSsize_t is called only if PyNumber_Check returns true.) Note that: - PyNumber_Check checks whether nb_int != NULL or nb_float != NULL. - PyNumber_AsSsize_t calls PyNumber_Index, which, before calling nb_index, raises a TypeError (with a similar error message) in case nb_index == NULL. - The docs say '... when __index__() is defined __int__() should also be defined ...'. So the behavior with and without the call to PyNumber_Check is quite the same. The only potential advantage of calling PyNumber_Check is skipping the call to PyNumber_AsSsize_t. But PyNumber_AsSsize_t would be called also in case nb_index == NULL and (nb_int != NULL or nb_float != NULL). Thus, the only case in which the call to PyNumber_Check might be useful, is when nb_int == nb_float == nb_index == NULL. ------------ proposed changes ------------ Either remove each of these calls to PyNumber_Check, or at least replace it with a call to PyIndex_Check, which checks whether nb_index != NULL, and thus would be more useful than PyNumber_Check. Note that such a change shouldn't affect the behavior, except for a slightly different wording of the error message in case a TypeError is raised. ---------- components: IO messages: 289048 nosy: Oren Milman priority: normal severity: normal status: open title: unoptimal calls to PyNumber_Check type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 18:19:26 2017 From: report at bugs.python.org (Ned Batchelder) Date: Sun, 05 Mar 2017 23:19:26 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1488755966.65.0.318367817715.issue29723@psf.upfronthosting.co.za> Ned Batchelder added the comment: I don't have a specific problem that it causes. It's just a difference from any previous CPython version. About the PyPy thing: it has always behaved this way: $ for ver in 4.0.1 5.1.1 5.4.0 5.6.0; do py=/usr/local/pythonz/pythons/PyPy-$ver/bin/pypy; $py -V; $py main361; done Python 2.7.10 (5f8302b8bf9f, Nov 18 2015, 10:38:03) [PyPy 4.0.1 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] ['main361', '/Users/ned/foo', '/usr/local/pythonz/pythons/PyPy-4.0.1/lib_pypy/__extensions__', '/usr/local/pythonz/pythons/PyPy-4.0.1/lib_pypy', '/usr/local/pythonz/pythons/PyPy-4.0.1/lib-python/2.7', '/usr/local/pythonz/pythons/PyPy-4.0.1/lib-python/2.7/lib-tk', '/usr/local/pythonz/pythons/PyPy-4.0.1/lib-python/2.7/plat-darwin', '/usr/local/pythonz/pythons/PyPy-4.0.1/lib-python/2.7/plat-mac', '/usr/local/pythonz/pythons/PyPy-4.0.1/lib-python/2.7/plat-mac/lib-scriptpackages', '/usr/local/pythonz/pythons/PyPy-4.0.1/site-packages'] Python 2.7.10 (b0a649e90b66, Apr 28 2016, 08:33:07) [PyPy 5.1.1 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] ['main361', '/Users/ned/foo', '/usr/local/pythonz/pythons/PyPy-5.1.1/lib_pypy/__extensions__', '/usr/local/pythonz/pythons/PyPy-5.1.1/lib_pypy', '/usr/local/pythonz/pythons/PyPy-5.1.1/lib-python/2.7', '/usr/local/pythonz/pythons/PyPy-5.1.1/lib-python/2.7/lib-tk', '/usr/local/pythonz/pythons/PyPy-5.1.1/lib-python/2.7/plat-darwin', '/usr/local/pythonz/pythons/PyPy-5.1.1/lib-python/2.7/plat-mac', '/usr/local/pythonz/pythons/PyPy-5.1.1/lib-python/2.7/plat-mac/lib-scriptpackages', '/usr/local/pythonz/pythons/PyPy-5.1.1/site-packages'] Python 2.7.10 (77392ad26350, Aug 28 2016, 05:07:44) [PyPy 5.4.0 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] ['main361', '/Users/ned/foo', '/usr/local/pythonz/pythons/PyPy-5.4.0/lib_pypy/__extensions__', '/usr/local/pythonz/pythons/PyPy-5.4.0/lib_pypy', '/usr/local/pythonz/pythons/PyPy-5.4.0/lib-python/2.7', '/usr/local/pythonz/pythons/PyPy-5.4.0/lib-python/2.7/lib-tk', '/usr/local/pythonz/pythons/PyPy-5.4.0/lib-python/2.7/plat-darwin', '/usr/local/pythonz/pythons/PyPy-5.4.0/lib-python/2.7/plat-mac', '/usr/local/pythonz/pythons/PyPy-5.4.0/lib-python/2.7/plat-mac/lib-scriptpackages', '/usr/local/pythonz/pythons/PyPy-5.4.0/site-packages'] Python 2.7.12 (aff251e54385, Nov 09 2016, 17:25:49) [PyPy 5.6.0 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] ['main361', '/Users/ned/foo', '/usr/local/pythonz/pythons/PyPy-5.6.0/lib_pypy/__extensions__', '/usr/local/pythonz/pythons/PyPy-5.6.0/lib_pypy', '/usr/local/pythonz/pythons/PyPy-5.6.0/lib-python/2.7', '/usr/local/pythonz/pythons/PyPy-5.6.0/lib-python/2.7/lib-tk', '/usr/local/pythonz/pythons/PyPy-5.6.0/lib-python/2.7/plat-darwin', '/usr/local/pythonz/pythons/PyPy-5.6.0/lib-python/2.7/plat-mac', '/usr/local/pythonz/pythons/PyPy-5.6.0/lib-python/2.7/plat-mac/lib-scriptpackages', '/usr/local/pythonz/pythons/PyPy-5.6.0/site-packages'] $ for ver in 2.4.0 5.5.0; do py=/usr/local/pythonz/pythons/PyPy3-$ver/bin/pypy3; $py -V; $py main361; done Python 3.2.5 (b2091e973da6, Oct 19 2014, 18:30:58) [PyPy 2.4.0 with GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.51)] ['main361', '/Users/ned/foo', '/usr/local/pythonz/pythons/PyPy3-2.4.0/lib_pypy/__extensions__', '/usr/local/pythonz/pythons/PyPy3-2.4.0/lib_pypy', '/usr/local/pythonz/pythons/PyPy3-2.4.0/lib-python/3', '/usr/local/pythonz/pythons/PyPy3-2.4.0/lib-python/3/lib-tk', '/usr/local/pythonz/pythons/PyPy3-2.4.0/lib-python/3/plat-darwin', '/usr/local/pythonz/pythons/PyPy3-2.4.0/lib-python/3/plat-mac', '/usr/local/pythonz/pythons/PyPy3-2.4.0/lib-python/3/plat-mac/lib-scriptpackages', '/usr/local/pythonz/pythons/PyPy3-2.4.0/site-packages'] Python 3.3.5 (619c0d5af0e5, Oct 08 2016, 22:08:19) [PyPy 5.5.0-alpha0 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] ['main361', '/Users/ned/foo', '/usr/local/pythonz/pythons/PyPy3-5.5.0/lib_pypy/__extensions__', '/usr/local/pythonz/pythons/PyPy3-5.5.0/lib_pypy', '/usr/local/pythonz/pythons/PyPy3-5.5.0/lib-python/3', '/usr/local/pythonz/pythons/PyPy3-5.5.0/lib-python/3/lib-tk', '/usr/local/pythonz/pythons/PyPy3-5.5.0/lib-python/3/plat-darwin', '/usr/local/pythonz/pythons/PyPy3-5.5.0/lib-python/3/plat-mac', '/usr/local/pythonz/pythons/PyPy3-5.5.0/lib-python/3/plat-mac/lib-scriptpackages', '/usr/local/pythonz/pythons/PyPy3-5.5.0/site-packages'] $ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 18:22:03 2017 From: report at bugs.python.org (dillon.brock) Date: Sun, 05 Mar 2017 23:22:03 +0000 Subject: [issue29726] test_xmlrpc raises DeprecationWarnings In-Reply-To: <1488734154.48.0.272131402942.issue29726@psf.upfronthosting.co.za> Message-ID: <1488756123.36.0.944226863574.issue29726@psf.upfronthosting.co.za> dillon.brock added the comment: The cherry-pick is causing a merge conflict because 3.6 and 3.5 do not include the SimpleXMLRPCDispatcherTestCase that this fix modifies. Should I backport that entire test case as well as the fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 18:29:25 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 23:29:25 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1488756565.89.0.461398582777.issue29730@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 for removing each of these calls to PyNumber_Check. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 18:32:41 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 05 Mar 2017 23:32:41 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488756761.91.0.774341475528.issue29695@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Victor and Serhiy that we can bypass a deprecation phase here and just get it done. In the rare case of int(x=3.14), the fix is trivial. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 18:50:34 2017 From: report at bugs.python.org (INADA Naoki) Date: Sun, 05 Mar 2017 23:50:34 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1488757834.65.0.477665632622.issue29719@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +404 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 19:02:35 2017 From: report at bugs.python.org (Eryk Sun) Date: Mon, 06 Mar 2017 00:02:35 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1488758555.75.0.416233253654.issue29723@psf.upfronthosting.co.za> Eryk Sun added the comment: > I don't have a specific problem that it causes. Adding an arbitrary directory ahead of the standard library in sys.path is a problem waiting to happen. This also happens when the import source is a zip file, e.g. a .pyz app. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 20:34:31 2017 From: report at bugs.python.org (Zachary Ware) Date: Mon, 06 Mar 2017 01:34:31 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1488764071.95.0.992757105686.issue29571@psf.upfronthosting.co.za> Zachary Ware added the comment: This seems to have broken test_re on Windows, see https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.1 I found this change to be the culprit via git bisect, unfortunately we didn't have any working CI on Windows (buildbots were otherwise broken) at the time this was merged. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 21:15:40 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Mar 2017 02:15:40 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1488766540.75.0.393536622342.issue29719@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, I disagree. I think the point of adding these directives is that shows for what release of 3.6.x they apply. It is expected that the What's New documents may be updated during the lifecycle of a major release and having the release and date there lets the reader know that they are update. For example, at the moment https://docs.python.org/3.6/whatsnew/3.6.html shows: What?s New In Python 3.6 Release: 3.6.1rc1 Date: March 05, 2017 which is correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 21:18:41 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Mar 2017 02:18:41 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1488766721.31.0.598856518586.issue29719@psf.upfronthosting.co.za> INADA Naoki added the comment: https://docs.python.org/3.7/whatsnew/3.6.html shows: Release: 3.7.0a0 Date: February 15, 2017 Is it make sense for you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 21:20:02 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Mar 2017 02:20:02 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1488766802.47.0.503772846516.issue29719@psf.upfronthosting.co.za> INADA Naoki added the comment: Additonally, unlike "changelog", "What's New" only shows difference between 3.5 and 3.6. It won't be updated to describe changes between 3.6.0 and 3.6.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 21:27:20 2017 From: report at bugs.python.org (Craig Rodrigues) Date: Mon, 06 Mar 2017 02:27:20 +0000 Subject: [issue4851] xml.dom.minidom.Element.cloneNode fails with AttributeError In-Reply-To: <1231192810.66.0.263343969898.issue4851@psf.upfronthosting.co.za> Message-ID: <1488767240.19.0.319956100573.issue4851@psf.upfronthosting.co.za> Craig Rodrigues added the comment: This looks like a duplicate of https://bugs.python.org/issue15290 . 15290 was closed as invalid, and the submitter was told that the code should be changed to not rely on creating elements outside of the document interface. I encountered the same problem when trying to port Twisted to Python 3. ---------- nosy: +Craig Rodrigues _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 21:27:51 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Mar 2017 02:27:51 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1488767271.54.0.609421310627.issue29719@psf.upfronthosting.co.za> Ned Deily added the comment: > Additonally, unlike "changelog", "What's New" only shows difference between 3.5 and 3.6. It won't be updated to describe changes between 3.6.0 and 3.6.1. That's not always true. There are occasionally changes made in the What's New document for maintenance releases. See, for example, https://docs.python.org/3.5/whatsnew/3.5.html. You'll find references to 3.5.1 and 3.5.2 there. If it's truly bothering people, a better solution is to just remove the release and date directives. They aren't there for earlier releases. We can live without them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 21:28:34 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Mar 2017 02:28:34 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1488767314.75.0.68176771851.issue29719@psf.upfronthosting.co.za> INADA Naoki added the comment: I'm sorry, I was wrong. https://docs.python.org/3.5/whatsnew/3.5.html asyncio has "Updates in 3.5.1:" section. provisional package will introduce updates in what's new in bugfix release. So is it OK to just removing Date and Release field? "Date (when this HTML is built)" and "Release (of branch this page is built)" are not good for "What's New In 3.6" page. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 21:29:08 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Mar 2017 02:29:08 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1488767348.48.0.514868793877.issue29719@psf.upfronthosting.co.za> Ned Deily added the comment: Heh, it looks like we agree! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 21:42:57 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 06 Mar 2017 02:42:57 +0000 Subject: [issue24329] __qualname__ and __slots__ In-Reply-To: <1432930157.09.0.507147768187.issue24329@psf.upfronthosting.co.za> Message-ID: <1488768177.63.0.673393703569.issue24329@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +405 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 21:43:42 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 06 Mar 2017 02:43:42 +0000 Subject: [issue24329] __qualname__ and __slots__ In-Reply-To: <1432930157.09.0.507147768187.issue24329@psf.upfronthosting.co.za> Message-ID: <1488768222.26.0.160009058542.issue24329@psf.upfronthosting.co.za> Xiang Zhang added the comment: PR made. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 22:15:36 2017 From: report at bugs.python.org (Craig Rodrigues) Date: Mon, 06 Mar 2017 03:15:36 +0000 Subject: [issue15290] setAttribute() can fail In-Reply-To: <1341703964.25.0.272780923096.issue15290@psf.upfronthosting.co.za> Message-ID: <1488770136.27.0.245126071126.issue15290@psf.upfronthosting.co.za> Craig Rodrigues added the comment: Same issue was brought up in http://bugs.python.org/issue4851 ---------- nosy: +Craig Rodrigues _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 5 22:36:55 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 06 Mar 2017 03:36:55 +0000 Subject: [issue29657] os.symlink: FileExistsError shows wrong message In-Reply-To: <1488099144.41.0.738429373533.issue29657@psf.upfronthosting.co.za> Message-ID: <1488771415.38.0.719644955494.issue29657@psf.upfronthosting.co.za> Xiang Zhang added the comment: I agree with Eryk. The error message is misleading. When I see it, I take it as source -> destination. I think we should make the error message clearer, or document it in the OSError documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 00:56:33 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 06 Mar 2017 05:56:33 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> Message-ID: <1488779793.46.0.557269894755.issue29714@psf.upfronthosting.co.za> Xiang Zhang added the comment: The problem is now _PyBytes_FormatEx uses strchr to sniff %. It should use memchr instead. ---------- assignee: -> xiang.zhang nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 00:59:48 2017 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 06 Mar 2017 05:59:48 +0000 Subject: [issue29731] Ability to filter warnings to print current stack Message-ID: <1488779988.78.0.195524634738.issue29731@psf.upfronthosting.co.za> New submission from Matthias Bussonnier: The warning module is extremely useful, especially the ability to change various level of verbosity and filter by multiple criteria. It is though sometime hard to pinpoint why a warning was triggered, or actually what triggered a warning. This is often due to the fact that libraries don't set the `stacklevel=...` correctly, that it is hard to get right (like at import time), or because warnings get triggered by complex, not obvious codepaths. One workaround is to switch from `always`/`once` to "error" to raise exceptions, but that can be quite troublesome in production, if other warnings are encountered in the meantime. Would it be accepted to add a warning filter type "stack" (or whatever name please you ...) that would not only print the current warning, but the stack leading to it. That is to say output almost identical as "error" but not actually raising ? Assuming above is reasonable, I have a working patch (both in the c and py implementation of warnings), though it can't seem to find how respect the `stacklevel=...` parameter unless `warn_explicit` is changed to allow an additional `frame` argument. Would adding this field be acceptable ? Or arguably, if one is interested in the stack, ignoring the stacklevel may make sens as one may want to explore the full reason of the warning (ie its source that may be hidden by stacklevel=... ) , and not only what triggered it. ---------- components: Library (Lib) messages: 289066 nosy: mbussonn priority: normal severity: normal status: open title: Ability to filter warnings to print current stack type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 01:01:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 06:01:51 +0000 Subject: [issue24329] __qualname__ and __slots__ In-Reply-To: <1432930157.09.0.507147768187.issue24329@psf.upfronthosting.co.za> Message-ID: <1488780111.02.0.174808250324.issue24329@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: serhiy.storchaka -> xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 01:05:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 06:05:41 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1488780341.32.0.947698210281.issue29730@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +mark.dickinson, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 01:09:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 06:09:41 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1488780581.02.0.193836591613.issue29571@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 01:11:04 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 06 Mar 2017 06:11:04 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1488780664.67.0.952769301389.issue5945@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: needs patch -> patch review versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 01:12:45 2017 From: report at bugs.python.org (Matthias Bussonnier) Date: Mon, 06 Mar 2017 06:12:45 +0000 Subject: [issue29731] Ability to filter warnings to print current stack In-Reply-To: <1488779988.78.0.195524634738.issue29731@psf.upfronthosting.co.za> Message-ID: <1488780765.78.0.0973765141379.issue29731@psf.upfronthosting.co.za> Changes by Matthias Bussonnier : ---------- pull_requests: +406 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 01:54:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 06:54:15 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488783255.9.0.160815880298.issue29695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I already merged the patch as 58d23e68068996c76cac78887ec67dee68cdbc72. If you think that it would be better to remove without deprecation, the following patch does this. ---------- Added file: http://bugs.python.org/file46702/remove-bad-keywords.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 02:04:52 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 06 Mar 2017 07:04:52 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488783891.99.0.721806153176.issue29695@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I do think it would be better to not have the deprecation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 02:11:30 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 06 Mar 2017 07:11:30 +0000 Subject: [issue29727] collections.abc.Reversible doesn't fully support the reversing protocol In-Reply-To: <1488739763.14.0.639498346483.issue29727@psf.upfronthosting.co.za> Message-ID: <1488784290.47.0.603131211354.issue29727@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 02:32:14 2017 From: report at bugs.python.org (Mathieu Dupuy) Date: Mon, 06 Mar 2017 07:32:14 +0000 Subject: [issue29690] no %z directive for strptime in python2, doc says nothing about it In-Reply-To: <1488439889.25.0.877178323072.issue29690@psf.upfronthosting.co.za> Message-ID: <1488785534.33.0.180449230863.issue29690@psf.upfronthosting.co.za> Mathieu Dupuy added the comment: Neither documentation is clear on whether each of those flags are available for strptime too. A precision should be added on a flag if it's not available for strptime. What do you think ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 02:41:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 07:41:33 +0000 Subject: [issue13566] Increase pickle compatibility In-Reply-To: <1323437104.23.0.789258355405.issue13566@psf.upfronthosting.co.za> Message-ID: <1488786093.36.0.340507386559.issue13566@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file46703/pickle-old-strings-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 02:50:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 07:50:42 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1488786642.33.0.702867700077.issue5945@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Proposed wording doesn't looks much informative to me. Maybe just say that PyMapping_Check() also returns 1 for sequences that support slicing? And recommend `PyMapping_Check() && !PySequence_Check()` for true mapping test? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 02:52:43 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 06 Mar 2017 07:52:43 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1488786763.32.0.94980744051.issue29571@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Yep, I think we should merge https://github.com/python/cpython/pull/422 and revert ncoghlan's change. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 02:54:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 07:54:36 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1488786876.05.0.291053708593.issue29571@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure this will help on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 02:55:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 07:55:14 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1488786914.88.0.292647127327.issue29571@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And I don't understand why my fix doesn't work on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 02:55:21 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 06 Mar 2017 07:55:21 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1488786876.05.0.291053708593.issue29571@psf.upfronthosting.co.za> Message-ID: <1488786918.1113703.901582968.469C1D76@webmail.messagingengine.com> Benjamin Peterson added the comment: But the test was never broken on windows. On Sun, Mar 5, 2017, at 23:54, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > I'm not sure this will help on Windows. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 02:55:56 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 06 Mar 2017 07:55:56 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1488786918.1113703.901582968.469C1D76@webmail.messagingengine.com> Message-ID: <1488786953.1114016.901583184.73235D30@webmail.messagingengine.com> Benjamin Peterson added the comment: getpreferredencoding() takes a completely different path on windows (returns a codepage) and isn't related to the C locale. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 02:57:46 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 06 Mar 2017 07:57:46 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> Message-ID: <1488787066.98.0.869859694585.issue29714@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +407 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 02:58:37 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 06 Mar 2017 07:58:37 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1488787117.54.0.942924982226.issue29571@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm with Serhiy on this one: if the "re" module isn't using locale.getpreferredencoding(), then there's something odd going on. It just sounds like the disconnect on Windows is the opposite of the one we hit on Linux without Benjamin's patch, perhaps due to the UTF-8 mode changes - it wouldn't surprise me to learn that the re module is still using mbcs there instead of utf-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 03:01:34 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Mar 2017 08:01:34 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1488787294.65.0.366511251833.issue29719@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +408 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 03:01:39 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 06 Mar 2017 08:01:39 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1488787117.54.0.942924982226.issue29571@psf.upfronthosting.co.za> Message-ID: <1488787296.1115181.901587032.2C084C2C@webmail.messagingengine.com> Benjamin Peterson added the comment: I don't see what's odd about it. re.LOCALE uses the C locale, which one obtains from locale.getlocale(). getpreferredencoding() is not documented to have anything to do with the C locale, and indeed on Windows it may be completely different. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 03:13:44 2017 From: report at bugs.python.org (Kamil Frankowicz) Date: Mon, 06 Mar 2017 08:13:44 +0000 Subject: [issue29732] Heap out of bounds read in tok_nextc() Message-ID: <1488788024.7.0.161413972339.issue29732@psf.upfronthosting.co.za> New submission from Kamil Frankowicz: After some fuzz testing I found a crashing test case. Version: 2.7.13 compiled from source with Clang 3.9.1. To reproduce: python python_hoobr_tok_nextc.py Extract from Valgrind log (full log file at https://gist.github.com/fumfel/f9780e567dec761f8524523fff040742): ==15583== Process terminating with default action of signal 11 (SIGSEGV) ==15583== Bad permissions for mapped region at address 0x5F36000 ==15583== at 0x41EBC4: tok_nextc (tokenizer.c:861) ==15583== by 0x41ABA2: tok_get (tokenizer.c:1568) ==15583== by 0x41ABA2: PyTokenizer_Get (tokenizer.c:1681) ==15583== by 0x4171D4: parsetok (parsetok.c:159) ==15583== by 0x417DC0: PyParser_ParseFileFlagsEx (parsetok.c:106) ==15583== by 0x5C4A1D: PyParser_ASTFromFile (pythonrun.c:1499) ==15583== by 0x5C4C28: PyRun_FileExFlags (pythonrun.c:1354) ==15583== by 0x5C4009: PyRun_SimpleFileExFlags (pythonrun.c:948) ==15583== by 0x5C34AA: PyRun_AnyFileExFlags (pythonrun.c:752) ==15583== by 0x416478: Py_Main (main.c:640) ==15583== by 0x578782F: (below main) (libc-start.c:291) ---------- components: Interpreter Core files: python_hoobr_tok_nextc.py messages: 289078 nosy: Kamil Frankowicz priority: normal severity: normal status: open title: Heap out of bounds read in tok_nextc() type: crash versions: Python 2.7 Added file: http://bugs.python.org/file46704/python_hoobr_tok_nextc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 03:21:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 08:21:40 +0000 Subject: [issue29732] Heap out of bounds read in tok_nextc() In-Reply-To: <1488788024.7.0.161413972339.issue29732@psf.upfronthosting.co.za> Message-ID: <1488788500.9.0.714713931658.issue29732@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 03:33:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 08:33:55 +0000 Subject: [issue28667] FD_SETSIZE is unsigned on FreeBSD In-Reply-To: <1478872990.6.0.256289601446.issue28667@psf.upfronthosting.co.za> Message-ID: <1488789235.84.0.807870705545.issue28667@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +409 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 04:08:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 09:08:38 +0000 Subject: [issue25996] Add support of file descriptor in os.scandir() In-Reply-To: <1451758238.49.0.729670752807.issue25996@psf.upfronthosting.co.za> Message-ID: <1488791318.41.0.22492198758.issue25996@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +410 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 04:10:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 09:10:39 +0000 Subject: [issue25996] Add support of file descriptor in os.scandir() In-Reply-To: <1451758238.49.0.729670752807.issue25996@psf.upfronthosting.co.za> Message-ID: <1488791438.99.0.796698628516.issue25996@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm wondering is it possible to implement this feature on Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 04:14:04 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 06 Mar 2017 09:14:04 +0000 Subject: [issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc In-Reply-To: <1462256356.96.0.954300432794.issue26915@psf.upfronthosting.co.za> Message-ID: <1488791644.92.0.459742322337.issue26915@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +411 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 04:17:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 09:17:38 +0000 Subject: [issue24821] The optimization of string search can cause pessimization In-Reply-To: <1438927886.02.0.407236930114.issue24821@psf.upfronthosting.co.za> Message-ID: <1488791858.01.0.294685630323.issue24821@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 04:21:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 09:21:26 +0000 Subject: [issue25996] Add support of file descriptor in os.scandir() In-Reply-To: <1451758238.49.0.729670752807.issue25996@psf.upfronthosting.co.za> Message-ID: <1488792086.32.0.62549504492.issue25996@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'm wondering is it possible to implement this feature on Windows? On Windows, scandir() is implemented with FindFirstFile() which takes strings. This function creates a handle which should then be passed to FindNextFile(). There is no similar function taking a directory handle, so it's not possible to implement os.scandir(fd) on Windows. It seems like the gnulib emulates fdopendir() on Windows, and its documentation contains warnings: https://www.gnu.org/software/gnulib/manual/html_node/fdopendir.html "But the replacement function is not safe to be used in libraries and is not multithread-safe. Also, the replacement does not guarantee that ?dirfd(fdopendir(n))==n? (dirfd might fail, or return a different file descriptor than n)." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 04:28:47 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 06 Mar 2017 09:28:47 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> Message-ID: <1488792527.99.0.636621539304.issue29714@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +412 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 04:32:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 09:32:05 +0000 Subject: [issue24821] The optimization of string search can cause pessimization In-Reply-To: <1438927886.02.0.407236930114.issue24821@psf.upfronthosting.co.za> Message-ID: <1488792725.64.0.541518559965.issue24821@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +413 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 04:33:15 2017 From: report at bugs.python.org (prayerslayer) Date: Mon, 06 Mar 2017 09:33:15 +0000 Subject: [issue29595] Expose max_queue_size in ThreadPoolExecutor In-Reply-To: <1487369423.42.0.265838648983.issue29595@psf.upfronthosting.co.za> Message-ID: <1488792795.38.0.019384902207.issue29595@psf.upfronthosting.co.za> prayerslayer added the comment: Hello again, there's a reviewed PR open for this issue and it hasn't even received authoritative feedback yet (ie whether or not you intend to support this feature at all). I would be very happy if a core dev could look over this change before everyone forgets about it :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 04:39:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 09:39:59 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1488793199.82.0.782683036911.issue20087@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> test needed versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 04:41:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 09:41:12 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1488793272.52.0.572858451275.issue29571@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Mismatch between glibc and X11 locale.alias _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 04:53:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 09:53:17 +0000 Subject: [issue28974] Make default __format__ be equivalent to __str__ In-Reply-To: <1481752330.56.0.847513688639.issue28974@psf.upfronthosting.co.za> Message-ID: <1488793997.42.0.337713778437.issue28974@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +415 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 04:57:34 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 06 Mar 2017 09:57:34 +0000 Subject: [issue28974] Make default __format__ be equivalent to __str__ In-Reply-To: <1481752330.56.0.847513688639.issue28974@psf.upfronthosting.co.za> Message-ID: <1488794254.08.0.970321068506.issue28974@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:05:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 10:05:05 +0000 Subject: [issue28692] gettext: deprecate selecting plural form by fractional numbers In-Reply-To: <1479148679.54.0.229445108959.issue28692@psf.upfronthosting.co.za> Message-ID: <1488794705.87.0.832379331356.issue28692@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +416 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:09:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 10:09:22 +0000 Subject: [issue28243] Performance regression in functools.partial() In-Reply-To: <1474482461.16.0.647819968557.issue28243@psf.upfronthosting.co.za> Message-ID: <1488794962.76.0.133344749235.issue28243@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can this issue be closed now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:15:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 10:15:57 +0000 Subject: [issue25582] Fixed memory leaks in test_ctypes In-Reply-To: <1446927500.57.0.889992318056.issue25582@psf.upfronthosting.co.za> Message-ID: <1488795357.93.0.1924281194.issue25582@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have no ideas how to fix the remained constant memory consumption. But this is 2.7 issue only, so I'm closing this. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:18:22 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 06 Mar 2017 10:18:22 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> Message-ID: <1488795502.98.0.170913492157.issue29714@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for the report, Nick! ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:23:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 10:23:20 +0000 Subject: [issue15954] No error checking after using of the wcsxfrm() In-Reply-To: <1347876874.21.0.668678433738.issue15954@psf.upfronthosting.co.za> Message-ID: <1488795800.33.0.0769740641052.issue15954@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +417 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:25:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 10:25:09 +0000 Subject: [issue15695] Correct __sizeof__ support for StgDict In-Reply-To: <1345144416.71.0.984691068113.issue15695@psf.upfronthosting.co.za> Message-ID: <1488795909.46.0.00344707514486.issue15695@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.7 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:27:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 10:27:23 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> Message-ID: <1488796043.64.0.74659349427.issue29714@psf.upfronthosting.co.za> STINNER Victor added the comment: I confirm that I introduced the regression with the commit fa7762ec066aa3632a25b6a52bb7597b8f17c2f3: "Issue #25349: Optimize bytes % args using the new private _PyBytesWriter API". Sorry about that, I always forget that str*() functions should not be used in Python since we support embedded null bytes :-/ It seems like only Python 3.6.0 release is affected. "git tag --contains fa7762ec066aa3632a25b6a52bb7597b8f17c2f3" also returns v3.5.2, but I don't understand since I only pushed my change to the 3.6 branch... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:27:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 10:27:59 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> Message-ID: <1488796079.58.0.787300259579.issue29714@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, and thank you for adding new unit tests ;-) Do we need similar unit tests for str%args and str.format()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:29:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 10:29:55 +0000 Subject: [issue28243] Performance regression in functools.partial() In-Reply-To: <1474482461.16.0.647819968557.issue28243@psf.upfronthosting.co.za> Message-ID: <1488796195.16.0.572158077141.issue28243@psf.upfronthosting.co.za> STINNER Victor added the comment: I just ran a microbenchmark, 3.6 compared to 3.5: haypo at smithers$ ./python -m perf timeit -s 'from functools import partial; f = lambda x, y: None; g = partial(f, 1)' 'g(2)' --duplicate=100 --compare-to ../3.5/python --python-names=3.5:3.6 3.5: ..................... 151 ns +- 4 ns 3.6: ..................... 150 ns +- 4 ns Median +- std dev: [3.5] 151 ns +- 4 ns -> [3.6] 150 ns +- 4 ns: 1.00x faster (-0%) Not significant! => not significant, so I close the issue. FYI 3.7 is not significant neither: $ ./python -m perf timeit -s 'from functools import partial; f = lambda x, y: None; g = partial(f, 1)' 'g(2)' --duplicate=100 --compare-to ../3.5/python --python-names=3.5:3.7 Median +- std dev: [3.5] 150 ns +- 4 ns -> [3.7] 150 ns +- 3 ns: 1.00x faster (-0%) Not significant! ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:37:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 10:37:06 +0000 Subject: [issue28243] Performance regression in functools.partial() In-Reply-To: <1474482461.16.0.647819968557.issue28243@psf.upfronthosting.co.za> Message-ID: <1488796626.21.0.585683538084.issue28243@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Victor! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:37:44 2017 From: report at bugs.python.org (Marien Zwart) Date: Mon, 06 Mar 2017 10:37:44 +0000 Subject: [issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select() In-Reply-To: <1488484095.89.0.988668664064.issue29700@psf.upfronthosting.co.za> Message-ID: <1488796664.97.0.790861350352.issue29700@psf.upfronthosting.co.za> Changes by Marien Zwart : ---------- nosy: +marienz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:40:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 10:40:46 +0000 Subject: [issue29565] Still broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1487152114.39.0.2484958241.issue29565@psf.upfronthosting.co.za> Message-ID: <1488796846.57.0.305526393149.issue29565@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New test causes a compiler warning: /home/serhiy/py/cpython/Modules/_ctypes/_ctypes_test.c: In function ?_testfunc_large_struct_update_value?: /home/serhiy/py/cpython/Modules/_ctypes/_ctypes_test.c:53:42: warning: parameter ?in? set but not used [-Wunused-but-set-parameter] _testfunc_large_struct_update_value(Test in) ^ Could it be silenced? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:44:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 10:44:20 +0000 Subject: [issue15695] Correct __sizeof__ support for StgDict In-Reply-To: <1345144416.71.0.984691068113.issue15695@psf.upfronthosting.co.za> Message-ID: <1488797060.01.0.564957167654.issue15695@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +418 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 05:46:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 10:46:27 +0000 Subject: [issue15695] Correct __sizeof__ support for StgDict In-Reply-To: <1345144416.71.0.984691068113.issue15695@psf.upfronthosting.co.za> Message-ID: <1488797187.37.0.467554695166.issue15695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Now changes are simpler since _PyDict_SizeOf() already was implemented. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 06:00:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 11:00:19 +0000 Subject: [issue29655] Certain errors during IMPORT_STAR can leak a reference In-Reply-To: <1488058013.56.0.788869646449.issue29655@psf.upfronthosting.co.za> Message-ID: <1488798019.51.0.91437888876.issue29655@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +419 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 06:08:22 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 06 Mar 2017 11:08:22 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> Message-ID: <1488798502.48.0.826870718685.issue29714@psf.upfronthosting.co.za> Xiang Zhang added the comment: I think no. String is not affected now and its code uses related macros so I don't think it could suffer possible regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 06:10:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 11:10:43 +0000 Subject: [issue28231] zipfile does not support pathlib In-Reply-To: <1474445503.11.0.219964117103.issue28231@psf.upfronthosting.co.za> Message-ID: <1488798643.9.0.790340823558.issue28231@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +420 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 06:23:33 2017 From: report at bugs.python.org (jiangwanwei) Date: Mon, 06 Mar 2017 11:23:33 +0000 Subject: [issue29733] concurrent.futures as_completed raise TimeoutError wrong Message-ID: <1488799413.84.0.9750346011.issue29733@psf.upfronthosting.co.za> New submission from jiangwanwei: when I use as_completed function to wait my futures, if I sleep more than timeout seconds in each iteration , I found that futures has been set result, but raise TimeoutError. as my test example code shows: from concurrent import futures from multiprocessing import current_process import time def run(count): cp = current_process() print(cp.name, 'begin', count, 'at', time.time()) time.sleep(count) print(cp.name, 'end', count, 'at', time.time()) return count if __name__ == '__main__': ppe = futures.ProcessPoolExecutor(max_workers=4) cp = current_process() fs = [ppe.submit(run, i) for i in range(4)] print('begin receive at', time.time()) for f in futures.as_completed(fs, timeout=5): time.sleep(5) print(cp.name, 'receive', f.result(), 'at', time.time()) print(cp.name, 'receive', [f.result() for f in fs], 'at', time.time()) print('end receive at', time.time()) run above-mentioned example code, it will output : begin receive at 1488799136.471536 Process-1 begin 0 at 1488799136.472969 Process-1 end 0 at 1488799136.473114 Process-3 begin 1 at 1488799136.473741 Process-2 begin 2 at 1488799136.474226 Process-4 begin 3 at 1488799136.474561 Process-3 end 1 at 1488799137.474495 Process-2 end 2 at 1488799138.475289 Process-4 end 3 at 1488799139.475696 MainProcess receive 0 at 1488799141.478663 MainProcess receive [0, 1, 2, 3] at 1488799141.478787 Traceback (most recent call last): File "test_futures.py", line 23, in for f in futures.as_completed(fs, timeout=5): File "/Users/jiangwanwei/anaconda3/lib/python3.5/concurrent/futures/_base.py", line 213, in as_completed len(pending), len(fs))) concurrent.futures._base.TimeoutError: 3 (of 4) futures unfinished ---------- messages: 289093 nosy: jiangwanwei priority: normal severity: normal status: open title: concurrent.futures as_completed raise TimeoutError wrong type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 06:23:50 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Mar 2017 11:23:50 +0000 Subject: [issue29410] Moving to SipHash-1-3 In-Reply-To: <1485932525.38.0.562666093651.issue29410@psf.upfronthosting.co.za> Message-ID: <1488799430.47.0.111989863316.issue29410@psf.upfronthosting.co.za> INADA Naoki added the comment: microbench result: https://gist.github.com/methane/33c7b01c45ce23b67246f5ddaff9c9e7 Not significant ~ very little difference for small data. For 4KB: Median +- std dev: [python.default] 3.26 us +- 0.03 us -> [python.siphash13] 2.03 us +- 0.02 us: 1.60x faster (-38%) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 06:26:57 2017 From: report at bugs.python.org (Eryk Sun) Date: Mon, 06 Mar 2017 11:26:57 +0000 Subject: [issue29734] nt._getfinalpathname handle leak Message-ID: <1488799617.7.0.144245331277.issue29734@psf.upfronthosting.co.za> New submission from Eryk Sun: The implementation of nt._getfinalpathname leaks a File handle if calling GetFinalPathNameByHandle fails. The latter function is practically guaranteed to fail when resolving the path for a non-file-system device. It also fails when VOLUME_NAME_DOS is requested for a volume GUID path that isn't currently mounted as either a DOS drive letter or an NTFS junction. In this case requesting VOLUME_NAME_GUID should work. For example, when I try calling _getfinalpathname to resolve the device paths \\?\MAILSLOT, \\?\PIPE, \\?\UNC, \\?\C:, \\?\PhysicalDrive0, \\?\NUL, \\?\CONIN$, and \\?\COM1, I get the following list of leaked handles: 0x168 File \Device\Mailslot 0x16c File \Device\NamedPipe 0x178 File \Device\Mup 0x17c File \Device\HarddiskVolume2 0x180 File \Device\Harddisk0\DR0 0x18c File \Device\Null 0x194 File \Device\ConDrv 0x198 File \Device\Serial0 (The above is from a context manager that checks for leaked handles using ctypes to call the PssCaptureSnapshot API, which was introduced in Windows 8.1. I think Process Snapshotting is the only Windows API that uses the kernel's ability to fork a clone of a process.) The reason that GetFinalPathNameByHandle fails in these cases is that the information classes it queries are typically only serviced by file systems. Other I/O devices (e.g. disk and volume devices) will fail these I/O requests. It happens that GetFinalPathNameByHandle starts with an NtQueryObject request that succeeds in these cases (it's the source of the above native NT device names), but it doesn't stop there. It continues requesting information from the device and the mount-point manager until it either has everything or a request fails. Also, in os__getfinalpathname_impl, I notice that it's switching from VOLUME_NAME_NT in the first call that's used to get the buffer size to VOLUME_NAME_DOS in the second call. It should use VOLUME_NAME_DOS in both cases, or better yet, add a keyword-only argument to select a different volume-name style (i.e. None, DOS, GUID, or NT). ---------- components: Extension Modules, Windows messages: 289095 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: nt._getfinalpathname handle leak type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 06:37:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 11:37:55 +0000 Subject: [issue28230] tarfile does not support pathlib In-Reply-To: <1476104684.24.0.949542495586.issue28230@psf.upfronthosting.co.za> Message-ID: <1488800275.7.0.648553428067.issue28230@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +421 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 06:41:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 11:41:06 +0000 Subject: [issue28230] tarfile does not support pathlib In-Reply-To: <1476104684.24.0.949542495586.issue28230@psf.upfronthosting.co.za> Message-ID: <1488800466.95.0.790538676672.issue28230@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated documentation. Note that path-like objects are supported only for external names. Internal names are not OS paths. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 06:54:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 11:54:59 +0000 Subject: [issue29568] undefined parsing behavior with the old style string formatting In-Reply-To: <1487170382.81.0.823573985019.issue29568@psf.upfronthosting.co.za> Message-ID: <1488801299.51.0.943374120237.issue29568@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +422 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 07:19:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 12:19:44 +0000 Subject: [issue25455] Some repr implementations don't check for self-referential structures In-Reply-To: <1445455038.6.0.824380060049.issue25455@psf.upfronthosting.co.za> Message-ID: <1488802784.29.0.254528647217.issue25455@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +423 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 07:20:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 12:20:36 +0000 Subject: [issue25455] Some repr implementations don't check for self-referential structures In-Reply-To: <1445455038.6.0.824380060049.issue25455@psf.upfronthosting.co.za> Message-ID: <1488802836.36.0.746955788278.issue25455@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 07:59:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 12:59:34 +0000 Subject: [issue28243] Performance regression in functools.partial() In-Reply-To: <1474482461.16.0.647819968557.issue28243@psf.upfronthosting.co.za> Message-ID: <1488805174.07.0.0643279821741.issue28243@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh wait, there was a major regression in my perf module :-( The --compare-to option was completely broken in the development branch (but it works for timeit --compare-to in the latest release). It's now fixed! So please ignore results of my previous comment. New benchmark, 3.6 compared to 3.5: haypo at smithers$ ./python -m perf timeit -s 'from functools import partial; f = lambda x, y: None; g = partial(f, 1)' 'g(2)' --duplicate=100 --compare-to ../3.5/python --python-names=ref:patch --python-names=3.5:3.6 3.5: ..................... 152 ns +- 4 ns 3.6: ..................... 152 ns +- 1 ns Median +- std dev: [3.5] 152 ns +- 4 ns -> [3.6] 152 ns +- 1 ns: 1.00x faster (-0%) Not significant! => Ah! No change, it's still not significant! Same speed. 3.7 compared to 3.6: haypo at smithers$ ./python -m perf timeit -s 'from functools import partial; f = lambda x, y: None; g = partial(f, 1)' 'g(2)' --duplicate=100 --compare-to ../3.6/python --python-names=ref:patch --python-names=3.6:3.7 3.6: ..................... 152 ns +- 1 ns 3.7: ..................... 138 ns +- 1 ns Median +- std dev: [3.6] 152 ns +- 1 ns -> [3.7] 138 ns +- 1 ns: 1.10x faster (-9%) => Oh! 3.7 is 1.10x faster! I didn't compile Python with PGO, so maybe it's a minor change due to code placement? At least, it's not slower ;-) I'm unable to see any performance slowdown in 3.6 compared to 3.5, so I keep the issue closed. Anyway, thanks for the report Serhiy! Our performance watcher ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:04:48 2017 From: report at bugs.python.org (Marien Zwart) Date: Mon, 06 Mar 2017 13:04:48 +0000 Subject: [issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select() In-Reply-To: <1488484095.89.0.988668664064.issue29700@psf.upfronthosting.co.za> Message-ID: <1488805488.65.0.499128377205.issue29700@psf.upfronthosting.co.za> Marien Zwart added the comment: On Python 3, crash_readline_fdset.py does not crash for me, because its input() contains a check documented as: /* We should only use (GNU) readline if Python's sys.stdin and sys.stdout are the same as C's stdin and stdout, because we need to pass it those. */ and calls sys.stdin.getline() instead. I don't understand why this was added (eba769657a32cb08d96f021f40c79a54ade0bffc's commit message "Make input9) behave properly with the new I/O library" does not explain it). PyOS_Readline does still take sys_stdin and sys_stdout arguments, but the only callers in CPython itself pass the actual stdin and stdout. Not sure if it's still worth fixing (maybe just turn it from a crash into an error if the fd is too high, but don't add an alternative implementation?). On Python 2, I can fix it, but then I hit the same problem in readline itself (http://git.savannah.gnu.org/cgit/readline.git/tree/input.c#n518). So I suppose the next step is reporting it there, and see if they're interested in fixing it (looks like readline isn't currently using anything more fancy than select() and pselect(), and there's a few more calls to those that would probably also need fixing...). Doesn't seem useful to fix it here first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:11:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 13:11:10 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1488805870.01.0.251635231425.issue26121@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +424 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:12:17 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 06 Mar 2017 13:12:17 +0000 Subject: [issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select() In-Reply-To: <1488484095.89.0.988668664064.issue29700@psf.upfronthosting.co.za> Message-ID: <1488805937.71.0.282737788528.issue29700@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:12:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 13:12:24 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1488805944.01.0.426223337249.issue26121@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't know how to run custom build on buildbots with new workflow. ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:17:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 13:17:56 +0000 Subject: [issue9051] Improve pickle format for timezone aware datetime instances In-Reply-To: <1277151308.95.0.331220838487.issue9051@psf.upfronthosting.co.za> Message-ID: <1488806276.91.0.384394294663.issue9051@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:22:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 13:22:46 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments Message-ID: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> New submission from STINNER Victor: The pull request makes functools.partial() faster for positional arguments. It avoids the creation of a tuple for positional arguments. It allocates a small buffer for up to 5 parameters. But it seems like even if the small buffer is not used, it's still faster. Use small buffer, total: 2 positional arguments. haypo at smithers$ ./python -m perf timeit -s 'from functools import partial; f = lambda x, y: None; g = partial(f, 1)' 'g(2)' --duplicate=100 --compare-to ../master-ref/python --python-names=ref:patch --python-names=ref:patch ref: ..................... 138 ns +- 1 ns patch: ..................... 121 ns +- 1 ns Median +- std dev: [ref] 138 ns +- 1 ns -> [patch] 121 ns +- 1 ns: 1.14x faster (-12%) Don't use small buffer, total: 6 positional arguments. haypo at smithers$ ./python -m perf timeit -s 'from functools import partial; f = lambda a1, a2, a3, a4, a5, a6: None; g = partial(f, 1, 2, 3, 4, 5)' 'g(6)' --duplicate=100 --compare-to ../master-ref/python --python-names=ref:patch --python-names=ref:patch ref: ..................... 156 ns +- 1 ns patch: ..................... 136 ns +- 0 ns Median +- std dev: [ref] 156 ns +- 1 ns -> [patch] 136 ns +- 0 ns: 1.15x faster (-13%) Another benchmark with 10 position arguments: haypo at smithers$ ./python -m perf timeit -s 'from functools import partial; f = lambda a1, a2, a3, a4, a5, a6, a7, a8, a9, a10: None; g = partial(f, 1, 2, 3, 4, 5)' 'g(6, 7, 8, 9, 10)' --duplicate=100 --compare-to ../master-ref/python --python-names=ref:patch --python-names=ref:patch ref: ..................... 193 ns +- 1 ns patch: ..................... 166 ns +- 2 ns Median +- std dev: [ref] 193 ns +- 1 ns -> [patch] 166 ns +- 2 ns: 1.17x faster (-14%) ---------- messages: 289100 nosy: haypo priority: normal severity: normal status: open title: Optimize functools.partial() for positional arguments type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:29:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 13:29:15 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments In-Reply-To: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> Message-ID: <1488806955.55.0.671722658013.issue29735@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +425 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:30:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 13:30:38 +0000 Subject: [issue28243] Performance regression in functools.partial() In-Reply-To: <1474482461.16.0.647819968557.issue28243@psf.upfronthosting.co.za> Message-ID: <1488807038.11.0.986792900772.issue28243@psf.upfronthosting.co.za> STINNER Victor added the comment: > Oh, functools.partial.__call__() doesn't use fastcall yet. This issue reminded me that I didn't finish to optimize partial_call(): see issue #29735 for a minor optimization. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:32:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 13:32:22 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments In-Reply-To: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> Message-ID: <1488807142.81.0.713153753424.issue29735@psf.upfronthosting.co.za> STINNER Victor added the comment: functools.partial() is commonly used in the the asyncio module. The asyncio doc suggests to use it, because of deliberate limitations of the asyncio API. ---------- nosy: +inada.naoki, serhiy.storchaka, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:32:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 13:32:55 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments In-Reply-To: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> Message-ID: <1488807175.5.0.998761036367.issue29735@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +ncoghlan, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:33:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 13:33:37 +0000 Subject: [issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None In-Reply-To: <1269807316.51.0.487538621224.issue8256@psf.upfronthosting.co.za> Message-ID: <1488807217.83.0.798987243788.issue8256@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:34:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 13:34:57 +0000 Subject: [issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None In-Reply-To: <1269807316.51.0.487538621224.issue8256@psf.upfronthosting.co.za> Message-ID: <1488807297.14.0.282213508757.issue8256@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +427 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 08:45:57 2017 From: report at bugs.python.org (Wolfgang Maier) Date: Mon, 06 Mar 2017 13:45:57 +0000 Subject: [issue15343] "pydoc -w " writes out page with empty "Package Contents" section In-Reply-To: <1342153904.47.0.184982192019.issue15343@psf.upfronthosting.co.za> Message-ID: <1488807957.48.0.883979350815.issue15343@psf.upfronthosting.co.za> Wolfgang Maier added the comment: Sorry, for generating noise on this very old issue, but was there a specific reason to duplicate the code of ImpImporter.find_module in changeset 9101eab6178c instead of factoring it out? ---------- nosy: +wolma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 09:24:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 14:24:33 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488783891.99.0.721806153176.issue29695@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > If you think that it would be better to remove without deprecation, the following patch does this. @Serhiy: Can you please create a PR for it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 09:31:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 14:31:38 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488798502.48.0.826870718685.issue29714@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Xiang Zhang added the comment: > I think no. String is not affected now and its code uses related macros so I don't think it could suffer possible regression. Regressions are not something "expected", shit happens, all the time. Unexpected corner cases are common :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 09:34:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 14:34:05 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488810845.31.0.928730703914.issue29695@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +428 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 09:34:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 14:34:51 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488810891.03.0.305611720263.issue29695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If David agrees with this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 09:39:16 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 06 Mar 2017 14:39:16 +0000 Subject: [issue27577] Make implementation and doc of tuple and list more compliant In-Reply-To: <1469002642.37.0.996165914529.issue27577@psf.upfronthosting.co.za> Message-ID: <1488811156.1.0.762132939991.issue27577@psf.upfronthosting.co.za> Xiang Zhang added the comment: This issue doesn't make any sense once #29695 is applied. So close. ---------- resolution: -> fixed stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 09:41:37 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 06 Mar 2017 14:41:37 +0000 Subject: [issue27577] Make implementation and doc of tuple and list more compliant In-Reply-To: <1469002642.37.0.996165914529.issue27577@psf.upfronthosting.co.za> Message-ID: <1488811297.8.0.24444621817.issue27577@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 09:50:45 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Mar 2017 14:50:45 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488811845.23.0.670457558497.issue29695@psf.upfronthosting.co.za> R. David Murray added the comment: If Raymond is on the side of skipping the deprecation than I'm good with it. Like I said, this is a marginal case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 09:56:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 14:56:14 +0000 Subject: [issue29736] Optimize builtin types constructor Message-ID: <1488812174.68.0.707747009021.issue29736@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached PR replaces PyArg_ParseTupleAndKeywords() with _PyArg_ParseTupleAndKeywordsFast() to optimize the constructor of the builtin types: * bool: bool_new() * bytes: bytes_new() * complex: complex_new() * float: float_new() * int: long_new() * list: list_init() * str: unicode_new() * tuple: tuple_new() When using keywords, the speedup is between 1.55x faster and 1.92x faster. When using only positional arguments, the speedup is between 1.07x faster and 1.14x faster. Results of attached bench.py: +-----------------------------------------------+--------+---------------------+ | Benchmark | ref | changed | +===============================================+========+=====================+ | complex(real=0.0, imag=0.0) | 452 ns | 1.92x faster (-48%) | +-----------------------------------------------+--------+---------------------+ | bytes("x", encoding="ascii", errors="strict") | 498 ns | 1.88x faster (-47%) | +-----------------------------------------------+--------+---------------------+ | str(b"x", encoding="ascii") | 340 ns | 1.55x faster (-35%) | +-----------------------------------------------+--------+---------------------+ | list([None]) | 208 ns | 1.14x faster (-12%) | +-----------------------------------------------+--------+---------------------+ | int(0) | 113 ns | 1.11x faster (-10%) | +-----------------------------------------------+--------+---------------------+ | float(1.0) | 110 ns | 1.10x faster (-9%) | +-----------------------------------------------+--------+---------------------+ | str("x") | 115 ns | 1.10x faster (-9%) | +-----------------------------------------------+--------+---------------------+ | tuple((None,)) | 111 ns | 1.10x faster (-9%) | +-----------------------------------------------+--------+---------------------+ | bytes(b"x") | 126 ns | 1.10x faster (-9%) | +-----------------------------------------------+--------+---------------------+ | bool(True) | 107 ns | 1.09x faster (-8%) | +-----------------------------------------------+--------+---------------------+ | complex(0.0, 0.0) | 176 ns | 1.07x faster (-7%) | +-----------------------------------------------+--------+---------------------+ ---------- files: bench.py messages: 289111 nosy: haypo priority: normal severity: normal status: open title: Optimize builtin types constructor type: performance versions: Python 3.7 Added file: http://bugs.python.org/file46705/bench.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 09:56:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 14:56:44 +0000 Subject: [issue29736] Optimize builtin types constructor In-Reply-To: <1488812174.68.0.707747009021.issue29736@psf.upfronthosting.co.za> Message-ID: <1488812204.97.0.601246292874.issue29736@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +429 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 09:58:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 14:58:02 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments In-Reply-To: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> Message-ID: <1488812282.01.0.703462624401.issue29735@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about C stack consumption? Is not this increase it? Since nested partial()`s are collapsed, you need to interlace them with other wrapper for testing. def decorator(f): def wrapper(*args): return f(*args) return wrapper def f(*args): pass for i in range(n): f = partial(f) f = decorator(f) f(1, 2) ---------- components: +Extension Modules stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 10:04:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 15:04:28 +0000 Subject: [issue29736] Optimize builtin types constructor In-Reply-To: <1488812174.68.0.707747009021.issue29736@psf.upfronthosting.co.za> Message-ID: <1488812668.34.0.225160303147.issue29736@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The half of constructors no longer use PyArg_ParseTupleAndKeywords(). I would wait until constructors be converted to Argument Clinic. There are ready patches for some of these builtin types, patches for other are in proggress. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 10:11:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 15:11:25 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488813085.85.0.594074302083.issue29695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks all! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 10:16:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 15:16:04 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488813364.98.0.0368433188239.issue29695@psf.upfronthosting.co.za> STINNER Victor added the comment: Unhappy buildbot. http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/456/steps/test/logs/stdio ====================================================================== ERROR: test_keyword_arguments (test.test_descr.ClassPropertiesAndMethods) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_descr.py", line 3451, in test_keyword_arguments list.__init__(a, sequence=[0, 1, 2]) TypeError: list() does not take keyword arguments ====================================================================== ERROR: test_keywords (test.test_descr.ClassPropertiesAndMethods) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_descr.py", line 2888, in test_keywords self.assertEqual(int(x=1), 1) TypeError: 'x' is an invalid keyword argument for this function ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 10:39:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 15:39:58 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488814798.65.0.332661181187.issue29695@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +430 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 10:48:19 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 06 Mar 2017 15:48:19 +0000 Subject: [issue29733] concurrent.futures as_completed raise TimeoutError wrong In-Reply-To: <1488799413.84.0.9750346011.issue29733@psf.upfronthosting.co.za> Message-ID: <1488815299.32.0.652157609139.issue29733@psf.upfronthosting.co.za> Josh Rosenberg added the comment: The docs ( https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.as_completed ) do seem to indicate it shouldn't do so as long as results were available before the timeout expired: "The returned iterator raises a concurrent.futures.TimeoutError if __next__() is called and the result isn?t available after timeout seconds from the original call to as_completed()." My reading of that would be that it raises the error only when: 1. The timeout has expired 2. The call would block (or possibly, would have blocked after the timeout expired), indicating no result was available Handling "would have blocked" is hard, but might it make sense to still allow a non-blocking wait on the event even if the timeout has expired, with the exception raised only if the non-blocking wait fails? Side-note: Looks like this code is still using time.time, not time.monotonic, so it's vulnerable to system clock adjustments; NTP updates could cause a five second timeout to expire instantly, or take seconds or even minutes longer to expire. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 10:49:16 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 06 Mar 2017 15:49:16 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1488815356.69.0.0949094665659.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think Eryk's diagnosis is correct: this is a straight up bug in the original patch, where it's missing the check to only use the new logic when in isolated mode (as it's compensating for the fact that there is no extra sys.path[0] entry inserted in that case). I mentioned that on the original issue http://bugs.python.org/issue29319#msg285904 but hadn't noticed that the relevant check was missing from the applied patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 10:52:28 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 06 Mar 2017 15:52:28 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1488815548.58.0.1000206355.issue29571@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks for the explanation - given that, I agree that simply reverting the attempted test-based fix and instead relying on the issue 20087 updates is the way to go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 11:02:42 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 06 Mar 2017 16:02:42 +0000 Subject: [issue13566] Increase pickle compatibility In-Reply-To: <1323437104.23.0.789258355405.issue13566@psf.upfronthosting.co.za> Message-ID: <1488816162.08.0.508950083898.issue13566@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Right, but Antoine's objection is that suddenly strs pickled in Py3 can end up as strs in Py2, rather than unicode. If the library enforces a Py3-like type separation on Py2 (text arguments are unicode only, binary data is str only), then you have the problem where pickling on Py3 produces a pickle that will unpickle as str on Py2, and suddenly the library explodes because the argument, that should be unicode on Py2 and str on Py3, is suddenly str on both. This means that, to fix a problem with non-forward compatible libraries (that accept text only as Py2 str), a Py2 library that's (very) forward thinking would have problems. Admittedly, I wouldn't expect there to be very many such libraries, and many of them would have their own custom pickle formats, but stuff like numpy is quite sensitive to argument type; numpy.array(u'123') and numpy.array(b'123') are different. In numpy's case, each of those produces a derived datatype that is explicitly pickled and (I believe) would prevent the error, but some other more heuristic library might not do so. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 11:38:10 2017 From: report at bugs.python.org (Anna Henningsen) Date: Mon, 06 Mar 2017 16:38:10 +0000 Subject: [issue29545] Python behavioral difference between Linux and AIX In-Reply-To: Message-ID: <1488818290.69.0.826070801159.issue29545@psf.upfronthosting.co.za> Changes by Anna Henningsen : ---------- nosy: +addaleax _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 11:52:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 16:52:11 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments In-Reply-To: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> Message-ID: <1488819131.84.0.160629277322.issue29735@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If the underlying function doesn't support fast call, and either args or pto->args are empty, partial_call() makes two unneeded copyings. Arguments are copied from a tuple to the raw array and from the array to new tuple. This is what the current code does, but this can be avoided. If the underlying function doesn't support fast call, and both args and pto->args are not empty, patched partial_call() makes one unneeded copyings. Arguments are copied from tuples to the raw array and from the array to the new tuple. Only one copying is needed (from tuples to the new tuple). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 12:06:48 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Mar 2017 17:06:48 +0000 Subject: [issue29676] verbose output of test_cprofile In-Reply-To: <1488281664.18.0.494134456081.issue29676@psf.upfronthosting.co.za> Message-ID: <1488820008.54.0.550818812632.issue29676@psf.upfronthosting.co.za> INADA Naoki added the comment: OK, now I found what caused this difference. lsprof expect `func` is PyCFunction object. But it can be PyMethodDescrObject when LOAD_METHOD is used to call C method. In Modules/_lsprof.c (line 459): case PyTrace_C_CALL: if ((((ProfilerObject *)self)->flags & POF_BUILTINS) && PyCFunction_Check(arg)) { ptrace_enter_call(self, ((PyCFunctionObject *)arg)->m_ml, arg); } Document says just it's "Function object being called." https://docs.python.org/3.6/c-api/init.html#c.Py_tracefunc If "function object" means "any C object having tp_call", most easy way to solve this issue is adding PyMethodDescrObject support to lsprof. PyEval_GetFuncName() and PyEval_GetFuncDesc() should support it too. As a bonus, `list.append(L, x)` will be profiled like `L.append(x)`. It looks more consistent. On the other hand, if it means it's PyCFunction, we can't call PyMethodDescrObject directly. Since PyEval_SetProfile() is old function, I chose later way for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 12:16:37 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Mar 2017 17:16:37 +0000 Subject: [issue29676] verbose output of test_cprofile In-Reply-To: <1488281664.18.0.494134456081.issue29676@psf.upfronthosting.co.za> Message-ID: <1488820597.76.0.548574489939.issue29676@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +431 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 12:18:33 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 06 Mar 2017 17:18:33 +0000 Subject: [issue29676] C method is not profiled by lsprof In-Reply-To: <1488281664.18.0.494134456081.issue29676@psf.upfronthosting.co.za> Message-ID: <1488820713.77.0.462637372917.issue29676@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- components: +Interpreter Core -Tests title: verbose output of test_cprofile -> C method is not profiled by lsprof _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 12:30:08 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 06 Mar 2017 17:30:08 +0000 Subject: [issue9051] Improve pickle format for timezone aware datetime instances In-Reply-To: <1277151308.95.0.331220838487.issue9051@psf.upfronthosting.co.za> Message-ID: <1488821408.0.0.870569660099.issue9051@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> rejected stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 12:42:29 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 06 Mar 2017 17:42:29 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1488822149.94.0.231916733798.issue29723@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the analysis, Eryk and Nick. Then this sounds like a release blocker problem that should be fixed for 3.6.1. Steve, can you take a look, please? ---------- nosy: +steve.dower priority: normal -> release blocker stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 13:17:04 2017 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 06 Mar 2017 18:17:04 +0000 Subject: [issue15954] No error checking after using of the wcsxfrm() In-Reply-To: <1347876874.21.0.668678433738.issue15954@psf.upfronthosting.co.za> Message-ID: <1488824224.76.0.523608831881.issue15954@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 13:43:12 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Mar 2017 18:43:12 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1488825792.1.0.861825460281.issue29708@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 13:44:11 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Mar 2017 18:44:11 +0000 Subject: [issue29716] Python 3 Module doc still sounds like __init__.py is required In-Reply-To: <1488576386.83.0.924613404524.issue29716@psf.upfronthosting.co.za> Message-ID: <1488825851.02.0.638832087338.issue29716@psf.upfronthosting.co.za> Brett Cannon added the comment: I've gone ahead and closed this. Thanks for taking the time to check in on this, James! ---------- nosy: +brett.cannon resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 14:15:15 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Mar 2017 19:15:15 +0000 Subject: [issue29691] Some tests fail in coverage Travis check In-Reply-To: <1488444156.84.0.711063027432.issue29691@psf.upfronthosting.co.za> Message-ID: <1488827715.46.0.681017711235.issue29691@psf.upfronthosting.co.za> Brett Cannon added the comment: The test_traceback changes should be easy to tweak to use a regex or startwith() check so the tests pass again. For the test_xml_etree failures I'm not sure how best to fix that other than taking it out. Maybe if sys.gettrace() returns something then skip the test? ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 14:15:39 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Mar 2017 19:15:39 +0000 Subject: [issue29691] Some tests fail in coverage Travis check In-Reply-To: <1488444156.84.0.711063027432.issue29691@psf.upfronthosting.co.za> Message-ID: <1488827739.92.0.299535435725.issue29691@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 14:23:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 19:23:12 +0000 Subject: [issue15954] No error checking after using of the wcsxfrm() In-Reply-To: <1347876874.21.0.668678433738.issue15954@psf.upfronthosting.co.za> Message-ID: <1488828192.81.0.918797750986.issue15954@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 14:29:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 19:29:29 +0000 Subject: [issue29691] Some tests fail in coverage Travis check In-Reply-To: <1488444156.84.0.711063027432.issue29691@psf.upfronthosting.co.za> Message-ID: <1488828569.88.0.786320277988.issue29691@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is this a duplicate of issue29048? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 14:37:59 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Mar 2017 19:37:59 +0000 Subject: [issue29691] Some tests fail in coverage Travis check In-Reply-To: <1488444156.84.0.711063027432.issue29691@psf.upfronthosting.co.za> Message-ID: <1488829079.39.0.91346430496.issue29691@psf.upfronthosting.co.za> Brett Cannon added the comment: I don't think it's a duplicate because we had a passing coverage run when we initially made the migration so something got tweaked to lead to the failures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 14:38:51 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Mar 2017 19:38:51 +0000 Subject: [issue29691] Some tests fail in coverage Travis check In-Reply-To: <1488444156.84.0.711063027432.issue29691@psf.upfronthosting.co.za> Message-ID: <1488829131.87.0.218963243442.issue29691@psf.upfronthosting.co.za> Brett Cannon added the comment: BTW, just because I assigned this to me doesn't mean others can't write a PR to solve this. :) I will review any PR that fixes this issue, I'm just going to make sure it gets solved no matter what if no one else creates a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 14:40:35 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Mon, 06 Mar 2017 19:40:35 +0000 Subject: [issue29691] Some tests fail in coverage Travis check In-Reply-To: <1488444156.84.0.711063027432.issue29691@psf.upfronthosting.co.za> Message-ID: <1488829235.66.0.519555137717.issue29691@psf.upfronthosting.co.za> Jelle Zijlstra added the comment: I'll look into creating a PR when I have some time. It would also be useful to tweak the Travis/coverage configuration so that it fails loudly if one of the tests doesn't pass in the coverage check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 14:48:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 19:48:36 +0000 Subject: [issue29737] Optimize concatenating empty tuples Message-ID: <1488829716.87.0.539974742004.issue29737@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Since tuples are immutable, concatenating with empty tuple can be optimized by returning an opposite argument. Microbenchmarks (the difference is larger for larger tuples): $ ./python -m perf timeit --duplicate=100 -s 'a = (1, 2)' 'a + ()' Unpatched: Median +- std dev: 288 ns +- 12 ns Patched: Median +- std dev: 128 ns +- 5 ns $ ./python -m perf timeit --duplicate=100 -s 'a = (1, 2)' '() + a' Unpatched: Median +- std dev: 285 ns +- 16 ns Patched: Median +- std dev: 128 ns +- 6 ns Non-empty tuples are not affected: $ ./python -m perf timeit --duplicate=100 -s 'a = (1, 2)' 'a + a' Unpatched: Median +- std dev: 321 ns +- 24 ns Patched: Median +- std dev: 317 ns +- 26 ns ---------- components: Interpreter Core messages: 289129 nosy: haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Optimize concatenating empty tuples type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 14:53:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 19:53:00 +0000 Subject: [issue29737] Optimize concatenating empty tuples In-Reply-To: <1488829716.87.0.539974742004.issue29737@psf.upfronthosting.co.za> Message-ID: <1488829980.26.0.975971507483.issue29737@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +432 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 15:10:11 2017 From: report at bugs.python.org (Olivier Vielpeau) Date: Mon, 06 Mar 2017 20:10:11 +0000 Subject: [issue29738] Fix memory leak in SSLSocket.getpeercert() Message-ID: <1488831011.78.0.556870534746.issue29738@psf.upfronthosting.co.za> New submission from Olivier Vielpeau: The code snippet in #25569 reproduces the memory leak with Python 3.6.0 and 2.7.13. The current memory leak is a regression that was introduced in #26470. Going to attach a PR on github that fixes the issue shortly. ---------- assignee: christian.heimes components: SSL messages: 289130 nosy: christian.heimes, olivielpeau priority: normal severity: normal status: open title: Fix memory leak in SSLSocket.getpeercert() type: resource usage versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 15:13:07 2017 From: report at bugs.python.org (Olivier Vielpeau) Date: Mon, 06 Mar 2017 20:13:07 +0000 Subject: [issue29738] Fix memory leak in SSLSocket.getpeercert() In-Reply-To: <1488831011.78.0.556870534746.issue29738@psf.upfronthosting.co.za> Message-ID: <1488831187.5.0.75186987617.issue29738@psf.upfronthosting.co.za> Changes by Olivier Vielpeau : ---------- pull_requests: +433 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 15:29:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 20:29:50 +0000 Subject: [issue29691] Some tests fail in coverage Travis check In-Reply-To: <1488444156.84.0.711063027432.issue29691@psf.upfronthosting.co.za> Message-ID: <1488832190.56.0.79326871919.issue29691@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The list of failing tests in issue29048 contains test_traceback and test_xml_etree. Thus this issue may be a part of issue29048. Some tests may be fixed since reporting issue29048. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 15:48:19 2017 From: report at bugs.python.org (Jack Cushman) Date: Mon, 06 Mar 2017 20:48:19 +0000 Subject: [issue29739] zipfile raises wrong exception for some incorrect passwords Message-ID: <1488833299.28.0.469862145344.issue29739@psf.upfronthosting.co.za> New submission from Jack Cushman: This bug arises when attempting to unzip a password-protected zipfile using the wrong password. Usually when zipfile extraction is attempted with an incorrect password, zipfile raise `RuntimeError("Bad password for file")`. But for a small subset of passwords (about .4% of possible passwords), it instead raises `BadZipfile("Bad CRC-32 for file")`. Attached is a script that attempts to decrypt a zip file using every 3-letter uppercase password. (This assumes you have first created the zip file, by running something like: `echo "stuff" > /tmp/foo.txt; zip -e -P password /tmp/foo.zip /tmp/foo.txt`.) The specific passwords that trigger the wrong exception will vary each time the zip file is created. On my system, for a particular zip file, the result is this output: BadZipFile b'ACB' BadZipFile b'AMJ' BadZipFile b'ASL' BadZipFile b'AZV' BadZipFile b'BCI' BadZipFile b'BMV' BadZipFile b'BQG' BadZipFile b'BRB' BadZipFile b'BYH' BadZipFile b'CHU' BadZipFile b'CTV' BadZipFile b'DEF' BadZipFile b'DHJ' BadZipFile b'DSR' BadZipFile b'EWG' BadZipFile b'GOK' BadZipFile b'GUK' BadZipFile b'HGL' BadZipFile b'HPV' BadZipFile b'IAC' BadZipFile b'IGQ' BadZipFile b'IHG' BadZipFile b'ILB' BadZipFile b'IRJ' BadZipFile b'JDW' BadZipFile b'JIT' BadZipFile b'JMK' BadZipFile b'JPD' BadZipFile b'JWL' BadZipFile b'JXS' BadZipFile b'KAR' BadZipFile b'KKH' BadZipFile b'LNW' BadZipFile b'MEL' BadZipFile b'NDY' BadZipFile b'NFJ' BadZipFile b'NLU' BadZipFile b'NQU' BadZipFile b'OXC' BadZipFile b'PHA' BadZipFile b'PQY' BadZipFile b'QCN' BadZipFile b'QFT' BadZipFile b'QMB' BadZipFile b'QWZ' BadZipFile b'QYS' BadZipFile b'RBR' BadZipFile b'SKU' BadZipFile b'SLG' BadZipFile b'STU' BadZipFile b'SUP' BadZipFile b'UCD' BadZipFile b'UOA' BadZipFile b'UQM' BadZipFile b'VAO' BadZipFile b'VEQ' BadZipFile b'VJW' BadZipFile b'VVH' BadZipFile b'WDA' BadZipFile b'XCR' BadZipFile b'XIY' BadZipFile b'XLG' BadZipFile b'YJA' BadZipFile b'YMA' BadZipFile b'YRB' BadZipFile b'ZHT' BadZipFile b'ZVJ' BadZipFile b'ZWR' BadZipFile b'ZZT' 69 out of 17576 passwords raise BadZipFile Versions: I reproduced this in Python 2.7.10 and 3.6.0, using a zip file created on Mac OS 10.12.3 with this zip version: $ zip --version Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license. This is Zip 3.0 (July 5th 2008), by Info-ZIP. Compiled with gcc 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34) for Unix (Mac OS X) on Jul 30 2016. ---------- components: Library (Lib) files: fail.py messages: 289132 nosy: jcushman priority: normal severity: normal status: open title: zipfile raises wrong exception for some incorrect passwords type: behavior versions: Python 2.7, Python 3.6 Added file: http://bugs.python.org/file46706/fail.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 16:01:38 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 06 Mar 2017 21:01:38 +0000 Subject: [issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select() In-Reply-To: <1488484095.89.0.988668664064.issue29700@psf.upfronthosting.co.za> Message-ID: <1488834098.23.0.618851175637.issue29700@psf.upfronthosting.co.za> Martin Panter added the comment: ?Input9)? is probably a typo for ?input()?. In Python 2, sys.stdin etc are by default wrappers around ?s ?stdin? etc, and can easily be wrappers around other FILE objects, so the PyOS_Readline API and Python?s ?readline? module pass these objects directly to rl_instream etc. In Python 3, sys.stdin etc are not directly related to objects. But the PyOS_Readline API was not changed, and the ?readline? module still uses the rl_instream API which requires a FILE object. So the new code decides if it is reasonable to substitute ?stdin? etc objects for the Python ?sys? objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 16:13:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Mar 2017 21:13:09 +0000 Subject: [issue29736] Optimize builtin types constructor In-Reply-To: <1488812174.68.0.707747009021.issue29736@psf.upfronthosting.co.za> Message-ID: <1488834789.94.0.347318258843.issue29736@psf.upfronthosting.co.za> STINNER Victor added the comment: > I would wait until constructors be converted to Argument Clinic. There are ready patches for some of these builtin types, patches for other are in proggress. Do you have links for these changes? It's painful to search for Argument Clinic changes, the issue title doesn't say anything except "derby " :-/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 16:25:08 2017 From: report at bugs.python.org (Markus) Date: Mon, 06 Mar 2017 21:25:08 +0000 Subject: [issue29740] Visual C++ CRT security update from 14 June 2011 Message-ID: <1488835508.8.0.372164127647.issue29740@psf.upfronthosting.co.za> New submission from Markus: In 14 June 2011 Microsoft released Visual C++ 2008 runtime MFC Security Update https://www.microsoft.com/en-us/download/details.aspx?id=26368 The Security Update also updates the CRT runtime (used by Python 2.7) Without the security update, Python 2.7.13 uses vc90.crt 9.0.30729.4940 With the security update, Python 2.7.13 uses vc90.crt 9.0.30729.6161 (Use e.g. Sysinternals procexp to see) Why does Python not install the vc90.crt of the security update? ---------- components: Build, Windows messages: 289135 nosy: markuskramerIgitt, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Visual C++ CRT security update from 14 June 2011 type: security versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 16:27:25 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 06 Mar 2017 21:27:25 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do Message-ID: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> New submission from Oren Milman: ------------ current state ------------ import io class IntLike(): def __init__(self, num): self._num = num def __index__(self): return self._num __int__ = __index__ io.StringIO('blah blah').read(IntLike(2)) io.StringIO('blah blah').readline(IntLike(2)) io.StringIO('blah blah').truncate(IntLike(2)) io.BytesIO(b'blah blah').read(IntLike(2)) io.BytesIO(b'blah blah').readline(IntLike(2)) io.BytesIO(b'blah blah').truncate(IntLike(2)) The three StringIO methods are called without any error, but each of the three BytesIO methods raises a "TypeError: integer argument expected, got 'IntLike'". This is because the functions which implement the StringIO methods (in Modules/_io/stringio.c): - _io_StringIO_read_impl - _io_StringIO_readline_impl - _io_StringIO_truncate_impl use PyNumber_AsSsize_t, which might call nb_index. However, the functions which implement the BytesIO methods (in Modules/_io/bytesio.c): - _io_BytesIO_read_impl - _io_BytesIO_readline_impl - _io_BytesIO_truncate_impl use PyLong_AsSsize_t, which accepts only Python ints (or objects whose type is a subclass of int). ------------ proposed changes ------------ - change those BytesIO methods so that they would accept integer types (i.e. classes that define __index__), mainly by replacing PyLong_AsSsize_t with PyNumber_AsSsize_t - add tests to Lib/test/test_memoryio.py to verify that all six aforementioned methods accept integer types ---------- components: IO messages: 289136 nosy: Oren Milman priority: normal severity: normal status: open title: BytesIO methods don't accept integer types, while StringIO counterparts do type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 16:48:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 06 Mar 2017 21:48:56 +0000 Subject: [issue29736] Optimize builtin types constructor In-Reply-To: <1488812174.68.0.707747009021.issue29736@psf.upfronthosting.co.za> Message-ID: <1488836936.25.0.403503375375.issue29736@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: float, list: issue20185. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 17:35:43 2017 From: report at bugs.python.org (Nikolay Kim) Date: Mon, 06 Mar 2017 22:35:43 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception Message-ID: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> New submission from Nikolay Kim: https://github.com/python/asyncio/issues/494 ---------- messages: 289138 nosy: fafhrd91 priority: normal pull_requests: 435 severity: normal status: open title: asyncio get_extra_info() throws exception versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 17:37:32 2017 From: report at bugs.python.org (Nikolay Kim) Date: Mon, 06 Mar 2017 22:37:32 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1488839851.99.0.279587537631.issue29742@psf.upfronthosting.co.za> Nikolay Kim added the comment: exception on get_extra_info() on closed ssl transport ``` Feb 18 13:18:09 btc electrumx_server.py[1732]: ERROR:ElectrumX:[15328] Traceback (most recent call last): Feb 18 13:18:09 btc electrumx_server.py[1732]: File "/usr/local/lib/python3.5/dist-packages/electrumx-0.11.1-py3.5.egg/lib/jsonrpc.py", line 528, in process_single_request Feb 18 13:18:09 btc electrumx_server.py[1732]: result = await self.handle_payload(payload, self.request_handler) Feb 18 13:18:09 btc electrumx_server.py[1732]: File "/usr/local/lib/python3.5/dist-packages/electrumx-0.11.1-py3.5.egg/lib/jsonrpc.py", line 608, in handle_payload Feb 18 13:18:09 btc electrumx_server.py[1732]: return await handler(**kw_args) Feb 18 13:18:09 btc electrumx_server.py[1732]: File "/usr/local/lib/python3.5/dist-packages/electrumx-0.11.1-py3.5.egg/server/session.py", line 282, in banner Feb 18 13:18:09 btc electrumx_server.py[1732]: if self.is_tor(): Feb 18 13:18:09 btc electrumx_server.py[1732]: File "/usr/local/lib/python3.5/dist-packages/electrumx-0.11.1-py3.5.egg/server/session.py", line 259, in is_tor Feb 18 13:18:09 btc electrumx_server.py[1732]: peer_info = self.peer_info() Feb 18 13:18:09 btc electrumx_server.py[1732]: File "/usr/local/lib/python3.5/dist-packages/electrumx-0.11.1-py3.5.egg/lib/jsonrpc.py", line 764, in peer_info Feb 18 13:18:09 btc electrumx_server.py[1732]: return self.transport.get_extra_info('peername') Feb 18 13:18:09 btc electrumx_server.py[1732]: File "/usr/lib/python3.5/asyncio/sslproto.py", line 306, in get_extra_info Feb 18 13:18:09 btc electrumx_server.py[1732]: return self._ssl_protocol._get_extra_info(name, default) Feb 18 13:18:09 btc electrumx_server.py[1732]: File "/usr/lib/python3.5/asyncio/sslproto.py", line 537, in _get_extra_info Feb 18 13:18:09 btc electrumx_server.py[1732]: return self._transport.get_extra_info(name, default) Feb 18 13:18:09 btc electrumx_server.py[1732]: AttributeError: 'NoneType' object has no attribute 'get_extra_info' ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 17:44:24 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Mar 2017 22:44:24 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1488840264.68.0.00987084686881.issue29742@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report and PR, but your fix is not obviously correct. In general exceptions are the way in Python that errors are reported, and asking for extra_info on a closed stream is an error. The exception raised is not clear, so perhaps the asyncio folks will want to improve it. Or perhaps I'm wrong and they will want to return None, but I'll be a bit surprised if that is the case :) ---------- components: +asyncio nosy: +gvanrossum, r.david.murray, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 17:49:12 2017 From: report at bugs.python.org (Nikolay Kim) Date: Mon, 06 Mar 2017 22:49:12 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1488840552.13.0.88785037889.issue29742@psf.upfronthosting.co.za> Nikolay Kim added the comment: get_extra_info() returns optional transport information, I think it is ok to return None for closed transport. https://github.com/python/cpython/blob/master/Lib/asyncio/transports.py#L18 I propose this feature initially, during early tulip development but now I think it is not good api. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 17:50:39 2017 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 06 Mar 2017 22:50:39 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1488840639.38.0.513047218852.issue29742@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Thanks for the report and PR, but your fix is not obviously correct. Not for this particular asyncio method though, see asyncio PEP [1]. But there's an actual bug in the PR, instead of returning `None` we should return `default`. [1] https://www.python.org/dev/peps/pep-3156/#methods-for-all-transports ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 18:00:45 2017 From: report at bugs.python.org (Nikolay Kim) Date: Mon, 06 Mar 2017 23:00:45 +0000 Subject: [issue29743] Closing transport during handshake process leaks open socket Message-ID: <1488841245.61.0.346906238419.issue29743@psf.upfronthosting.co.za> New submission from Nikolay Kim: https://github.com/python/asyncio/issues/487 https://github.com/KeepSafe/aiohttp/issues/1679 ---------- messages: 289143 nosy: fafhrd91 priority: normal pull_requests: 436 severity: normal status: open title: Closing transport during handshake process leaks open socket versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 18:03:43 2017 From: report at bugs.python.org (Roundup Robot) Date: Mon, 06 Mar 2017 23:03:43 +0000 Subject: [issue29581] __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta) In-Reply-To: <1487271247.7.0.447487107459.issue29581@psf.upfronthosting.co.za> Message-ID: <1488841423.7.0.92099131536.issue29581@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +437 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 18:10:34 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 06 Mar 2017 23:10:34 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488841834.33.0.616364800931.issue29741@psf.upfronthosting.co.za> Martin Panter added the comment: What is the use case? Unless changing the behaviour would be useful, I think the simplest solution would be to document that the methods should only be given instances of ?int?, so that it is clear that other kinds of numbers are unsupported. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 18:34:36 2017 From: report at bugs.python.org (Glyph Lefkowitz) Date: Mon, 06 Mar 2017 23:34:36 +0000 Subject: [issue27035] Cannot set exit code in atexit callback In-Reply-To: <1463385428.15.0.762354704325.issue27035@psf.upfronthosting.co.za> Message-ID: <1488843276.43.0.398889250593.issue27035@psf.upfronthosting.co.za> Glyph Lefkowitz added the comment: I just bumped into this myself. If this really is only fixable in a major release, there ought to at least be a minor release for the *documentation* to update it to be correct. ---------- nosy: +glyph _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 18:36:42 2017 From: report at bugs.python.org (Nikolay Kim) Date: Mon, 06 Mar 2017 23:36:42 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1488843402.65.0.391548367426.issue29742@psf.upfronthosting.co.za> Changes by Nikolay Kim : ---------- pull_requests: +438 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 18:40:52 2017 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 06 Mar 2017 23:40:52 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1488843652.23.0.341113266884.issue29742@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 19:16:37 2017 From: report at bugs.python.org (Andrea Giovannucci) Date: Tue, 07 Mar 2017 00:16:37 +0000 Subject: [issue29744] memmap behavior changed Message-ID: <1488845797.14.0.556609006147.issue29744@psf.upfronthosting.co.za> New submission from Andrea Giovannucci: The previous version 2.7.12 was returning a memmap file when slicing with a list of integers, now it returns an array. This affects the behaviour of several functions in my package. Is that an aware choice or a side product of some other change? ---------- components: Demos and Tools messages: 289146 nosy: agiovannucci priority: normal severity: normal status: open title: memmap behavior changed type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 19:24:13 2017 From: report at bugs.python.org (Nikolay Kim) Date: Tue, 07 Mar 2017 00:24:13 +0000 Subject: [issue29745] asyncio: Make pause/resume_reading idepotent and no-op for closed transports Message-ID: <1488846253.21.0.430989162462.issue29745@psf.upfronthosting.co.za> New submission from Nikolay Kim: https://github.com/python/asyncio/issues/488 ---------- messages: 289147 nosy: fafhrd91 priority: normal pull_requests: 439 severity: normal status: open title: asyncio: Make pause/resume_reading idepotent and no-op for closed transports versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 19:52:01 2017 From: report at bugs.python.org (Andrea Giovannucci) Date: Tue, 07 Mar 2017 00:52:01 +0000 Subject: [issue29744] memmap behavior changed In-Reply-To: <1488845797.14.0.556609006147.issue29744@psf.upfronthosting.co.za> Message-ID: <1488847921.88.0.993389568806.issue29744@psf.upfronthosting.co.za> Changes by Andrea Giovannucci : ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 20:13:10 2017 From: report at bugs.python.org (Oren Milman) Date: Tue, 07 Mar 2017 01:13:10 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488849190.34.0.885930733116.issue29741@psf.upfronthosting.co.za> Oren Milman added the comment: I don't have a use case for that. (I noticed this behavior by chance, while working on some other issue.) However, IIUC, commit 4fa88fa0ba35e25ad9be66ebbdaba9aca553dc8b, by Benjamin Peterson, Antoine Pitrou and Amaury Forgeot d'Arc, includes patching the aforementioned StringIO functions, so that they would accept integer types. So I add them to the nosy list, as I guess that the use cases for accepting integer types in StringIO methods are also use cases for accepting integer types in BytesIO. And now that you mention the docs, according to them, both StringIO and BytesIO inherit these methods from BufferedIOBase or IOBase. Thus, the methods are already expected to behave the same, aren't they? ---------- nosy: +amaury.forgeotdarc, benjamin.peterson, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 20:48:19 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 07 Mar 2017 01:48:19 +0000 Subject: [issue29737] Optimize concatenating empty tuples In-Reply-To: <1488829716.87.0.539974742004.issue29737@psf.upfronthosting.co.za> Message-ID: <1488851299.77.0.347520398084.issue29737@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Is it at all common to concatenate empty tuples? This seems like optimizing something that rarely occurs. Also, the timings can be misleading if in real code these changes cause new branch mispredictions here which can slow the common case. See http://stackoverflow.com/questions/11227809 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 22:10:39 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 07 Mar 2017 03:10:39 +0000 Subject: [issue28728] test_host_resolution in test_socket fails In-Reply-To: <1479407743.41.0.909577209709.issue28728@psf.upfronthosting.co.za> Message-ID: <1488856239.48.0.493288009534.issue28728@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +440 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 22:22:37 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 07 Mar 2017 03:22:37 +0000 Subject: [issue29739] zipfile raises wrong exception for some incorrect passwords In-Reply-To: <1488833299.28.0.469862145344.issue29739@psf.upfronthosting.co.za> Message-ID: <1488856957.84.0.516439328268.issue29739@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 22:25:27 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 07 Mar 2017 03:25:27 +0000 Subject: [issue29744] memmap behavior changed In-Reply-To: <1488845797.14.0.556609006147.issue29744@psf.upfronthosting.co.za> Message-ID: <1488857127.19.0.611989842521.issue29744@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 22:48:38 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 07 Mar 2017 03:48:38 +0000 Subject: [issue29176] /tmp does not exist on Android and is used by curses.window.putwin() In-Reply-To: <1483699620.77.0.827616599041.issue29176@psf.upfronthosting.co.za> Message-ID: <1488858518.81.0.321257208334.issue29176@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +441 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 22:56:22 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 07 Mar 2017 03:56:22 +0000 Subject: [issue28728] test_host_resolution in test_socket fails In-Reply-To: <1479407743.41.0.909577209709.issue28728@psf.upfronthosting.co.za> Message-ID: <1488858982.75.0.361542358789.issue28728@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 6 23:00:00 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 07 Mar 2017 04:00:00 +0000 Subject: [issue29680] gdb/libpython.py does not work with gdb 7.2 In-Reply-To: <1488335804.47.0.122589974382.issue29680@psf.upfronthosting.co.za> Message-ID: <1488859200.73.0.89983918246.issue29680@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +442 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 00:24:53 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 07 Mar 2017 05:24:53 +0000 Subject: [issue29676] C method is not profiled by lsprof In-Reply-To: <1488281664.18.0.494134456081.issue29676@psf.upfronthosting.co.za> Message-ID: <1488864293.78.0.0419232898616.issue29676@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 00:39:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 05:39:58 +0000 Subject: [issue29737] Optimize concatenating empty tuples In-Reply-To: <1488829716.87.0.539974742004.issue29737@psf.upfronthosting.co.za> Message-ID: <1488865198.27.0.103645359021.issue29737@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I agree with your comments Raymond, but let me to expose my reasons. An idea of optimizing empty tuple concatenating is inspired by partial(). It concatenates two tuples of arguments and it is common when one of tuple is empty. Current C implementation makes special case for this (and does this suboptimal). With optimized empty tuple concatenating it could be simpler and more efficient. Even when C implementation of partial() will not use this feature (see issue29735), I hope it can help in Python implementation of partial() and other partial-like functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 01:18:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 06:18:03 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488867483.71.0.302495631687.issue29741@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Other objects in the io module use special-purposed converter _PyIO_ConvertSsize_t() which checks PyNumber_Check() and calls PyNumber_AsSsize_t(). I think StringIO implementation can be changed to reuse _PyIO_ConvertSsize_t() for simplicity. After that BytesIO implementation can be changed to use the same converter just for uniformity. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 01:24:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 06:24:39 +0000 Subject: [issue29739] zipfile raises wrong exception for some incorrect passwords In-Reply-To: <1488833299.28.0.469862145344.issue29739@psf.upfronthosting.co.za> Message-ID: <1488867879.17.0.782508202843.issue29739@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: ZIP file has something like 8-bit control sum for checking the validity of the password. With the chance 1/256 the check is passed for wrong password. This is unavoidable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 01:26:47 2017 From: report at bugs.python.org (Eryk Sun) Date: Tue, 07 Mar 2017 06:26:47 +0000 Subject: [issue25996] Add support of file descriptor in os.scandir() In-Reply-To: <1451758238.49.0.729670752807.issue25996@psf.upfronthosting.co.za> Message-ID: <1488868007.56.0.280047264105.issue25996@psf.upfronthosting.co.za> Eryk Sun added the comment: > There is no similar function taking a directory handle In 3.5+ the CRT has O_OBTAIN_DIR (0x2000) for opening a directory, i.e. to call CreateFile with backup semantics. A directory can be read via GetFileInformationByHandleEx [1] using the information classes FileIdBothDirectoryRestartInfo and FileIdBothDirectoryInfo. This info class is just a simplified wrapper around the more powerful system call NtQueryDirectoryFile [2]. The implementation details could be hidden behind _Py_opendir, _Py_fdopendir, _Py_readdir, and _Py_closedir -- allowing a common implementation of the high-level listdir() and scandir() functions. I wrote a ctypes prototype of listdir() along these lines. One feature that's lost in using GetFileInformationByHandleEx to list a directory is the ability to do wildcard filtering. However, Python listdir and scandir never uses wildcard filtering, so it's no real loss. FindFirstFile implements this feature via the FileName parameter of NtQueryDirectoryFile. First it translates DOS wildcards to NT's set of 5 wildcards. There's the native NT '*' and '?', plus the quirky semantics of MS-DOS via '<', '>', and '"', i.e. DOS_STAR, DOS_QM, and DOS_DOT. See FsRtlIsNameInExpression [3] for a description of these wildcard characters. [1]: https://msdn.microsoft.com/en-us/library/aa364953 [2]: https://msdn.microsoft.com/en-us/library/ff567047 [3]: https://msdn.microsoft.com/en-us/library/ff546850 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 01:32:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 06:32:27 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488868347.01.0.233607160639.issue29741@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Are there tests for accepting non-integers in other classes? If no then don't bother about tests. I suppose all this came from the implementation of the 'n' format unit in PyArg_Parse* functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 01:39:04 2017 From: report at bugs.python.org (Armin Rigo) Date: Tue, 07 Mar 2017 06:39:04 +0000 Subject: [issue29694] race condition in pathlib mkdir with flags parents=True In-Reply-To: <1488462813.87.0.464471853988.issue29694@psf.upfronthosting.co.za> Message-ID: <1488868744.97.0.352489341809.issue29694@psf.upfronthosting.co.za> Armin Rigo added the comment: A different bug in the same code: if someone creates the directory itself between the two calls to ``self._accessor.mkdir(self, mode)``, then the function will fail with an exception even if ``exist_ok=True``. Attached is a patch that fixes both cases. ---------- keywords: +patch nosy: +arigo Added file: http://bugs.python.org/file46707/x1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 04:35:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 09:35:41 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1488879341.56.0.647290844029.issue20185@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +443 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 04:36:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 09:36:28 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1488879388.29.0.906248165172.issue20185@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +444 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 04:37:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 09:37:15 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1488879435.09.0.31634502817.issue20185@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +445 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 04:38:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 09:38:02 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1488879482.72.0.663739423832.issue20185@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +446 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 04:38:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 09:38:41 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1488879521.26.0.442957396664.issue20185@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +447 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 04:46:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 09:46:35 +0000 Subject: [issue29736] Optimize builtin types constructor In-Reply-To: <1488812174.68.0.707747009021.issue29736@psf.upfronthosting.co.za> Message-ID: <1488879995.15.0.106440458612.issue29736@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually there is an issue with using Argument Clinic for constructors. I wrote a patch that fixes it and converts constructors of basic types to Argument Clinic a half year ago, but it was not finished and published due to focusing on 3.6. I'll update and publish it soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 05:04:18 2017 From: report at bugs.python.org (Marien Zwart) Date: Tue, 07 Mar 2017 10:04:18 +0000 Subject: [issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select() In-Reply-To: <1488484095.89.0.988668664064.issue29700@psf.upfronthosting.co.za> Message-ID: <1488881058.65.0.366644329939.issue29700@psf.upfronthosting.co.za> Changes by Marien Zwart : ---------- pull_requests: +448 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 05:32:04 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 07 Mar 2017 10:32:04 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1488882724.46.0.282602839577.issue28856@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- components: +Interpreter Core stage: test needed -> patch review versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 05:34:16 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 07 Mar 2017 10:34:16 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1488882856.29.0.0413225136372.issue28856@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +449 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 05:41:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 10:41:07 +0000 Subject: [issue29746] Update marshal docs to Python 3 Message-ID: <1488883267.82.0.811271477172.issue29746@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The marshal module documentation still uses terms from Python 2. It mentions sys.stdin and os.popen() as legitimate sources (but they are text files). ---------- assignee: serhiy.storchaka components: Documentation messages: 289157 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Update marshal docs to Python 3 type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 05:43:50 2017 From: report at bugs.python.org (Oren Milman) Date: Tue, 07 Mar 2017 10:43:50 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488883430.62.0.0624227811878.issue29741@psf.upfronthosting.co.za> Oren Milman added the comment: using _PyIO_ConvertSsize_t sounds great. with regard to tests for accepting integer types in other classes, there aren't a lot of them, so I guess it is not always tested. still, it is tested in (excluding tests of the actual feature of treating integer types as ints): test_bytes, test_cmath, test_int, test_math, test_range, test_re, test_slice, test_struct, test_unicode and test_weakref. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 05:46:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 10:46:42 +0000 Subject: [issue29746] Update marshal docs to Python 3 In-Reply-To: <1488883267.82.0.811271477172.issue29746@psf.upfronthosting.co.za> Message-ID: <1488883602.43.0.821379970018.issue29746@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +450 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 05:47:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 10:47:25 +0000 Subject: [issue29746] Update marshal docs to Python 3 In-Reply-To: <1488883267.82.0.811271477172.issue29746@psf.upfronthosting.co.za> Message-ID: <1488883645.35.0.0230837579225.issue29746@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 06:16:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 11:16:23 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1488885383.54.0.651469001823.issue28856@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: printf-style bytes formatting was added mainly for increasing compatibility with Python 2. It was restricted to support mostly features existing in Python 2. '%s' formatting in Python 3 supports bytes-like objects partially: >>> b'%s' % array('B', [1, 2]) "array('B', [1, 2])" >>> b'%s' % buffer(array('B', [1, 2])) '\x01\x02' >>> b'%s' % memoryview(array('B', [1, 2])) Traceback (most recent call last): File "", line 1, in TypeError: cannot make memory view because object does not have the buffer interface >>> b'%s' % bytearray(b'abc') 'abc' >>> b'%s' % buffer(bytearray(b'abc')) 'abc' >>> b'%s' % memoryview(bytearray(b'abc')) '' I don't know whether there is a need of supporting the buffer protocol in printf-style bytes formatting. bytearray is already supported, buffer() doesn't exist in Python 3, memoryview() is not supported in Python 2. Seems this doesn't add anything for increasing the compatibility. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 06:32:46 2017 From: report at bugs.python.org (Oren Milman) Date: Tue, 07 Mar 2017 11:32:46 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488886366.43.0.00639641829178.issue29741@psf.upfronthosting.co.za> Oren Milman added the comment: also with regard to adding tests, consider the following scenario: in the future, someone writes a patch for these functions, which makes them not accept integer types anymore. assuming the tests don't exist, the writer of the patch doesn't realize the patch broke something, and so the patch is committed. years later, when the patch is finally a part of the stable release, it breaks a lot of code out there. lastly, ISTM adding these tests would be quite simple anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 07:51:32 2017 From: report at bugs.python.org (=?utf-8?q?Vin=C3=ADcius_Dantas?=) Date: Tue, 07 Mar 2017 12:51:32 +0000 Subject: [issue29747] unittest - assertDoesNotRaise Message-ID: <1488891092.02.0.36768274646.issue29747@psf.upfronthosting.co.za> New submission from Vin?cius Dantas: Unittest provides us some assert methods, yet one is missing: the assertDoesNotRaise context. When running tests, tests may end up as failures, successes or errors. It's worth noting that errors and failures are conceptually different, and that's the point on having an assertDoesNotRaise context, alike the assertRaises context. This context would be useful, for example, when using Selenium client, it would be helpful to know if an alert popped, given there is no method to check if there is an alert, we'd use a code like: with assertDoesNotRaise(NoAlertPresentException): driver.switch_to.alert.text It is also important to mention that it makes explicit what we are testing. After all, explicit is better than implicit. ---------- components: Library (Lib) messages: 289161 nosy: viniciusd priority: normal severity: normal status: open title: unittest - assertDoesNotRaise type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 08:06:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 13:06:47 +0000 Subject: [issue29748] Argument Clinic: slice index converter Message-ID: <1488892007.86.0.01356022303.issue29748@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Following PR adds the slice index converter. It can be used for converting indices in methods like list.index() and str.find(). ---------- components: Argument Clinic messages: 289162 nosy: larry, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Argument Clinic: slice index converter type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 08:14:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 13:14:09 +0000 Subject: [issue29748] Argument Clinic: slice index converter In-Reply-To: <1488892007.86.0.01356022303.issue29748@psf.upfronthosting.co.za> Message-ID: <1488892449.68.0.928712504096.issue29748@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 08:24:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Mar 2017 13:24:43 +0000 Subject: [issue29748] Argument Clinic: slice index converter In-Reply-To: <1488892007.86.0.01356022303.issue29748@psf.upfronthosting.co.za> Message-ID: <1488893083.77.0.192927977457.issue29748@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 08:44:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Mar 2017 13:44:49 +0000 Subject: [issue29749] Outdated int() docstring Message-ID: <1488894289.51.0.465519491821.issue29749@psf.upfronthosting.co.za> New submission from STINNER Victor: bpo-29695 removed "bad keyword parameters in int(), bool(), float(), list() and tuple()", but int docstring (at least) is now outdated: haypo at selma$ ./python Python 3.7.0a0 (master:8f6b344d368c15c3fe56c65c2f2776e7766fef55, Mar 7 >>> help(int) class int(object) | int(x=0) -> integer | int(x, base=10) -> integer ... >>> int(x=0) TypeError: 'x' is an invalid keyword argument for this function ---------- messages: 289163 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: Outdated int() docstring versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 09:13:14 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 07 Mar 2017 14:13:14 +0000 Subject: [issue29747] unittest - assertDoesNotRaise In-Reply-To: <1488891092.02.0.36768274646.issue29747@psf.upfronthosting.co.za> Message-ID: <1488895994.19.0.0956321241936.issue29747@psf.upfronthosting.co.za> R. David Murray added the comment: This has already been discussed and rejected (issue 14403). In practice the distinction between a failure and an error is not useful, and a comment in the test is IMO clearer than a no-op context manager: you can use a positive sentence instead of the reader having to understand a double negative ("Make sure there is an alert present; this will raise if not.") The fact that there is no method to check that there is an alert sounds like a missing feature somewhere outside of Python? Finally, if having this would in your group's opinion make your test code better, you can add it to your own TestCase subclass. But our conclusion was that it doesn't belong in the stdlib. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> unittest module: provide inverse of "assertRaises" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 10:34:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 15:34:15 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1488900855.53.0.791344654575.issue10030@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +452 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 10:40:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 15:40:29 +0000 Subject: [issue29593] Improve UnboundLocalError message for deleted names In-Reply-To: <1487351217.08.0.939746599909.issue29593@psf.upfronthosting.co.za> Message-ID: <1488901229.43.0.576937822832.issue29593@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue17792. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 10:42:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 15:42:00 +0000 Subject: [issue17441] Do not cache re.compile In-Reply-To: <1363468136.42.0.6196791543.issue17441@psf.upfronthosting.co.za> Message-ID: <1488901320.92.0.285372616364.issue17441@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 10:44:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 15:44:02 +0000 Subject: [issue16055] incorrect error text for int(base=1000, x='1') In-Reply-To: <1348688461.13.0.427927679227.issue16055@psf.upfronthosting.co.za> Message-ID: <1488901442.35.0.890389056197.issue16055@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since the first parameter of int() is now positional-only, this issue looks outdated. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 10:46:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Mar 2017 15:46:46 +0000 Subject: [issue16055] incorrect error text for int(base=1000, x='1') In-Reply-To: <1348688461.13.0.427927679227.issue16055@psf.upfronthosting.co.za> Message-ID: <1488901606.58.0.57197801533.issue16055@psf.upfronthosting.co.za> STINNER Victor added the comment: > Since the first parameter of int() is now positional-only, this issue looks outdated. Right, but Python 3.7 still has this issue: "The *base* argument can also be 0." The error message should be: "ValueError: int() base must be >= 2 and <= 36 or 0" (add "or 0") ---------- nosy: +haypo status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 10:47:18 2017 From: report at bugs.python.org (=?utf-8?q?Vin=C3=ADcius_Dantas?=) Date: Tue, 07 Mar 2017 15:47:18 +0000 Subject: [issue29747] unittest - assertDoesNotRaise In-Reply-To: <1488891092.02.0.36768274646.issue29747@psf.upfronthosting.co.za> Message-ID: <1488901638.4.0.596120729579.issue29747@psf.upfronthosting.co.za> Changes by Vin?cius Dantas : ---------- pull_requests: +453 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 10:47:31 2017 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 07 Mar 2017 15:47:31 +0000 Subject: [issue17441] Do not cache re.compile In-Reply-To: <1363468136.42.0.6196791543.issue17441@psf.upfronthosting.co.za> Message-ID: <1488901651.63.0.468017722218.issue17441@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 10:47:54 2017 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 07 Mar 2017 15:47:54 +0000 Subject: [issue17441] Do not cache re.compile In-Reply-To: <1363468136.42.0.6196791543.issue17441@psf.upfronthosting.co.za> Message-ID: <1488901674.96.0.715491797602.issue17441@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 10:51:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 15:51:01 +0000 Subject: [issue19871] json module won't parse a float that starts with a decimal point In-Reply-To: <1386058873.01.0.290791588539.issue19871@psf.upfronthosting.co.za> Message-ID: <1488901861.92.0.24564336857.issue19871@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 10:53:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 15:53:47 +0000 Subject: [issue21509] json.load fails to read UTF-8 file with (BOM) Byte Order Marks In-Reply-To: <1400099572.93.0.56172954955.issue21509@psf.upfronthosting.co.za> Message-ID: <1488902027.29.0.388539021504.issue21509@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue is outdated since implementing automatic encoding detecting in issue17909. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 10:55:36 2017 From: report at bugs.python.org (=?utf-8?q?Vin=C3=ADcius_Dantas?=) Date: Tue, 07 Mar 2017 15:55:36 +0000 Subject: [issue29686] Unittest - Return empty string instead of None object on shortDescription() In-Reply-To: <1488390914.6.0.812577119286.issue29686@psf.upfronthosting.co.za> Message-ID: Vin?cius Dantas added the comment: In the point of view of a tester, if it's an error, they will know right away it is a test case problem, not an assert problem. That makes debugging easier. It is also important to note that, if it's an AssertionError, we may add a message. While, if it is an error, no message would be displayed but the original Exception's. As Selenium's example, as I said, was just a use case example. Finally, having the failure reason explicit is better than keeping it implicit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 11:00:16 2017 From: report at bugs.python.org (Iryna) Date: Tue, 07 Mar 2017 16:00:16 +0000 Subject: [issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5 In-Reply-To: <1486909734.86.0.721049479861.issue29537@psf.upfronthosting.co.za> Message-ID: <1488902416.44.0.993388458722.issue29537@psf.upfronthosting.co.za> Iryna added the comment: If I may ask, what was the decision on this matter? We are planning to rebase Python 3.5 for Fedora and this currently blocks us, if we do not work this around with a patch. Let me know if there is anything I can help with to speed up the process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 11:36:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 16:36:02 +0000 Subject: [issue6759] zipfile.ZipExtFile.read() is missing universal newline support In-Reply-To: <1250922122.86.0.650490470964.issue6759@psf.upfronthosting.co.za> Message-ID: <1488904562.49.0.980637520579.issue6759@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Support of the 'U' mode is removed in 3.6 (issue27029). ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 11:38:52 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 07 Mar 2017 16:38:52 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1488904732.82.0.863494783243.issue28856@psf.upfronthosting.co.za> Xiang Zhang added the comment: Isn't this a discussed behaviour that is explicitly documented in PEP 461? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 11:43:30 2017 From: report at bugs.python.org (Stefan Krah) Date: Tue, 07 Mar 2017 16:43:30 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1488905010.28.0.253233379136.issue28856@psf.upfronthosting.co.za> Stefan Krah added the comment: For '%b', it looks like the PEP supports it. I didn't follow the PEP discussions, I think Ethan will know more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 11:53:07 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 07 Mar 2017 16:53:07 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1488905587.83.0.0403686546843.issue20087@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: I agree that it's reasonable to have glibc's aliases override the X.org ones, but this patch makes some pretty significant changes to Python's default assumptions with respect to default encodings for several locales. While some changes obviously make sense (e.g. 'ca_AD.ISO8859-1' to 'ca_AD.ISO8859-15'), others are less clear (e.g. 'cy_GB.ISO8859-1' to 'cy_GB.ISO8859-14' or 'tg_TJ.KOI8-C' to 'tg_TJ.KOI8-T' or several of the moves from ISO encodings to UTF-8). Is there some reference for why glibc chose different values than X.org for these ? I also don't understand why some "xx.utf-8" locale mappings were removed - I don't think we should remove those, unless they are no lot needed due to some other logic implying these mappings. Since these are major changes, we need an appropriate warning in the NEWS file (and the "What's New" document), an update of the top comment (under "### Database") to mention that the glibc database takes precedence and where to find it, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 11:55:30 2017 From: report at bugs.python.org (Jack Cushman) Date: Tue, 07 Mar 2017 16:55:30 +0000 Subject: [issue29739] zipfile raises wrong exception for some incorrect passwords In-Reply-To: <1488833299.28.0.469862145344.issue29739@psf.upfronthosting.co.za> Message-ID: <1488905730.59.0.522007208242.issue29739@psf.upfronthosting.co.za> Jack Cushman added the comment: Ah, thanks! That makes sense. I see it's documented in "man unzip" as well: "The correct password will always check out against the header, but there is a 1-in-256 chance that an incorrect password will as well. (This is a security feature of the PKWARE zipfile format; it helps prevent brute-force attacks that might otherwise gain a large speed advantage by testing only the header.) In the case that an incorrect password is given but it passes the header test anyway, either an incorrect CRC will be generated for the extracted data or else unzip will fail during the extraction because the ``decrypted'' bytes do not constitute a valid compressed data stream." Would it make sense to add a note to documentation for zipfile functions that take a password? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 12:23:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 17:23:04 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1488907384.39.0.343309274831.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > 'cy_GB.ISO8859-1' to 'cy_GB.ISO8859-14' Looks as just fixing an error. The default West-European ISO8859-1 is changed to Celtic cy_GB.ISO8859-14. This looks better option for Welsh. > 'tg_TJ.KOI8-C' to 'tg_TJ.KOI8-T' KOI8-C is not supported by Python, but KOI8-T is supported. I don't know what KOI8-C means, there are several rarely used incompatible encodings with this name. > I also don't understand why some "xx.utf-8" locale mappings were removed - I don't think we should remove those, unless they are no lot needed due to some other logic implying these mappings. The aliases table is a table of exceptions. Removed entries no longer are exceptional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 12:31:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 17:31:44 +0000 Subject: [issue29739] zipfile raises wrong exception for some incorrect passwords In-Reply-To: <1488833299.28.0.469862145344.issue29739@psf.upfronthosting.co.za> Message-ID: <1488907904.32.0.626832500584.issue29739@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think that this makes much sense. The exception raised for wrong password is not documented, even the fact that some exception is raised is not documented. In very rare cases you can read a data without any error using wrong password, but the result will be of course not correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 12:36:22 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 07 Mar 2017 17:36:22 +0000 Subject: [issue29691] Some tests fail in coverage Travis check In-Reply-To: <1488444156.84.0.711063027432.issue29691@psf.upfronthosting.co.za> Message-ID: <1488908182.76.0.845222511491.issue29691@psf.upfronthosting.co.za> Brett Cannon added the comment: So the reason we don't have the coverage run complain loudly is it takes at least 40 minutes to complete, so having to wait for that could potentially be annoying if you're e.g. trying to merge a cherry-pick and you just want to verify you didn't break anything. And yes, there might be some connection to issue #29048. To keep things simple we can close this in favour of the other issue and track the work there. ---------- superseder: -> Coverage influence tests, make some of them fail _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 12:36:33 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 07 Mar 2017 17:36:33 +0000 Subject: [issue29691] Some tests fail in coverage Travis check In-Reply-To: <1488444156.84.0.711063027432.issue29691@psf.upfronthosting.co.za> Message-ID: <1488908193.06.0.975983535252.issue29691@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 12:36:45 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 07 Mar 2017 17:36:45 +0000 Subject: [issue29048] Coverage influence tests, make some of them fail In-Reply-To: <1482407776.18.0.223230024277.issue29048@psf.upfronthosting.co.za> Message-ID: <1488908205.02.0.885811275858.issue29048@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 12:44:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 17:44:29 +0000 Subject: =?utf-8?q?=5Bissue17003=5D_Unification_of_read=28=29=C2=A0and_readline=28?= =?utf-8?q?=29_argument_names?= In-Reply-To: <1358698394.54.0.180835263252.issue17003@psf.upfronthosting.co.za> Message-ID: <1488908669.0.0.944972098222.issue17003@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:29:01 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 07 Mar 2017 18:29:01 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1488907384.39.0.343309274831.issue20087@psf.upfronthosting.co.za> Message-ID: Marc-Andre Lemburg added the comment: On 07.03.2017 18:23, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > >> 'cy_GB.ISO8859-1' to 'cy_GB.ISO8859-14' > > Looks as just fixing an error. The default West-European ISO8859-1 is changed to Celtic cy_GB.ISO8859-14. This looks better option for Welsh. > >> 'tg_TJ.KOI8-C' to 'tg_TJ.KOI8-T' > > KOI8-C is not supported by Python, but KOI8-T is supported. I don't know what KOI8-C means, there are several rarely used incompatible encodings with this name. While all this may make sense, I'm missing some more reasoning behind the differences between X.org and glibc. This change also looks strange: - 'ka_ge': 'ka_GE.GEORGIAN-ACADEMY', + 'ka_ge': 'ka_GE.GEORGIAN_PS', 'ka_ge.georgianacademy': 'ka_GE.GEORGIAN-ACADEMY', 'ka_ge.georgianps': 'ka_GE.GEORGIAN-PS', 'ka_ge.georgianrs': 'ka_GE.GEORGIAN-ACADEMY', Why is GEORGIAN_PS written with an underscore whereas the other mappings use dashes ? Or this one: - 'fi_fi': 'fi_FI.ISO8859-15', + 'fi_fi': 'fi_FI.ISO8859-1', Why would a locale switch away from an encoding having the Euro sign to one without it ? Or why is this latin variant removed: - 'nan_tw at latin': 'nan_TW.UTF-8 at latin', Why should Russians switch back to ISO ? - 'ru_ru': 'ru_RU.UTF-8', + 'ru_ru': 'ru_RU.ISO8859-5', or from ISO to KOI ? - 'russian': 'ru_RU.ISO8859-5', + 'russian': 'ru_RU.KOI8-R', The more I look at these changes, the more I believe we should not simply take everything we find in the files for granted. They obviously both have bugs. >> I also don't understand why some "xx.utf-8" locale mappings were removed - I don't think we should remove those, unless they are no longer needed due to some other logic implying these mappings. > > The aliases table is a table of exceptions. Removed entries no longer are exceptional. It's not a table of exceptions, it's a table mapping commonly used locale settings to ones which the lib C understands :-) But regardless, I checked the code and it is already smart enough to convert lib C incompatible spellings such as "utf8" to "UTF-8", so these entries can indeed be removed, but only if the locale is otherwise listed. In some cases, it's probably better to drop the ".utf8" to have more generic mappings, e.g. + 'bhb_in.utf8': 'bhb_IN.UTF-8', or 'de_li.utf8': 'de_LI.UTF-8', though I'd expect that mapping to be: 'de_li': 'de_LI.ISO8859-1', as for all other "de" entries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:31:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:31:05 +0000 Subject: [issue28826] Programming with Python 3.6 In-Reply-To: <1480371738.23.0.459754503807.issue28826@psf.upfronthosting.co.za> Message-ID: <1488911465.95.0.766845315531.issue28826@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:33:13 2017 From: report at bugs.python.org (Camilla Montonen) Date: Tue, 07 Mar 2017 18:33:13 +0000 Subject: [issue23267] multiprocessing pool.py doesn't close inqueue and outqueue pipes on termination In-Reply-To: <1421588019.18.0.707676170756.issue23267@psf.upfronthosting.co.za> Message-ID: <1488911593.22.0.915119587411.issue23267@psf.upfronthosting.co.za> Camilla Montonen added the comment: I did some investigating using a test script and Python 3.7.0a0 from multiprocessing import Pool import os import time def f(x): time.sleep(30) return x*x if __name__=='__main__': print('Main pid {0}'.format(os.getpid())) p = Pool(5) p.map(f, [1,2,3]) print('Returned') time.sleep(30) and grepping for pipe and the parentpid in the output from lsof ( lsof | grep python.*.*pipe ). The pipes opened at the start of the script are still open even after the line print('Returned') is executed. I suppose this is expected because I did not call *p.close()*. All pipes are cleaned up after the parent process finishes. When I repeat the experiment calling p.close() after p.map returns, all that is left is the 9 pipes opened by the parent. All pipes are cleaned up after parent script exits. @shani - could you please clarify how you were able to detect the leaking pipes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:37:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:37:39 +0000 Subject: [issue20612] cElementTree has problems with StringIO object containing unicode content In-Reply-To: <1392236199.28.0.287931665829.issue20612@psf.upfronthosting.co.za> Message-ID: <1488911859.97.0.822025078004.issue20612@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> wont fix stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:39:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:39:15 +0000 Subject: [issue19159] 2to3 incorrectly converts two parameter unicode() constructor to str() In-Reply-To: <1380848221.34.0.113318109219.issue19159@psf.upfronthosting.co.za> Message-ID: <1488911955.91.0.841013261132.issue19159@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> wont fix stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:43:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:43:11 +0000 Subject: [issue17343] Add a version of str.split which returns an iterator In-Reply-To: <1362359066.58.0.311917237277.issue17343@psf.upfronthosting.co.za> Message-ID: <1488912191.9.0.186684098532.issue17343@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> rejected stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:44:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:44:08 +0000 Subject: [issue26340] modal dialog with transient method; parent window fails to iconify In-Reply-To: <1455210342.9.0.230352859774.issue26340@psf.upfronthosting.co.za> Message-ID: <1488912248.19.0.0345849238816.issue26340@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> works for me stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:45:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:45:38 +0000 Subject: [issue24549] string.format() should have a safe_substitute equivalent, to be run consecutively In-Reply-To: <1435783349.65.0.381555612902.issue24549@psf.upfronthosting.co.za> Message-ID: <1488912338.59.0.60219287369.issue24549@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> rejected stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:46:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:46:33 +0000 Subject: [issue27235] Heap overflow occurred due to the int overflow (Python-2.7.11/Modules/posixmodule.c) In-Reply-To: <1465149697.95.0.775433257828.issue27235@psf.upfronthosting.co.za> Message-ID: <1488912393.23.0.135853552711.issue27235@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: test needed -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:47:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:47:43 +0000 Subject: [issue27619] getopt should strip whitespace from long arguments In-Reply-To: <1469494217.58.0.75154224673.issue27619@psf.upfronthosting.co.za> Message-ID: <1488912463.47.0.594891242913.issue27619@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:48:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:48:41 +0000 Subject: [issue25901] `make test` crashes in test_httpservers In-Reply-To: <1450431596.39.0.127057535.issue25901@psf.upfronthosting.co.za> Message-ID: <1488912521.15.0.227338615579.issue25901@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> works for me stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:49:32 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:49:32 +0000 Subject: [issue28025] Use IntEnum and IntFlags in ssl module In-Reply-To: <1473356149.55.0.656612529599.issue28025@psf.upfronthosting.co.za> Message-ID: <1488912572.96.0.116955476923.issue28025@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: commit review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:55:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:55:49 +0000 Subject: [issue23150] urllib parse incorrect handing of params In-Reply-To: <1420208027.4.0.951710161178.issue23150@psf.upfronthosting.co.za> Message-ID: <1488912949.41.0.41475183229.issue23150@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: test needed -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:56:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:56:45 +0000 Subject: [issue8238] Proxy handling very slow In-Reply-To: <1269588795.92.0.67904846936.issue8238@psf.upfronthosting.co.za> Message-ID: <1488913005.56.0.712779345356.issue8238@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> out of date stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 13:59:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 18:59:19 +0000 Subject: [issue19253] PyArg_ParseTuple: wrong use of seterror() clips helpful type error annotation In-Reply-To: <1381698493.04.0.861687446453.issue19253@psf.upfronthosting.co.za> Message-ID: <1488913159.11.0.847641597588.issue19253@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> out of date stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:03:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:03:00 +0000 Subject: [issue25841] In FancyURLopener error in example with http address. In-Reply-To: <1449848545.54.0.701964592914.issue25841@psf.upfronthosting.co.za> Message-ID: <1488913380.77.0.0723408073784.issue25841@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:04:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:04:21 +0000 Subject: [issue6445] Add check parameter to subprocess.Popen.communicate In-Reply-To: <1247131793.49.0.582429022768.issue6445@psf.upfronthosting.co.za> Message-ID: <1488913461.1.0.636705836604.issue6445@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: test needed -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:08:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:08:44 +0000 Subject: [issue1283110] Give __len__() advice for "don't know" Message-ID: <1488913724.61.0.119478298599.issue1283110@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +needs review stage: -> patch review status: pending -> open versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:09:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:09:36 +0000 Subject: [issue26016] io.TextIOWrapper.tell() report 65bit number when mix readline() + tell() In-Reply-To: <1452006336.5.0.310653434385.issue26016@psf.upfronthosting.co.za> Message-ID: <1488913776.69.0.887667424952.issue26016@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:15:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:15:38 +0000 Subject: [issue25547] Improve repr for files to show whether the file is open or closed. In-Reply-To: <1446572940.81.0.863832720658.issue25547@psf.upfronthosting.co.za> Message-ID: <1488914138.36.0.225420533902.issue25547@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: not a bug -> out of date status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:16:11 2017 From: report at bugs.python.org (Eric Frederich) Date: Tue, 07 Mar 2017 19:16:11 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1488914171.06.0.0189350323511.issue29319@psf.upfronthosting.co.za> Eric Frederich added the comment: I'm wondering if I'm experiencing this same issue. In a simple directory with a foo.py and a bar.py where foo tries to import from bar I cannot get it to work with the embeddable 3.6.0 zip, but the standard 3.6.0 that gets "installed" works fine. Also 3.5.3 works fine C:\Users\eric\Desktop\wtf>more foo.py from bar import bar print(bar('hi')) C:\Users\eric\Desktop\wtf>more bar.py def bar(s): return s.upper() C:\Users\eric\Desktop\wtf>C:\Users\eric\Downloads\python-3.5.3-embed-amd64\python.exe foo.py HI C:\Users\eric\Desktop\wtf>C:\Users\eric\Downloads\python-3.6.0-embed-amd64\python.exe foo.py Traceback (most recent call last): File "foo.py", line 1, in from bar import bar ModuleNotFoundError: No module named 'bar' ---------- nosy: +eric.frederich _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:17:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:17:33 +0000 Subject: [issue13535] Improved two's complement arithmetic support: to_signed() and to_unsigned() In-Reply-To: <1323132574.65.0.0748252638501.issue13535@psf.upfronthosting.co.za> Message-ID: <1488914253.29.0.159207923846.issue13535@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> rejected stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:18:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:18:33 +0000 Subject: [issue20525] Got compiler warning when compiling readline module In-Reply-To: <1391673492.51.0.068271536657.issue20525@psf.upfronthosting.co.za> Message-ID: <1488914313.56.0.282885370178.issue20525@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> works for me stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:19:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:19:43 +0000 Subject: [issue2263] struct.pack() + numpy int raises SystemError In-Reply-To: <1205134764.8.0.415620235375.issue2263@psf.upfronthosting.co.za> Message-ID: <1488914383.02.0.528338988617.issue2263@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> third party stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:22:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:22:27 +0000 Subject: [issue19469] Duplicate namespace package portions (but not on Windows) In-Reply-To: <1383285932.19.0.495289288555.issue19469@psf.upfronthosting.co.za> Message-ID: <1488914547.82.0.42755986447.issue19469@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> out of date stage: test needed -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:24:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:24:04 +0000 Subject: [issue16429] Emit SyntaxWarning for code that risks UnboundLocalError In-Reply-To: <1352300366.42.0.384864300614.issue16429@psf.upfronthosting.co.za> Message-ID: <1488914644.83.0.0296485809826.issue16429@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:25:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:25:12 +0000 Subject: [issue1158490] locale fails if LANGUAGE has multiple locales Message-ID: <1488914712.01.0.767487385609.issue1158490@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> out of date stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:26:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:26:21 +0000 Subject: [issue25641] urllib/request.py/getproxies_environment() throws "dictionary changed size during iteration" error occasionally In-Reply-To: <1447713968.83.0.231956831244.issue25641@psf.upfronthosting.co.za> Message-ID: <1488914781.9.0.471602246573.issue25641@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> not a bug stage: test needed -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 14:47:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 19:47:54 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1488916074.79.0.644353032364.issue29695@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 15:35:07 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 07 Mar 2017 20:35:07 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1488918907.54.0.399629576701.issue29319@psf.upfronthosting.co.za> Steve Dower added the comment: Eric - that sounds like the same issue. Can you test with 3.6.1rc1 to see if it is fixed for you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 15:39:19 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 07 Mar 2017 20:39:19 +0000 Subject: [issue29740] Visual C++ CRT security update from 14 June 2011 In-Reply-To: <1488835508.8.0.372164127647.issue29740@psf.upfronthosting.co.za> Message-ID: <1488919159.02.0.967632510465.issue29740@psf.upfronthosting.co.za> Steve Dower added the comment: We don't use MFC in Python, so we are not affected. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 15:40:24 2017 From: report at bugs.python.org (david) Date: Tue, 07 Mar 2017 20:40:24 +0000 Subject: [issue29750] smtplib doesn't handle unicode passwords Message-ID: <1488919224.48.0.0966376973087.issue29750@psf.upfronthosting.co.za> New submission from david: Trying to use unicode passwords on smtplib fails miserably on python3. My particular issue arises on line 643 of said library: (code, resp) = self.docmd(encode_base64(password.encode('ascii'), eol='')) which obviously dies when trying to handle unicode chars. ---------- components: Library (Lib) messages: 289184 nosy: david__ priority: normal severity: normal status: open title: smtplib doesn't handle unicode passwords versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 15:42:26 2017 From: report at bugs.python.org (david) Date: Tue, 07 Mar 2017 20:42:26 +0000 Subject: [issue29750] smtplib doesn't handle unicode passwords In-Reply-To: <1488919224.48.0.0966376973087.issue29750@psf.upfronthosting.co.za> Message-ID: <1488919346.76.0.848752499165.issue29750@psf.upfronthosting.co.za> david added the comment: I'm sorry I rushed my comment. Same thing happens on line 604 return encode_base64(s.encode('ascii'), eol='') changing both from 'ascii' to 'utf-8' works for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 15:53:51 2017 From: report at bugs.python.org (Camilla Montonen) Date: Tue, 07 Mar 2017 20:53:51 +0000 Subject: [issue27151] multiprocessing.Process leaves read pipes open (Process.sentinel) In-Reply-To: <1464519594.44.0.838880586419.issue27151@psf.upfronthosting.co.za> Message-ID: <1488920031.0.0.871384543814.issue27151@psf.upfronthosting.co.za> Changes by Camilla Montonen : ---------- nosy: +Winterflower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 16:12:12 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 07 Mar 2017 21:12:12 +0000 Subject: [issue29750] smtplib doesn't handle unicode passwords In-Reply-To: <1488919224.48.0.0966376973087.issue29750@psf.upfronthosting.co.za> Message-ID: <1488921132.83.0.457852366487.issue29750@psf.upfronthosting.co.za> R. David Murray added the comment: See msg253287. Someone should check the RFC. It is not obvious that just encoding using utf8 is correct; fundamentally passwords are binary data. But the auth methods don't currently accept binary data. UTF8 is a reasonable default these days, I think, but if we support more than ascii I think we need to support binary, with utf8 as the default encoding. ---------- components: +email nosy: +barry, r.david.murray type: -> enhancement versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 16:12:25 2017 From: report at bugs.python.org (Markus) Date: Tue, 07 Mar 2017 21:12:25 +0000 Subject: [issue29740] Visual C++ CRT security update from 14 June 2011 In-Reply-To: <1488835508.8.0.372164127647.issue29740@psf.upfronthosting.co.za> Message-ID: <1488921145.64.0.96078276563.issue29740@psf.upfronthosting.co.za> Markus added the comment: I beg pardon to be pedantic. The issue is not MFC, but CRT. The related safety bulletin (https://technet.microsoft.com/library/security/ms11-025) says Your application may be an attack vector if all of the following conditions are true: - Your application makes use of the Microsoft Foundation Class (MFC) Library - Your application allows the loading of dynamic link libraries from untrusted locations, such as WebDAV shares This is clearly **not** the case for Python. So far so good. I am concerned that the security update contains an updated vc90.crt 9.0.30729.6161. If Python find the 6161 update, it will use it. I found no information on the change between the 4940 version (from Python 2.7.13) and the 6161 update (from the security update). But as Python uses the 6161 update (if it is installed) I would like to raise the question if Python should ship it. I am not a security expert, so this issue is based completely on the above observations and a crumb of logic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 16:27:48 2017 From: report at bugs.python.org (Cubi) Date: Tue, 07 Mar 2017 21:27:48 +0000 Subject: [issue29751] PyLong_FromString fails on decimals with leading zero and base=0 Message-ID: <1488922068.27.0.463542328186.issue29751@psf.upfronthosting.co.za> New submission from Cubi: Calling PyLong_FromString(str, NULL, 0) fails, if str is a string containing a decimal number with leading zeros, even though such strings should be parsed as decimal numbers according to the documentation: "If base is 0, the radix will be determined based on the leading characters of str: if str starts with '0x' or '0X', radix 16 will be used; if str starts with '0o' or '0O', radix 8 will be used; if str starts with '0b' or '0B', radix 2 will be used; otherwise radix 10 will be used" Examples: PyLong_FromString("15", NULL, 0); // Returns int(15) (Correct) PyLong_FromString("0xF", NULL, 0); // Returns int(15) (Correct) PyLong_FromString("015", NULL, 0); // Should return int(15), but raises ValueError: invalid literal for int() with base 0: '015' Version information: Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32 ---------- components: Interpreter Core messages: 289188 nosy: cubinator priority: normal severity: normal status: open title: PyLong_FromString fails on decimals with leading zero and base=0 type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 16:33:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 07 Mar 2017 21:33:01 +0000 Subject: [issue13535] Improved two's complement arithmetic support: to_signed() and to_unsigned() In-Reply-To: <1323132574.65.0.0748252638501.issue13535@psf.upfronthosting.co.za> Message-ID: <1488922381.06.0.02513764287.issue13535@psf.upfronthosting.co.za> STINNER Victor added the comment: If you open the can of worms, other features will be requested like uint32+uint32 which would silently overflow. IMHO it would be better to have a package (on PyPI) providing integers of fixed size implementing two's complement arithmetic: int8, uint16, etc. I failed to find an existing module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 16:47:26 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 07 Mar 2017 21:47:26 +0000 Subject: [issue29751] PyLong_FromString fails on decimals with leading zero and base=0 In-Reply-To: <1488922068.27.0.463542328186.issue29751@psf.upfronthosting.co.za> Message-ID: <1488923246.89.0.545193922108.issue29751@psf.upfronthosting.co.za> Martin Panter added the comment: My guess is this is supposed to emulate (or is actually the implementation of) the "int" constructor and the Python syntax. In these cases, numbers with leading zeros are disallowed. This was to help with Python 2 porting, where a leading zero specified an octal number. >>> 010 010 ^ SyntaxError: invalid token >>> int("010", 0) ValueError: invalid literal for int() with base 0: '010' Maybe it is better to fix the documentation. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 16:53:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Mar 2017 21:53:10 +0000 Subject: [issue29751] PyLong_FromString fails on decimals with leading zero and base=0 In-Reply-To: <1488922068.27.0.463542328186.issue29751@psf.upfronthosting.co.za> Message-ID: <1488923590.77.0.000114218218853.issue29751@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, mark.dickinson type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 17:29:52 2017 From: report at bugs.python.org (Ethan Furman) Date: Tue, 07 Mar 2017 22:29:52 +0000 Subject: [issue29752] Enum._missing_ not called for __getattr__ failures Message-ID: <1488925792.17.0.971645599389.issue29752@psf.upfronthosting.co.za> New submission from Ethan Furman: class Label(Enum): RedApple = 1 GreenApple = 2 @classmethod def _missing_(cls, name): for member in cls: if member.name.lower() == name.lower(): return member Currently, _missing_ is only called when using the functional API. In words: Label('redapple') # works Label.redapple # does not ---------- assignee: ethan.furman messages: 289191 nosy: barry, eli.bendersky, ethan.furman priority: normal severity: normal stage: test needed status: open title: Enum._missing_ not called for __getattr__ failures type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 19:23:14 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Wed, 08 Mar 2017 00:23:14 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1488932594.69.0.210220148036.issue28685@psf.upfronthosting.co.za> Elliot Gorokhovsky added the comment: Will post the final version of this patch as a pull request on Github. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 19:36:40 2017 From: report at bugs.python.org (Charles Machalow) Date: Wed, 08 Mar 2017 00:36:40 +0000 Subject: [issue29753] Ctypes Packing Incorrectly - Linux Message-ID: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> New submission from Charles Machalow: There appears to be a bug related to sizing/packing of ctypes Structures on Linux. I'm not quite sure how, but this structure: class MyStructure(Structure): _pack_ = 1 _fields_ = [ ("P", c_uint16), # 2 Bytes ("L", c_uint16, 9), ("Pro", c_uint16, 1), ("G", c_uint16, 1), ("IB", c_uint16, 1), ("IR", c_uint16, 1), ("R", c_uint16, 3), # 4 Bytes ("T", c_uint32, 10), ("C", c_uint32, 20), ("R2", c_uint32, 2) # 8 Bytes ] Gives back a sizeof of 8 on Windows and 10 on Linux. The inconsistency makes it difficult to have code work cross-platform. Running the given test.py file will print out the size of the structure on your platform. Tested with Python 2.7.6 and Python 3.4.3 (builtin to Ubuntu 14.04), Python 2.7.13, (built from source) both on Ubuntu 14.04. On Linux all Python builds were 32 bit. On Windows I tried with 2.7.7 (both 32 and 64 bit). I believe on both platforms it should return a sizeof 8. ---------- components: ctypes files: test.py messages: 289193 nosy: Charles Machalow, amaury.forgeotdarc, belopolsky, meador.inge priority: normal severity: normal status: open title: Ctypes Packing Incorrectly - Linux type: behavior versions: Python 2.7, Python 3.4 Added file: http://bugs.python.org/file46708/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 19:48:14 2017 From: report at bugs.python.org (Eric Frederich) Date: Wed, 08 Mar 2017 00:48:14 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1488934094.54.0.508004161309.issue29319@psf.upfronthosting.co.za> Eric Frederich added the comment: I can confirm that this is NOT fixed in 3.6.1rc1 embeddable zip. This is extremely easy to reproduce. Look at the contents of foo.py and bar.py. Just throw them in the same directory and try to run C:\path\to\extracted\python.exe foo.py ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 20:43:49 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 08 Mar 2017 01:43:49 +0000 Subject: [issue27151] multiprocessing.Process leaves read pipes open (Process.sentinel) In-Reply-To: <1464519594.44.0.838880586419.issue27151@psf.upfronthosting.co.za> Message-ID: <1488937429.94.0.716898655166.issue27151@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 21:19:28 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 08 Mar 2017 02:19:28 +0000 Subject: [issue17441] Do not cache re.compile In-Reply-To: <1363468136.42.0.6196791543.issue17441@psf.upfronthosting.co.za> Message-ID: <1488939568.25.0.116726253614.issue17441@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Can this be closed. Caching of regexes has been around for a very long time and I expect that a lot of code depends on it. This should not be washed away without considerable discussion. ---------- nosy: +rhettinger status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 21:32:22 2017 From: report at bugs.python.org (Tomohiko Kinebuchi) Date: Wed, 08 Mar 2017 02:32:22 +0000 Subject: [issue19225] lack of PyExc_BufferError doc In-Reply-To: <1381485777.95.0.364414099437.issue19225@psf.upfronthosting.co.za> Message-ID: <1488940342.36.0.99384311207.issue19225@psf.upfronthosting.co.za> Tomohiko Kinebuchi added the comment: This issue seems pending. > beng94 Would you create a pull request? ---------- nosy: +cocoatomo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 21:46:50 2017 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 08 Mar 2017 02:46:50 +0000 Subject: [issue17441] Do not cache re.compile In-Reply-To: <1363468136.42.0.6196791543.issue17441@psf.upfronthosting.co.za> Message-ID: <1488941210.29.0.0225660099792.issue17441@psf.upfronthosting.co.za> Matthew Barnett added the comment: If we were doing it today, maybe we wouldn't cache them, but, as you say, it's been like that for a long time. (The regex module also caches them, because the re module does.) Unless someone can demonstrate that it's a problem, I'd say just leave it as it is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 22:16:07 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 08 Mar 2017 03:16:07 +0000 Subject: [issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc In-Reply-To: <1462256356.96.0.954300432794.issue26915@psf.upfronthosting.co.za> Message-ID: <1488942967.85.0.305854772427.issue26915@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +454 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 22:19:59 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 08 Mar 2017 03:19:59 +0000 Subject: [issue24329] __qualname__ and __slots__ In-Reply-To: <1432930157.09.0.507147768187.issue24329@psf.upfronthosting.co.za> Message-ID: <1488943199.69.0.858710968454.issue24329@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 22:44:58 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 08 Mar 2017 03:44:58 +0000 Subject: [issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc In-Reply-To: <1462256356.96.0.954300432794.issue26915@psf.upfronthosting.co.za> Message-ID: <1488944698.72.0.81972671546.issue26915@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 22:51:57 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 08 Mar 2017 03:51:57 +0000 Subject: [issue29568] undefined parsing behavior with the old style string formatting In-Reply-To: <1487170382.81.0.823573985019.issue29568@psf.upfronthosting.co.za> Message-ID: <1488945117.37.0.442415955421.issue29568@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 23:04:50 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 08 Mar 2017 04:04:50 +0000 Subject: [issue27151] multiprocessing.Process leaves read pipes open (Process.sentinel) In-Reply-To: <1464519594.44.0.838880586419.issue27151@psf.upfronthosting.co.za> Message-ID: <1488945890.82.0.817666277158.issue27151@psf.upfronthosting.co.za> Changes by Josh Rosenberg : ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 7 23:44:45 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 08 Mar 2017 04:44:45 +0000 Subject: [issue23267] multiprocessing pool.py doesn't close inqueue and outqueue pipes on termination In-Reply-To: <1421588019.18.0.707676170756.issue23267@psf.upfronthosting.co.za> Message-ID: <1488948285.94.0.471798504577.issue23267@psf.upfronthosting.co.za> Changes by Josh Rosenberg : ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 00:09:26 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 Mar 2017 05:09:26 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1488949766.17.0.945512880192.issue29319@psf.upfronthosting.co.za> Steve Dower added the comment: Oh, well that's by design. Neither the current working directory nor the directory of the initial script are in sys.path by default - they need to be added explicitly. The intent of this distro is that you know exactly where relative to the executable your modules are, that won't change after you release your app, and that you want to avoid other code using your private (embedded) copy of Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 00:14:13 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 Mar 2017 05:14:13 +0000 Subject: [issue29740] Visual C++ CRT security update from 14 June 2011 In-Reply-To: <1488835508.8.0.372164127647.issue29740@psf.upfronthosting.co.za> Message-ID: <1488950053.64.0.560772587041.issue29740@psf.upfronthosting.co.za> Steve Dower added the comment: There will be no changes to the CRT in the update. It's been released as a major upgrade package rather than a patch, which is why it contains all the files, but the last version field typically (and in this case definitely) indicates no change to the API or implementation beyond that described in the associated KB article. So thanks for being through and bringing it to our attention, but it's not necessary to change anything here on our side, and it's probably riskier to make any change than to not make it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 00:21:47 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 08 Mar 2017 05:21:47 +0000 Subject: [issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5 In-Reply-To: <1486909734.86.0.721049479861.issue29537@psf.upfronthosting.co.za> Message-ID: <1488950507.87.0.51297598365.issue29537@psf.upfronthosting.co.za> Nick Coghlan added the comment: I just realised I need to add some test cases to test_importlib/source/test_file_loader.py before merging it, but since Larry hasn't objected to the proposed approach, I'm going to go ahead and implement this fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 00:23:58 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 Mar 2017 05:23:58 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1488950638.15.0.872841497676.issue29723@psf.upfronthosting.co.za> Steve Dower added the comment: It's actually "adding" the current directory by not replacing the empty string that's normally there, presumably because it's already been resolved into a path at this stage. The behavior on Windows is correct, so I expect it's actually a difference between getpath.c and getpathp.c, rather than an isolated/non-isolated mode issue. I'll try and take a look - my plate is fairly full over the next few weeks though, so if anyone is able to help out I'd appreciate it, especially since it's not my usual platform. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 00:32:52 2017 From: report at bugs.python.org (=?utf-8?q?Tomas_Daba=C5=A1inskas?=) Date: Wed, 08 Mar 2017 05:32:52 +0000 Subject: [issue29754] sorted ignores reverse=True when sorting produces same list Message-ID: <1488951172.21.0.568731538203.issue29754@psf.upfronthosting.co.za> New submission from Tomas Daba?inskas: sorted ignores reverse=True when sorting produces same list, I was expecting reverse regardless of the sorting outcome. Python 3.5.2 (default, Jul 17 2016, 00:00:00) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> data = [{'name': 'first', 'weight': 1},{'name': 'second', 'weight': 1},{'name': 'third', 'weight': 1}, {'name': 'fourth', 'weight': 1}] >>> sorted(data, key=lambda x: x['weight'], reverse=True) [{'name': 'first', 'weight': 1}, {'name': 'second', 'weight': 1}, {'name': 'third', 'weight': 1}, {'name': 'fourth', 'weight': 1}] >>> sorted(data, key=lambda x: x['weight'], reverse=True) == sorted(data, key=lambda x: x['weight']).reverse() False Thanks! ---------- components: Library (Lib) messages: 289202 nosy: Tomas Daba?inskas priority: normal severity: normal status: open title: sorted ignores reverse=True when sorting produces same list versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 00:59:28 2017 From: report at bugs.python.org (Clay Gerrard) Date: Wed, 08 Mar 2017 05:59:28 +0000 Subject: [issue19837] Wire protocol encoding for the JSON module In-Reply-To: <1385778645.87.0.0800898315059.issue19837@psf.upfronthosting.co.za> Message-ID: <1488952768.76.0.595891370814.issue19837@psf.upfronthosting.co.za> Clay Gerrard added the comment: and for *encoding* case? Can you just add the encoding argument back to json.dumps? Have it default to None because of backwards compatibility in python3 and continue to return strings by default... ... and then *everyone* that ever wants to *serialize* an object to json because they want to put it on a wire or w/e will hopefully someday learn when you call json.dumps you *always* set encoding='utf-8' and it will always return utf-8 encoded bytes (which is the same thing it would have done py2 regardless)? Is it confusing for the py3 encoding argument to mean something different than py2? Probably? The encoding argument in py2 was there to tell the Encoder how to decode keys and values who's strings were acctually utf-8 encoded bytes. But w/e py3 doesn't have that problem - so py3 can unambiguously hijack dumps' encoding param to mean bytes! Then, sure, maybe the fact I can write: sock.send(json.dumps(obj, encoding='utf-8')) ... in either language is just a happy coincidence - but it'd be useful nevertheless. Or I could be wrong. I've not been thinking about this for 3 years. But I have bumped into this a couple of times in the years since starting to dream of python 3.2^H4^H5^H6^H7 support - but until then I do seem to frequently forget json.dumps(obj).decode('utf-8') so maybe my suggestion isn't really any better!? ---------- nosy: +Clay Gerrard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 01:07:19 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 08 Mar 2017 06:07:19 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1488953239.44.0.00755813836799.issue29571@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- pull_requests: +455 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 01:07:53 2017 From: report at bugs.python.org (Tim Peters) Date: Wed, 08 Mar 2017 06:07:53 +0000 Subject: [issue29754] sorted ignores reverse=True when sorting produces same list In-Reply-To: <1488951172.21.0.568731538203.issue29754@psf.upfronthosting.co.za> Message-ID: <1488953273.71.0.984269039016.issue29754@psf.upfronthosting.co.za> Tim Peters added the comment: Your last line can't possibly return True, because `somelist.reverse()` returns None. So the last line is irrelevant. Your complaint appears to be about the line before, which shows that the list retains its original order. That's expected. All the keys are equal, so a stable sort _must_ retain the original order (that's what "stable" means). So that's not a bug - it's a feature. The idea that `x.sort(reverse=True)` must do the same as `x.sort(); x.reverse()` is something you made up in your head ;-) That is, the docs don't say that. What they do say: """ reverse is a boolean value. If set to True, then the list elements are sorted as if each comparison were reversed. """ That has no effect on keys that compare equal. It means that keys that compare "less than" are treated as if they had compared "greater than" instead, and vice versa. While it may not be immediately obvious, what `x.sort(reverse=True)` is actually equivalent to is the sequence: x.reverse() x.sort() x.reverse() ---------- nosy: +tim.peters resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 01:27:06 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 08 Mar 2017 06:27:06 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1488954426.02.0.680922295249.issue20087@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Why is the X11 locale alias map used at all? It seems like it can only create confusion with libc. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 01:44:44 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 08 Mar 2017 06:44:44 +0000 Subject: [issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5 In-Reply-To: <1486909734.86.0.721049479861.issue29537@psf.upfronthosting.co.za> Message-ID: <1488955484.83.0.530569729609.issue29537@psf.upfronthosting.co.za> Nick Coghlan added the comment: Merged (with test cases) in https://github.com/python/cpython/commit/93602e3af70d3b9f98ae2da654b16b3382b68d50 The test cases even cover ensuring the backwards compatibility also applies to frozen bytecode :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 01:51:41 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 08 Mar 2017 06:51:41 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1488955901.44.0.221425934017.issue29571@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- pull_requests: +456 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 01:51:44 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 08 Mar 2017 06:51:44 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1488955904.14.0.21389711485.issue29571@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- pull_requests: +457 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 01:52:27 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 08 Mar 2017 06:52:27 +0000 Subject: [issue29514] Add a test case that prevents magic number changes in minor releases In-Reply-To: <1486654210.44.0.116789566768.issue29514@psf.upfronthosting.co.za> Message-ID: <1488955947.97.0.792114576013.issue29514@psf.upfronthosting.co.za> Nick Coghlan added the comment: I just merged https://github.com/python/cpython/commit/93602e3af70d3b9f98ae2da654b16b3382b68d50 as the fix for issue #29537, so 3.5.4+ should handle legacy bytecode files without any complaints (and redistributors can backport it to 3.5.3 as needed). For *this* issue, the main requested change to the proposed test case is to simplify it to use Serhiy's suggested approach: just define a single "EXPECTED_MAGIC_NUMBER" in the test suite, and have that be different on different maintenance branches. For branches in alpha and beta phase, the test case should be skipped with a message like "Bytecode stability is not checked in alpha & beta releases" ---------- stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 02:19:12 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 08 Mar 2017 07:19:12 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1488957552.04.0.539091258414.issue29723@psf.upfronthosting.co.za> Eryk Sun added the comment: > It's actually "adding" the current directory It's the script directory, which gets added on all platforms when PySys_SetArgv is called with Py_IsolatedFlag == 0. In this case we're running "__main__.py" from a directory or zip file, and we don't want its parent directory in sys.path. > The behavior on Windows is correct Here's what I see on a current build of 3.6: C:\Temp>python_d -i main361 >>> import sys >>> sys.version '3.6.0+ (default, Mar 8 2017, 06:51:22) [MSC v.1900 64 bit (AMD64)]' >>> sys.path[:2] ['main361', 'C:\\Temp'] C:\Temp doesn't belong in sys.path in this case. When we're not in isolated mode, RunMainFromImporter should set the __main__.py import source as index 0 rather than insert it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 02:19:41 2017 From: report at bugs.python.org (Charles Machalow) Date: Wed, 08 Mar 2017 07:19:41 +0000 Subject: [issue29753] Ctypes Packing Incorrectly - Linux In-Reply-To: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> Message-ID: <1488957581.03.0.142909648716.issue29753@psf.upfronthosting.co.za> Charles Machalow added the comment: Took a quick look at the c code for this. The area at fault appears to be this section in cfield.c: #ifndef MS_WIN32 } else if (bitsize /* this is a bitfield request */ && *pfield_size /* we have a bitfield open */ && dict->size * 8 >= *pfield_size && (*pbitofs + bitsize) <= dict->size * 8) { /* expand bit field */ fieldtype = EXPAND_BITFIELD; #endif The problem seems to be after the end of the 2nd c_uint16, it seems to think that the next 10 bytes should extend that c_uint16 to a c_uint32 instead of taking the type as the beginning of a new c_uint32. So I guess it is making the structure something like this: ("P", c_uint16), ("L", c_uint32, 9), ("Pro", c_uint32, 1), ("G", c_uint32, 1), ("IB", c_uint32, 1), ("IR", c_uint32, 1), ("R", c_uint32, 3), ("T", c_uint32, 10), # And now this needs an extra 6 bits of padding to fill the c_uint32 ("C", c_uint32, 20), ("R2", c_uint32, 2) # And now this needs an extra 10 bits of padding to fill the c_uint32. I guess that is how we get to 10... instead of the expected 8 bytes. I don't believe that this behavior is desired nor really makes logical sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 02:20:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 07:20:53 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1488957653.18.0.52704674002.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Not all platforms use glibc 2.24 as libc. Ideally most of entries should even not exist. We should ask libc for the default encoding if it is not included in the locale name. The aliases table should be used only for mapping commonly used but unsupported by libc locales to supported by libc locales. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 02:21:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 07:21:27 +0000 Subject: [issue17441] Do not cache re.compile In-Reply-To: <1363468136.42.0.6196791543.issue17441@psf.upfronthosting.co.za> Message-ID: <1488957687.68.0.92324233863.issue17441@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 02:24:00 2017 From: report at bugs.python.org (Charles Machalow) Date: Wed, 08 Mar 2017 07:24:00 +0000 Subject: [issue29753] Ctypes Packing Incorrectly - Linux In-Reply-To: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> Message-ID: <1488957840.07.0.509999079709.issue29753@psf.upfronthosting.co.za> Charles Machalow added the comment: Some more debug with print statements in the c code seems to confirm my suspicion: bitsize, pfield_size, bitofs, dict->size prints were added just above the if chain to determine fieldtype and fieldtype was just after that if chain. That code looks something like this: printf("bitsize: %d\n" , (int)bitsize); printf("pfield_size: %u\n", (size_t)*pfield_size); printf("bitofs: %d\n", (int)*pbitofs); printf("dict->size: %d\n", (int)dict->size); if (bitsize /* this is a bitfield request */ && *pfield_size /* we have a bitfield open */ #ifdef MS_WIN32 /* MSVC, GCC with -mms-bitfields */ && dict->size * 8 == *pfield_size #else /* GCC */ && dict->size * 8 <= *pfield_size #endif && (*pbitofs + bitsize) <= *pfield_size) { /* continue bit field */ fieldtype = CONT_BITFIELD; #ifndef MS_WIN32 } else if (bitsize /* this is a bitfield request */ && *pfield_size /* we have a bitfield open */ && dict->size * 8 >= *pfield_size && (*pbitofs + bitsize) <= dict->size * 8) { /* expand bit field */ fieldtype = EXPAND_BITFIELD; #endif } else if (bitsize) { /* start new bitfield */ fieldtype = NEW_BITFIELD; *pbitofs = 0; *pfield_size = dict->size * 8; } else { /* not a bit field */ fieldtype = NO_BITFIELD; *pbitofs = 0; *pfield_size = 0; } printf("Fieldtype: %d\n------\n", fieldtype); And the run with the custom-built Python 2.7.13: >>> from test import * bitsize: 0 pfield_size: 0 bitofs: 255918304 dict->size: 2 Fieldtype: 0 ------ bitsize: 9 pfield_size: 0 bitofs: 0 dict->size: 2 Fieldtype: 1 ------ bitsize: 1 pfield_size: 16 bitofs: 9 dict->size: 2 Fieldtype: 2 ------ bitsize: 1 pfield_size: 16 bitofs: 10 dict->size: 2 Fieldtype: 2 ------ bitsize: 1 pfield_size: 16 bitofs: 11 dict->size: 2 Fieldtype: 2 ------ bitsize: 1 pfield_size: 16 bitofs: 12 dict->size: 2 Fieldtype: 2 ------ bitsize: 3 pfield_size: 16 bitofs: 13 dict->size: 2 Fieldtype: 2 ------ bitsize: 10 pfield_size: 16 bitofs: 16 dict->size: 4 Fieldtype: 3 ------ bitsize: 20 pfield_size: 32 bitofs: 26 dict->size: 4 Fieldtype: 1 ------ bitsize: 2 pfield_size: 32 bitofs: 20 dict->size: 4 Fieldtype: 2 ------ 10 >>> MyStructure.P >>> MyStructure.T >>> MyStructure.R >>> MyStructure.P >>> MyStructure.L >>> MyStructure.Pro >>> MyStructure.R >>> MyStructure.T >>> MyStructure.C ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 02:33:44 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 08 Mar 2017 07:33:44 +0000 Subject: [issue29753] Ctypes Packing Incorrectly - Linux In-Reply-To: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> Message-ID: <1488958424.12.0.896797109172.issue29753@psf.upfronthosting.co.za> Eryk Sun added the comment: To make it simpler to diagram the fields, I've rewritten your structure using field names A-J: import ctypes class MyStructure(ctypes.Structure): _pack_ = 1 _fields_ = (('A', ctypes.c_uint16), # 2 bytes ('B', ctypes.c_uint16, 9), ('C', ctypes.c_uint16, 1), ('D', ctypes.c_uint16, 1), ('E', ctypes.c_uint16, 1), ('F', ctypes.c_uint16, 1), ('G', ctypes.c_uint16, 3), # 4 bytes ('H', ctypes.c_uint32, 10), ('I', ctypes.c_uint32, 20), ('J', ctypes.c_uint32, 2)) # 8 bytes ctypes is attempting to extend the bitfield for H by switching to a c_uint storage unit with an offset of 2 bytes and adding H field with a 16-bit offset: >>> MyStructure.H Here's the correct layout: | uint16 | uint16 | uint32 |------16-------|------16-------|---10----|--------20---------|- A---------------B--------CDEFG--H---------I-------------------J- and here's the layout that ctypes creates, which wastes 2 bytes: | uint32 | | uint16 | uint16 | | uint32 |------16-------|------16-------|---10----|--6--|--------20---------|-|---10---- A---------------B--------CDEFG--H---------------I-------------------J----------- The current strategy for extending bitfields to work like gcc on Linux is obviously failing us here. Hopefully someone can flesh out the exact rules to make this code accurate. Bitfields are such a pain. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 02:34:34 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 08 Mar 2017 07:34:34 +0000 Subject: [issue29753] Ctypes Packing Incorrectly - Linux In-Reply-To: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> Message-ID: <1488958474.46.0.617655329579.issue29753@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 02:36:06 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 08 Mar 2017 07:36:06 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1488958566.2.0.212492277007.issue29619@psf.upfronthosting.co.za> Xiang Zhang added the comment: Any reason our _Py_stat_struct on Windows uses a signed type to represent st_ino? ---------- nosy: +eryksun, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 02:45:23 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 08 Mar 2017 07:45:23 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1488959123.98.0.225674963564.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, interesting, I didn't know there was a difference between the platforms in when the placeholder got resolved to a full path. However, after browsing the code and running some local tests, it seems that injecting sys.path[0] isn't handled by Py_GetPath() or PySys_SetPath(), regardless of OS. Instead, it's handled as a side effect of calling PySys_SetArgV(), with PySys_SetArgVEx() adding a flag to disable the side effect (for the benefit of the isolated mode implementation). The actual side effect itself is implemented in sys_update_path: https://github.com/python/cpython/blob/3.6/Python/sysmodule.c#L2162 So in the case of running `./python Tools` (which exercises the paths of interest here) with some strategically placed printf() and PySys_FormatStdout() calls, I get: ``` $ ./python Tools module_search_path: /usr/local/lib/python36.zip:/home/ncoghlan/devel/py36/Lib:/home/ncoghlan/devel/py36/Lib:/home/ncoghlan/devel/py36/build/lib.linux-x86_64-3.6 sys.path[0]: '/home/ncoghlan/devel/py36' sys.path: ['/home/ncoghlan/devel/py36', '/usr/local/lib/python36.zip', '/home/ncoghlan/devel/py36/Lib', '/home/ncoghlan/devel/py36/build/lib.linux-x86_64-3.6', '/home/ncoghlan/.local/lib/python3.6/site-packages'] /home/ncoghlan/devel/py36/python: can't find '__main__' module in 'Tools' ``` The first line is from `Py_GetPath()`, the second is from `sys_update_path()`, the third is from `RunMainFromImporter` (before it makes any sys.path changes), and the last is the expected error because our `Tools` directory isn't executable. In this scenario, we want the "Tools" entry to *overwrite* sys.path[0]. While in isolated mode I get: ``` $ ./python -I Tools module_search_path: /usr/local/lib/python36.zip:/home/ncoghlan/devel/py36/Lib:/home/ncoghlan/devel/py36/Lib:/home/ncoghlan/devel/py36/build/lib.linux-x86_64-3.6 sys.path: ['/usr/local/lib/python36.zip', '/home/ncoghlan/devel/py36/Lib', '/home/ncoghlan/devel/py36/build/lib.linux-x86_64-3.6'] /home/ncoghlan/devel/py36/python: can't find '__main__' module in 'Tools' ``` In this scenario, we want the "Tools" entry to be inserted *before* sys.path[0]. Note that this has been buggy since the -I switch was introduced, but the entry we've been overwriting has been the one for the stdlib-as-a-zip-archive, so it didn't cause any problems for anyone using the default directory-based installation layout. However, we can't reliably figure out which to do based on the contents of sys.path, we need to look at Py_IsolatedFlag instead. (I'm not sure why the current check is working on Windows, as sys_update_path() attempts to resolve an absolute path entry from the archive or directory name there as well) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 02:56:23 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 08 Mar 2017 07:56:23 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1488959783.07.0.185640869973.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: So a potentially more robust fix here would be to always call `PySys_SetArgVEx(argc, argv, 0)` rather than the plain `PySys_SetArgV` when we know we're going to be relying on RunMainFromImporter. That way RunMainFromImporter could just *always* insert at the front, and not have to try to guess whether or not a different sys.path[0] entry had already been populated. This would involve splitting RunMainFromImporter into two pieces (one to check whether the given filename is a valid sys.path entry, the second to actually modify sys.path and run __main__), but that's entirely feasible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 03:04:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Mar 2017 08:04:54 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1488960294.28.0.0247587488235.issue29619@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +458 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 03:08:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Mar 2017 08:08:00 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1488960480.2.0.339030886725.issue29619@psf.upfronthosting.co.za> STINNER Victor added the comment: On Windows, _Py_attribute_data_to_stat() converts BY_HANDLE_FILE_INFORMATION to _Py_stat_struct, and then _pystat_fromstructstat() creates Python objects. The file index in BY_HANDLE_FILE_INFORMATION is made of two DWORD, so yes, it's unsigned. On Linux, stat.st_ino type is ino_t which is unsigned too. So I created a pull request to fix the bug, even if I don't think that a filesystem produce inodes larger than 2^63-1. Not sure if it's worth it to backport the fix to Python 2.7, 3.5 and 3.6? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 03:16:03 2017 From: report at bugs.python.org (=?utf-8?q?Tomas_Daba=C5=A1inskas?=) Date: Wed, 08 Mar 2017 08:16:03 +0000 Subject: [issue29754] sorted ignores reverse=True when sorting produces same list In-Reply-To: <1488951172.21.0.568731538203.issue29754@psf.upfronthosting.co.za> Message-ID: <1488960963.12.0.623844341272.issue29754@psf.upfronthosting.co.za> Tomas Daba?inskas added the comment: Thanks for taking time to review and respond Tim! (; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 03:30:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 08:30:20 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1488961820.46.0.203890950255.issue28298@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. But maybe combine PyFloat_Check+_PyLong_FromNbInt in one helper function? Could you please create a PR Oren? ---------- stage: patch review -> commit review versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 03:47:57 2017 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 08 Mar 2017 08:47:57 +0000 Subject: [issue29751] PyLong_FromString fails on decimals with leading zero and base=0 In-Reply-To: <1488922068.27.0.463542328186.issue29751@psf.upfronthosting.co.za> Message-ID: <1488962877.38.0.0215333749442.issue29751@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yes, PyLong_FromString is directly used by the implementation of int, and is also used in parsing of numeric integer literals in source: https://github.com/python/cpython/blob/cb41b2766de646435743b6af7dd152751b54e73f/Python/ast.c#L4084 So I agree that this is a documentation bug. There's also no mention of the support for underscores in the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 04:10:57 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 08 Mar 2017 09:10:57 +0000 Subject: [issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5 In-Reply-To: <1486909734.86.0.721049479861.issue29537@psf.upfronthosting.co.za> Message-ID: <1488964257.85.0.100930569361.issue29537@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +459 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 04:17:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 09:17:05 +0000 Subject: [issue28230] tarfile does not support pathlib In-Reply-To: <1476104684.24.0.949542495586.issue28230@psf.upfronthosting.co.za> Message-ID: <1488964625.76.0.227851750909.issue28230@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +460 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 04:17:48 2017 From: report at bugs.python.org (Petri Savolainen) Date: Wed, 08 Mar 2017 09:17:48 +0000 Subject: [issue29755] python3 gettext.lgettext sometimes returns bytes, not string Message-ID: <1488964668.24.0.723245092961.issue29755@psf.upfronthosting.co.za> New submission from Petri Savolainen: On Debian stable (Python 3.4), with the LANGUAGE environment variable set to "C" or "en_US.UTF-8", the following produces a string: d = gettext.textdomain('apt-listchanges') print(gettext.lgettext("Informational notes")) However, setting the language, for example fi_FI.UTF-8, it will output a bytes object. Same apparently happens with some other languages, too. Why is this? The discrepancy is not documented anywhere, AFAIK. Is this a bug or intended behavior depending on some (undocumented) circumstances? Given both the above examples define UTF-8 as the encoding, the result value does not depend directly on the encoding. The docs say lgettext should merely return the translation in a particular encoding. It does not say the return value will be switched from a string to bytes as well. I saw this originally in the Debian bug tracker and thought the issue merits at least clarification here as well (link to Debian bug below for reference). (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818728) No idea if this happens on Python > 3.4 or another platforms. I would guess so, but have not had time to confirm. ---------- messages: 289220 nosy: petri priority: normal severity: normal status: open title: python3 gettext.lgettext sometimes returns bytes, not string type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 04:19:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 09:19:47 +0000 Subject: [issue29755] python3 gettext.lgettext sometimes returns bytes, not string In-Reply-To: <1488964668.24.0.723245092961.issue29755@psf.upfronthosting.co.za> Message-ID: <1488964787.43.0.13365269134.issue29755@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Library (Lib) nosy: +loewis, serhiy.storchaka versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 04:24:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 09:24:49 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1488965089.2.0.362345536188.issue29619@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it is worth to backport this at least to 3.6. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 04:25:21 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 08 Mar 2017 09:25:21 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1488957653.18.0.52704674002.issue20087@psf.upfronthosting.co.za> Message-ID: <6fc98459-7330-cc25-af83-df7cdcc39c19@egenix.com> Marc-Andre Lemburg added the comment: On 08.03.2017 08:20, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Not all platforms use glibc 2.24 as libc. True. Many don't even use glibc. > Ideally most of entries should even not exist. We should ask libc for the default encoding if it is not included in the locale name. The aliases table should be used only for mapping commonly used but unsupported by libc locales to supported by libc locales. I think you have a wrong understanding of what this alias table is used for: we need it to determine the lib C compatible locale name without using lib C APIs such as setlocale(), since these are not thread safe and have side-effects for the whole process. The alias table is there to avoid having to go to the lib C to ask it indirectly for more details. Unfortunately, there are no cross-platform lib C APIs which would allow querying these details without also changing the local settings of the process. I know that Python still plays the usual "save current locale, run setlocale(), revert to previous locale" trick in a couple of places and this works if Python is the only thread running, but it doesn't when embedded into other applications. Regarding the patch: we cannot simply use the output from the script to set new values. The changes have to be manually reviewed as well. E.g. this entry in the table is clearly a typo: 'en_zw.utf8': 'en_ZS.UTF-8', (it should read en_ZW.UTF-8) This entry appears wrong as well: 'eo': 'eo_XX.ISO8859-3', (XX is not a valid country ISO code) How should we go about this ? Mark all the problems in the PR ? ---------- _______________________________________ Python tracker _______________________________________ From mal at egenix.com Wed Mar 8 04:25:10 2017 From: mal at egenix.com (M.-A. Lemburg) Date: Wed, 8 Mar 2017 10:25:10 +0100 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1488957653.18.0.52704674002.issue20087@psf.upfronthosting.co.za> References: <1488957653.18.0.52704674002.issue20087@psf.upfronthosting.co.za> Message-ID: <6fc98459-7330-cc25-af83-df7cdcc39c19@egenix.com> On 08.03.2017 08:20, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Not all platforms use glibc 2.24 as libc. True. Many don't even use glibc. > Ideally most of entries should even not exist. We should ask libc for the default encoding if it is not included in the locale name. The aliases table should be used only for mapping commonly used but unsupported by libc locales to supported by libc locales. I think you have a wrong understanding of what this alias table is used for: we need it to determine the lib C compatible locale name without using lib C APIs such as setlocale(), since these are not thread safe and have side-effects for the whole process. The alias table is there to avoid having to go to the lib C to ask it indirectly for more details. Unfortunately, there are no cross-platform lib C APIs which would allow querying these details without also changing the local settings of the process. I know that Python still plays the usual "save current locale, run setlocale(), revert to previous locale" trick in a couple of places and this works if Python is the only thread running, but it doesn't when embedded into other applications. Regarding the patch: we cannot simply use the output from the script to set new values. The changes have to be manually reviewed as well. E.g. this entry in the table is clearly a typo: 'en_zw.utf8': 'en_ZS.UTF-8', (it should read en_ZW.UTF-8) This entry appears wrong as well: 'eo': 'eo_XX.ISO8859-3', (XX is not a valid country ISO code) How should we go about this ? Mark all the problems in the PR ? -- Marc-Andre Lemburg eGenix.com From report at bugs.python.org Wed Mar 8 04:37:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 09:37:13 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1488965833.38.0.884643757854.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The problem is that that table can get incorrect result for non-Linux platforms (or for Linux with old glibc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 04:50:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 09:50:01 +0000 Subject: [issue10408] Denser dicts and linear probing In-Reply-To: <1289659692.61.0.467153013048.issue10408@psf.upfronthosting.co.za> Message-ID: <1488966601.61.0.495949178651.issue10408@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think this issue is outdated. Liner probing doesn't make much sense for current dict implementation. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 05:05:44 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 08 Mar 2017 10:05:44 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488967544.86.0.538004959963.issue29741@psf.upfronthosting.co.za> Oren Milman added the comment: I wrote a patch, but I attach it here and not in a PR, as you haven't approved adding tests. (I would be happy to open a PR with or without the tests.) I ran the test module (on my Windows 10), and seems like the patch doesn't break anything. also, while running test_memoryio with my added tests, i noticed some places in Lib/_pyio.py which seemed like they should be changed. in particular, I changed 'var.__index__' to 'var = var.__index__()' in some places. I feel really uncomfortable about that change, as it undos a change committed by Florent Xicluna in b14930cd93e74cae3b7370262c6dcc7c28e0e712. Florent, what was the reason for that change? ---------- keywords: +patch nosy: +flox Added file: http://bugs.python.org/file46709/patchDraft1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 05:24:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 10:24:53 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488968693.22.0.156858733377.issue29741@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- nosy: +stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 05:31:34 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 08 Mar 2017 10:31:34 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488969094.57.0.211062839319.issue29741@psf.upfronthosting.co.za> Oren Milman added the comment: should I open a PR (even though we didn't give Florent enough time to respond)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 05:37:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 10:37:35 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488969455.68.0.909274051766.issue29741@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Open a PR. It will be not hard to make small changes after opening it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 05:40:16 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 08 Mar 2017 10:40:16 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488969616.64.0.950654851311.issue29741@psf.upfronthosting.co.za> Oren Milman added the comment: sure. In general, should drafts (like this one) be uploaded here? or is it always better to open a PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 05:58:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 10:58:53 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488970733.18.0.136745264436.issue29741@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This for your preference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 06:35:17 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 08 Mar 2017 11:35:17 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1488954426.02.0.680922295249.issue20087@psf.upfronthosting.co.za> Message-ID: <7e06c1a7-9478-185d-f2d6-bfa4ad2eba14@egenix.com> Marc-Andre Lemburg added the comment: On 08.03.2017 07:27, Benjamin Peterson wrote: > > Why is the X11 locale alias map used at all? It seems like it can only create confusion with libc. Because it was the only such maintained mapping available at the time. It's also used for the X.org system, which has a rather strong focus on user interfaces where locale matter a lot, unlike the lib C :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 06:48:32 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 08 Mar 2017 11:48:32 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1488965833.38.0.884643757854.issue20087@psf.upfronthosting.co.za> Message-ID: <18b34ed3-2b70-32bf-90be-b7f2fef6d950@egenix.com> Marc-Andre Lemburg added the comment: On 08.03.2017 10:37, Serhiy Storchaka wrote: > > The problem is that that table can get incorrect result for non-Linux platforms (or for Linux with old glibc). Sure, it's a best effort approach. Also note that on today's systems you often don't have the full set of locales available anymore - instead these have to either be installed separately or generated on the target system. Our locale database works on all these system, regardless of what's installed or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 07:35:47 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 08 Mar 2017 12:35:47 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1488976547.05.0.916841462468.issue29741@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +461 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 07:39:31 2017 From: report at bugs.python.org (=?utf-8?q?Vin=C3=ADcius_Dantas?=) Date: Wed, 08 Mar 2017 12:39:31 +0000 Subject: [issue29747] unittest - assertDoesNotRaise In-Reply-To: <1488901638.42.0.23684671666.issue29747@psf.upfronthosting.co.za> Message-ID: Vin?cius Dantas added the comment: As a last argument: It is a matter of coherence/consistency with unittest's API, given that this module does differentiates errors from failures ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 07:50:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 12:50:37 +0000 Subject: [issue28231] zipfile does not support pathlib In-Reply-To: <1474445503.11.0.219964117103.issue28231@psf.upfronthosting.co.za> Message-ID: <1488977437.96.0.245525778747.issue28231@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +462 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 08:02:58 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 08 Mar 2017 13:02:58 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1488978178.51.0.0445520491657.issue28298@psf.upfronthosting.co.za> Oren Milman added the comment: yes and yes. I would start with a PR for 3.7. and thanks for the review :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 09:03:53 2017 From: report at bugs.python.org (Alexander Todorov) Date: Wed, 08 Mar 2017 14:03:53 +0000 Subject: [issue29756] List count() counts True as 1 Message-ID: <1488981833.28.0.455455965624.issue29756@psf.upfronthosting.co.za> New submission from Alexander Todorov: When using list.count() I get the following results >>> [1, 2, 3].count(1) 1 >>> [1, 2, 3, True].count(2) 1 >>> [1, 2, 3, True].count(True) 2 >>> [1, 2, 3, True].count(1) 2 as you can see True is considered the same as 1. The documentation for the count method says: count(...) L.count(value) -> integer -- return number of occurrences of value so IMO the above behavior is wrong. Seeing this on a RHEL 7 system with Python 3.5.1 and 2.7.5 ---------- messages: 289235 nosy: Alexander Todorov priority: normal severity: normal status: open title: List count() counts True as 1 versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 09:06:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 14:06:01 +0000 Subject: [issue28231] zipfile does not support pathlib In-Reply-To: <1474445503.11.0.219964117103.issue28231@psf.upfronthosting.co.za> Message-ID: <1488981961.1.0.288016776513.issue28231@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 09:29:18 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 08 Mar 2017 14:29:18 +0000 Subject: [issue29756] List count() counts True as 1 In-Reply-To: <1488981833.28.0.455455965624.issue29756@psf.upfronthosting.co.za> Message-ID: <1488983358.64.0.390272249425.issue29756@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: bools are subclasses of int and False and True have integer equivalents: https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values ---------- nosy: +barry resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 09:37:18 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 08 Mar 2017 14:37:18 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1488983838.86.0.294259772165.issue29723@psf.upfronthosting.co.za> Steve Dower added the comment: > C:\Temp doesn't belong in sys.path in this case Hang on, why not? If I were running a module.py then it would be, so why is a package\__main__.py different (and not able to import itself or its siblings)? The package is the "script" being run here, yes? Or is __main__.py different from __init__.py in this regard? (That is, it isn't *part* of the package, it's just a loose script that happens to inherit the name of its directory) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 09:45:17 2017 From: report at bugs.python.org (Kostis Anagnostopoulos) Date: Wed, 08 Mar 2017 14:45:17 +0000 Subject: [issue29757] The loop in utility `socket.create_connection()` swallows previous errors Message-ID: <1488984317.87.0.296010902983.issue29757@psf.upfronthosting.co.za> New submission from Kostis Anagnostopoulos: ## Context The utility method `socket.create_connection()` currently works like that: 1. resolve the destination-address into one or more IP(v4 & v6) addresses; 2. loop on each IP address and stop to the 1st one to work; 3. if none works, re-raise the last error. ## The problem So currently the loop in `socket.create_connection()` ignores all intermediate errors and reports only the last connection failure, which might be irrelevant. For instance, when both IPv4 & IPv6 networks are supported, usually the last address is a IPv6 address and it frequently fails with an irrelevant error - the actual cause have already been ignored. ## Possible solutions & open questions To facilitate network debugging, there are at least 3 options: a. log each failure [as they happen](/python/cpython/blob/6f0eb93183519024cb360162bdd81b9faec97ba6/Lib/socket.py#L717), but that would get the final failure twice: once as a (warning?) message, and once as an exception . b. collect all failures and log them only when connection fails to collect the errors, but that might miss important infos to the user; c. collect and return all failures in list attached to the raised exception. A question for cases (a) & (b) is what logging "means" to use: the `warnings` or `logging` module? And if `logging` is chosen, log them in `'DEBUG'` or `'WARNING'` level? Case (c) sidesteps the above questions. ---------- components: Library (Lib) messages: 289238 nosy: ankostis priority: normal pull_requests: 463 severity: normal status: open title: The loop in utility `socket.create_connection()` swallows previous errors versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 10:01:57 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 08 Mar 2017 15:01:57 +0000 Subject: [issue29756] Improve documentation for list methods that compare items by equality In-Reply-To: <1488981833.28.0.455455965624.issue29756@psf.upfronthosting.co.za> Message-ID: <1488985317.79.0.112661931752.issue29756@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Further to Barry's explanation, you see the same result with any values which compare equal: py> from decimal import Decimal as D py> [1, 1.0, D(1), True, 1+0j].count(D(1)) 5 This is standard behaviour for methods `count`, `remove`, and `index`, but it isn't explained well in the documentation. E.g. `remove` says "Remove the first item from the list whose value is x` which could be read as meaning that the test is done by identity. All three methods need to clarify that ordinary == equality is used. I'm going to re-open the task as a documentation issue. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, steven.daprano resolution: not a bug -> stage: resolved -> status: closed -> open title: List count() counts True as 1 -> Improve documentation for list methods that compare items by equality type: -> enhancement versions: -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 10:10:15 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 08 Mar 2017 15:10:15 +0000 Subject: [issue29756] Improve documentation for list methods that compare items by equality In-Reply-To: <1488981833.28.0.455455965624.issue29756@psf.upfronthosting.co.za> Message-ID: <1488985815.96.0.74650153271.issue29756@psf.upfronthosting.co.za> Steven D'Aprano added the comment: To be clear, I'm referring to the docs in the tutorial: https://docs.python.org/3.7/tutorial/datastructures.html and the docstrings as well as the library reference: https://docs.python.org/3.7/library/stdtypes.html#sequence-types-list-tuple-range The library reference already notes that `remove` uses equality, but the others do not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 10:20:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 15:20:37 +0000 Subject: [issue29645] webbrowser module import has heavy side effects In-Reply-To: <1488014818.45.0.347439137836.issue29645@psf.upfronthosting.co.za> Message-ID: <1488986437.74.0.172377898175.issue29645@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 10:24:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 15:24:23 +0000 Subject: [issue28682] Bytes support in os.fwalk() In-Reply-To: <1479029050.5.0.426622691368.issue28682@psf.upfronthosting.co.za> Message-ID: <1488986663.76.0.24792931769.issue28682@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 10:31:21 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 08 Mar 2017 15:31:21 +0000 Subject: [issue29752] Enum._missing_ not called for __getattr__ failures In-Reply-To: <1488925792.17.0.971645599389.issue29752@psf.upfronthosting.co.za> Message-ID: <1488987081.46.0.920819335458.issue29752@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Could that perhaps be intentional? Attribute access seems like something where the developer would be explicitly naming a single, hard coded, canonical name for the type, while string construction seems like something where you're getting a string from "somewhere" (user input, which is always terrible) and you'd want to have a way to handle invalid input. The documentation is so sparse as to be useless for determining intent: _missing_ ? a lookup function used when a value is not found; may be overridden I wouldn't view Label.redapple as an attempt to "find" anything, it's just simple attribute access. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 10:33:41 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 08 Mar 2017 15:33:41 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1488987221.7.0.729902521266.issue20087@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Why was the PR merged while we were still discussing it ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 10:35:23 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 08 Mar 2017 15:35:23 +0000 Subject: [issue29756] Improve documentation for list methods that compare items by equality In-Reply-To: <1488981833.28.0.455455965624.issue29756@psf.upfronthosting.co.za> Message-ID: <1488987323.45.0.697958840526.issue29756@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Steven: Technically, in CPython, they use both identity and equality testing, as a function of using RichCompareBool (which tests identity first, then equality), rather than RichCompare (which only tests equality). It makes a difference for stuff like NaN values, where describing it as equality only would imply that: nan = float('nan') ([nan] * 10).count(nan) produces 0 (because nan is equal to nothing, including itself), when in fact it produces 10 (because we reused the same nan object, and the identity test passed). ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 11:21:47 2017 From: report at bugs.python.org (Bartek Biernacki) Date: Wed, 08 Mar 2017 16:21:47 +0000 Subject: [issue26259] Memleak when repeated calls to asyncio.queue.Queue.get is performed, without push to queue. In-Reply-To: <1454342780.58.0.210365622359.issue26259@psf.upfronthosting.co.za> Message-ID: <1488990107.27.0.310146229177.issue26259@psf.upfronthosting.co.za> Bartek Biernacki added the comment: I ran into similar problem with many getters timing out and staying in memory until some put is called. I think this may be solved by using a callback on Future which would clean it if it was cancelled. I am presenting the idea on attached poc. If you think that this is a good idea I can provide a patch. ---------- nosy: +Bartek Biernacki Added file: http://bugs.python.org/file46710/poc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 11:22:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Mar 2017 16:22:53 +0000 Subject: [issue26259] Memleak when repeated calls to asyncio.queue.Queue.get is performed, without push to queue. In-Reply-To: <1454342780.58.0.210365622359.issue26259@psf.upfronthosting.co.za> Message-ID: <1488990173.15.0.978746093093.issue26259@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 11:47:30 2017 From: report at bugs.python.org (Tristan Croll) Date: Wed, 08 Mar 2017 16:47:30 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 Message-ID: <1488991650.0.0.826679402246.issue29758@psf.upfronthosting.co.za> New submission from Tristan Croll: Possibly related to http://bugs.python.org/issue29327 - yields the same error message: Objects/tupleobject.c:81: bad argument to internal function I have a large SWIG project which was previously working well in Python 3.5. After migrating to Python 3.6.0, I find I can still create any wrapped object from Python via its constructor(s), but any internal function that returns certain objects fails with the above message. I have so far been unable to find any distinction between classes that do and don't return successfully. Take the below (and attached) headers, for example. Functions that return Spacegroup objects work, as do those that return Metric_tensor objects from the attached cell.h. On the other hand, functions returning Cell or Cell_descr objects fail with the above message. Yet in all cases I can successfully call the objects' constructors. Not ashamed to say I'm a bit lost here. #ifndef CLIPPER_SPACEGROUP #define CLIPPER_SPACEGROUP #include "symop.h" #include "spacegroup_data.h" namespace clipper { // forward definitions class HKL; class HKL_class; class Coord_frac; //! spacegroup description /*! The spacegroup description is a compact description of a spacegroup. It may be initialised from Hall or H-M symbols, a string of symops or a number. Internally a hash code is used to refer to the spacegroup, so this object is only 32 bits in size. For more details of spacegroup symbols, see Sydney R. Hall & Ralf W. Grosse-Kunstleve 'Concise Space-Group Symbols', http://www.kristall.ethz.ch/LFK/software/sginfo/hall_symbols.html */ class Spgr_descr { public: enum TYPE { Hall, HM, XHM, Symops, Number, Unknown }; //! null constructor Spgr_descr(); //! constructor: from symbol or operators. explicit Spgr_descr( const String& symb, TYPE type = Unknown ); //! constructor: from number. explicit Spgr_descr( const int& num ); //! return the spacegroup number int spacegroup_number() const; //! return the Hall symbol String symbol_hall() const; //! return the H-M symbol String symbol_hm() const; //! return the extended H-M symbol String symbol_xhm() const; //! return the extension H-M symbol String symbol_hm_ext() const; //! set preferred default spacegroup choice static void set_preferred( const char& c ); //! Vector of symop codes and associated methods class Symop_codes : public std::vector { public: //! initialise from Hall symbol void init_hall( const String& symb ); //! initialise from symops void init_symops( const String& symb ); //! expand (incomplete) list of symops Symop_codes expand() const; //! return primitive non-inversion ops (by computation) Symop_codes primitive_noninversion_ops() const; //! return inversion ops (by computation) Symop_codes inversion_ops() const; //! return primitive incl inversion ops (by computation) Symop_codes primitive_ops() const; //! return lattice centering ops (by computation) Symop_codes centering_ops() const; //! return Laue ops Symop_codes laue_ops() const; //! return point group ops Symop_codes pgrp_ops() const; //! return Patterson ops Symop_codes patterson_ops() const; //! return minimal list of generator ops Symop_codes generator_ops() const; //! return product of this (expanded) list by another (expanded) list Symop_codes product( const Symop_codes& ops2 ) const; //! return hash code of symop list unsigned int hash() const; }; //! constructor: from symop list. explicit Spgr_descr( const Symop_codes& ops ); //! return the generators for the spacegroup const Symop_codes& generator_ops() const { return generators_; } //! return the hash code for the spacegroup \internal const unsigned int& hash() const { return hash_; } protected: unsigned int hash_; //!< hash code of spacegroup Symop_codes generators_; //!< codes for symop generators static char pref_12, pref_hr; //!< preferred origin and hex/romb symbols }; // ObjectCache data type class Spgr_cacheobj { public: typedef Spgr_descr Key; Spgr_cacheobj( const Key& spgr_cachekey ); //!< construct entry bool matches( const Key& spgr_cachekey ) const; //!< compare entry String format() const; //!< string description // data Key spgr_cachekey_; //!< spacegroup cachekey int nsym, nsymn, nsymi, nsymc, nsymp; //!< number of syms: total, primitive int lgrp; //!< Laue group number std::vector symops; //!< symmetry operators std::vector isymops; //!< symmetry operators Vec3<> asu_min_, asu_max_; //!< real space ASU static Mutex mutex; //!< thread safety }; //! Spacegroup object /*! The spacegroup object is a full description of a spacegroup, including all the most regularly used information in an efficient form. It may be initialised from a clipper::Spgr_descr. This object. For more details of spacegroup symbols, see Sydney R. Hall & Ralf W. Grosse-Kunstleve 'Concise Space-Group Symbols', http://www.kristall.ethz.ch/LFK/software/sginfo/hall_symbols.html */ class Spacegroup : public Spgr_descr { public: //! enumeration for fast construction of Null or P1 spacegroup enum TYPE { Null, P1 }; //! enumeration for cell axes enum AXIS { A=0, B=1, C=2 }; //! null constructor Spacegroup() {}; //! constructor: fast constructor for Null or P1 spacegroup explicit Spacegroup( TYPE type ); //! constructor: from spacegroup description explicit Spacegroup( const Spgr_descr& spgr_descr ); //! initialiser: from spacegroup description void init( const Spgr_descr& spgr_descr ); //! test if object has been initialised bool is_null() const; // methods //! get spacegroup description inline const Spgr_descr& descr() const { return (*this); } //! get number of symops inline const int& num_symops() const { return nsym; } //! get number of primitive symops (identical to num_primitive_symops()) inline const int& num_primops() const { return num_primitive_symops(); } //! get number of primitive symops (inc identity and inversion) inline const int& num_primitive_symops() const { return nsymp; } //! get number of centering symops (inc identity) inline const int& num_centering_symops() const { return nsymc; } //! get number of inversion symops (inc identity) inline const int& num_inversion_symops() const { return nsymi; } //! get number of primitive non-inversion symops (inc identity) inline const int& num_primitive_noninversion_symops() const { return nsymn;} //! get n'th symop inline const Symop& symop( const int& sym_no ) const { return symops[sym_no]; } //! get n'th primitive symop (identical to symop(sym_no)) inline const Symop& primitive_symop( const int& sym_no ) const { return symops[sym_no]; } //! get n'th inversion symop (0...1 max) inline const Symop& inversion_symop( const int& sym_no ) const { return symops[nsymn*sym_no]; } //! get n'th centering symop (0...3 max) inline const Symop& centering_symop( const int& sym_no ) const { return symops[nsymp*sym_no]; } //! get the order of rotational symmetry about a given axis int order_of_symmetry_about_axis( const AXIS axis ) const; //! get 'class' of reflection: multiplicity, allowed phase, absence HKL_class hkl_class( const HKL& hkl ) const; //! test if hkl is in default reciprocal ASU bool recip_asu( const HKL& hkl ) const; //! get symop number corresponding to the product of two symops int product_op( const int& s1, int& s2 ) const; //! get symop number corresponding to the inverse of a symop int inverse_op( const int& s ) const; //! get map ASU, upper bound Coord_frac asu_max() const; //! get map ASU, lower bound Coord_frac asu_min() const; //! test if change of hand preserves spacegroup bool invariant_under_change_of_hand() const; // inherited functions listed for documentation purposes //-- int spacegroup_number() const; //-- String symbol_hall() const; //-- String symbol_hm() const; //! return the Laue group symbol String symbol_laue() const; //! Return P1 spacegroup static Spacegroup p1() { return Spacegroup( P1 ); } //! Return null spacegroup static Spacegroup null() { return Spacegroup( Null ); } void debug() const; private: ObjectCache::Reference cacheref; //!< object cache reference const Symop* symops; //!< fast access ptr const Isymop* isymops; //!< fast access ptr data::ASUfn asufn; //!< fast access ptr int nsym, nsymn, nsymi, nsymc, nsymp; //!< fast access copies }; } // namespace clipper #endif ---------- components: Interpreter Core files: cell.h messages: 289245 nosy: Tristan Croll priority: normal severity: normal status: open title: Previously-working SWIG code fails in Python 3.6 versions: Python 3.6 Added file: http://bugs.python.org/file46711/cell.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 11:51:10 2017 From: report at bugs.python.org (svelankar) Date: Wed, 08 Mar 2017 16:51:10 +0000 Subject: [issue29749] Outdated int() docstring In-Reply-To: <1488894289.51.0.465519491821.issue29749@psf.upfronthosting.co.za> Message-ID: <1488991870.86.0.544095427704.issue29749@psf.upfronthosting.co.za> svelankar added the comment: int docstring is the only one that needs to be changed. docstrings for float,tuple and list look fine to me. ---------- nosy: +svelankar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 12:04:34 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 08 Mar 2017 17:04:34 +0000 Subject: [issue26259] Memleak when repeated calls to asyncio.queue.Queue.get is performed, without push to queue. In-Reply-To: <1454342780.58.0.210365622359.issue26259@psf.upfronthosting.co.za> Message-ID: <1488992674.01.0.341913548913.issue26259@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 12:31:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 17:31:31 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1488994291.2.0.606346258952.issue28810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 12:50:46 2017 From: report at bugs.python.org (Michael) Date: Wed, 08 Mar 2017 17:50:46 +0000 Subject: [issue29759] Deadlock in multiprocessing.pool.Pool on terminate Message-ID: <1488995446.21.0.189589252767.issue29759@psf.upfronthosting.co.za> New submission from Michael: Following code snippet causes a deadlock on Linux: """ import multiprocessing.pool import signal def signal_handler(signum, frame): pass if __name__ == '__main__': signal.signal(signal.SIGTERM, signal_handler) pool = multiprocessing.pool.Pool(processes=1) pool.terminate() # alternatively - raise Exception("EXCEPTION") """ The reason is that the termination code starts before the worker processes being fully initialized. Here, parent process acquires a forever-lock: """ @staticmethod def _help_stuff_finish(inqueue, task_handler, size): # task_handler may be blocked trying to put items on inqueue util.debug('removing tasks from inqueue until task handler finished') inqueue._rlock.acquire() < ----------------- while task_handler.is_alive() and inqueue._reader.poll(): inqueue._reader.recv() time.sleep(0) """ And then the worker processes are getting stuck here: """ def worker(...): while maxtasks is None or (maxtasks and completed < maxtasks): try: task = get() < ----------------- trying to acquire the same lock except (EOFError, OSError): util.debug('worker got EOFError or OSError -- exiting') break """ Whats going on then? As far as the default process start method is set to 'fork', worker subprocesses inherit parent's signal handler. Trying to terminate workers from _terminate_pool() doesn't have any effect. Finally, processes enter into a deadlock when parent join()-s workers. ---------- components: Library (Lib) messages: 289248 nosy: mapozyan priority: normal severity: normal status: open title: Deadlock in multiprocessing.pool.Pool on terminate versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 13:01:21 2017 From: report at bugs.python.org (Roundup Robot) Date: Wed, 08 Mar 2017 18:01:21 +0000 Subject: [issue29749] Outdated int() docstring In-Reply-To: <1488894289.51.0.465519491821.issue29749@psf.upfronthosting.co.za> Message-ID: <1488996081.37.0.129702176897.issue29749@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +464 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 13:17:17 2017 From: report at bugs.python.org (Michael) Date: Wed, 08 Mar 2017 18:17:17 +0000 Subject: [issue29759] Deadlock in multiprocessing.pool.Pool on terminate In-Reply-To: <1488995446.21.0.189589252767.issue29759@psf.upfronthosting.co.za> Message-ID: <1488997037.84.0.451875943281.issue29759@psf.upfronthosting.co.za> Michael added the comment: This patch kind of solves the issue. Not a nice one, but perhaps the safest one. https://github.com/michael-a-cliqz/cpython/commit/1536c8c8cfc5a87ad4ab84d1248cb50fefe166ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 13:19:47 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 08 Mar 2017 18:19:47 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1488997187.41.0.972573730736.issue28810@psf.upfronthosting.co.za> Brett Cannon added the comment: If the "ping" is for me, I spent my open source day last week reviewing the dependency for this issue (and other stuff) so I plan to get to this PR this Friday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 13:20:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 18:20:26 +0000 Subject: [issue29749] Outdated int() docstring In-Reply-To: <1488894289.51.0.465519491821.issue29749@psf.upfronthosting.co.za> Message-ID: <1488997226.7.0.677439252868.issue29749@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: int() can be called without argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 13:33:31 2017 From: report at bugs.python.org (svelankar) Date: Wed, 08 Mar 2017 18:33:31 +0000 Subject: [issue29749] Outdated int() docstring In-Reply-To: <1488894289.51.0.465519491821.issue29749@psf.upfronthosting.co.za> Message-ID: <1488998011.35.0.684153972885.issue29749@psf.upfronthosting.co.za> svelankar added the comment: True, but the docstring says "return 0 if no arguments are given". So please let me know, if you want me to still change it i.e. add int() or keep it as it is. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 14:03:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 19:03:48 +0000 Subject: [issue29749] Outdated int() docstring In-Reply-To: <1488894289.51.0.465519491821.issue29749@psf.upfronthosting.co.za> Message-ID: <1488999828.81.0.561358019847.issue29749@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 14:32:10 2017 From: report at bugs.python.org (Matt Bogosian) Date: Wed, 08 Mar 2017 19:32:10 +0000 Subject: [issue29760] tarfile chokes on reading .tar file with no entries (but does fine if the same file is bzip2'ed) Message-ID: <1489001529.94.0.345849682069.issue29760@psf.upfronthosting.co.za> New submission from Matt Bogosian: It looks like there's a problem examining ``.tar`` files with no entries: ``` $ # ================================================================== $ # Extract test cases (attached to this bug report) $ tar xpvf tarfail.tar.bz2 x tarfail/ x tarfail/tarfail.py x tarfail/test.tar x tarfail/test.tar.bz2 $ cd tarfail $ # ================================================================== $ # Note that test.tar.bz2 is just test.tar, but bzip2'ed: $ bzip2 -c test.tar | openssl dgst -sha256 ; openssl dgst -sha256 test.tar.bz2 f4fad25a0e7a451ed906b76846efd6d2699a65b40795b29553addc35bf9a75c8 SHA256(test.tar.bz2)= f4fad25a0e7a451ed906b76846efd6d2699a65b40795b29553addc35bf9a75c8 $ wc -c test.tar* # these are not empty files 10240 test.tar 46 test.tar.bz2 10286 total $ tar tpvf test.tar # no entries $ tar tpvf test.tar.bz2 # no entries $ # ================================================================== $ # test.tar.bz2 works, but test.tar causes problems (tested in 2.7, $ # 3.5, and 3.6): $ python2.7 tarfail.py opening /?/tarfail/test.tar.bz2 opening /?/tarfail/test.tar E ====================================================================== ERROR: test_next (__main__.TestTarFileNext) ---------------------------------------------------------------------- Traceback (most recent call last): File "tarfail.py", line 29, in test_next next_info = tar_file.next() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2350, in next self.fileobj.seek(self.offset - 1) IOError: [Errno 22] Invalid argument ---------------------------------------------------------------------- Ran 1 test in 0.005s FAILED (errors=1) $ python3.5 tarfail.py opening /?/tarfail/test.tar.bz2 opening /?/tarfail/test.tar E ====================================================================== ERROR: test_next (__main__.TestTarFileNext) ---------------------------------------------------------------------- Traceback (most recent call last): File "tarfail.py", line 29, in test_next next_info = tar_file.next() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tarfile.py", line 2273, in next self.fileobj.seek(self.offset - 1) OSError: [Errno 22] Invalid argument ---------------------------------------------------------------------- Ran 1 test in 0.066s FAILED (errors=1) $ python3.6 tarfail.py opening /?/tarfail/test.tar.bz2 opening /?/tarfail/test.tar E ====================================================================== ERROR: test_next (__main__.TestTarFileNext) ---------------------------------------------------------------------- Traceback (most recent call last): File "tarfail.py", line 29, in test_next next_info = tar_file.next() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tarfile.py", line 2279, in next self.fileobj.seek(self.offset - 1) OSError: [Errno 22] Invalid argument ---------------------------------------------------------------------- Ran 1 test in 0.090s FAILED (errors=1) ``` Here's the issue (as far as I can tell): ``` $ ipdb tarfail.py > /?/tarfail/tarfail.py(3)() 2 ----> 3 from __future__ import ( 4 absolute_import, division, print_function, unicode_literals, ipdb> b /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py:2350 Breakpoint 1 at /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py:2350 ipdb> c opening /?/tarfail/test.tar.bz2 > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py(2350)next() 2349 if self.offset != self.fileobj.tell(): 1> 2350 self.fileobj.seek(self.offset - 1) 2351 if not self.fileobj.read(1): ipdb> self.fileobj ipdb> self.offset, self.fileobj.tell(), self.offset - 1 (0, 512, -1) ipdb> c opening /?/tarfail/test.tar > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py(2350)next() 2349 if self.offset != self.fileobj.tell(): 1> 2350 self.fileobj.seek(self.offset - 1) 2351 if not self.fileobj.read(1): ipdb> self.fileobj ipdb> self.offset, self.fileobj.tell(), self.offset - 1 (0, 512, -1) ipdb> c E ====================================================================== ERROR: test_next (__main__.TestTarFileNext) ---------------------------------------------------------------------- Traceback (most recent call last): File "tarfail.py", line 29, in test_next next_info = tar_file.next() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2350, in next self.fileobj.seek(self.offset - 1) IOError: [Errno 22] Invalid argument ---------------------------------------------------------------------- Ran 1 test in 38.300s FAILED (errors=1) The program exited via sys.exit(). Exit status: True > /?/tarfail/tarfail.py(3)() 2 ----> 3 from __future__ import ( 4 absolute_import, division, print_function, unicode_literals, ipdb> EOF ``` Apparently, ``bz2.BZ2File`` allows seeking to pre-0 (negative) values, whereas more primitive files are not so forgiving. The offending line looks like it can be traced back to this commit: https://github.com/python/cpython/blame/2.7/Lib/tarfile.py#L2350 https://github.com/python/cpython/blame/3.3/Lib/tarfile.py#L2252 https://github.com/python/cpython/blame/3.4/Lib/tarfile.py#L2252 https://github.com/python/cpython/blame/3.5/Lib/tarfile.py#L2273 https://github.com/python/cpython/blame/3.6/Lib/tarfile.py#L2286 (My apologies for not catching this sooner.) ---------- components: Library (Lib) files: tarfail.tar.bz2 messages: 289253 nosy: posita priority: normal severity: normal status: open title: tarfile chokes on reading .tar file with no entries (but does fine if the same file is bzip2'ed) type: crash versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file46712/tarfail.tar.bz2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 14:53:54 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 08 Mar 2017 19:53:54 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489002834.52.0.954692800291.issue29723@psf.upfronthosting.co.za> Eryk Sun added the comment: main361 can be run as a package from the current directory via -m because an empty string is in sys.path, i.e. the current directory. It imports the package, executing __init__.py and then __main__.py. In this case, the main361 directory/zip import source is not added to sys.path. When we run main361 as a script, the main361 package is not imported, i.e. __init__.py is not executed. The siblings of the __main__.py script are in the main361 directory (or zip file). Effectively this is the script directory, and it does belong in sys.path -- even in isolated mode because we trust the directory or zip file that contains __main__.py. A potential problem, however, is that we don't ensure the __main__ import source is added as an absolute path. So if the script changes the working directory, then it loses this import source and possibly (unlikely) gains a new import source if the relative path exists relative to the new working directory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 15:17:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 20:17:47 +0000 Subject: [issue29749] Outdated int() docstring In-Reply-To: <1488894289.51.0.465519491821.issue29749@psf.upfronthosting.co.za> Message-ID: <1489004267.37.0.14421542042.issue29749@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: After converting int.__new__() to Argument Clinic this issue will become outdated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 15:47:17 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 08 Mar 2017 20:47:17 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1489006037.06.0.556511958346.issue28810@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: It looks like there are still few things that are not covered in two open PRs. I will add these in an additional PR in the next few days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 16:08:17 2017 From: report at bugs.python.org (Jorge Cisneros) Date: Wed, 08 Mar 2017 21:08:17 +0000 Subject: [issue29761] Wrong size of c_ulong in linux, windows version is fine Message-ID: <1489007297.65.0.421023863942.issue29761@psf.upfronthosting.co.za> New submission from Jorge Cisneros: In the linux version 2.7.12 the size of c_ulong and c_ulonglong is the same, that is not correct Python 2.7.12 (default, Mar 6 2017, 18:06:04) [GCC 4.9.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import * >>> print sizeof(c_ulong),sizeof(c_ulonglong) 8 8 Doing the same in Windows, the results are correct. Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from ctypes import * >>> print sizeof(c_ulong),sizeof(c_ulonglong) 4 8 >>> ---------- components: ctypes messages: 289257 nosy: Jorge Cisneros priority: normal severity: normal status: open title: Wrong size of c_ulong in linux, windows version is fine type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 16:14:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 21:14:36 +0000 Subject: [issue29762] Use "raise from None" Message-ID: <1489007676.29.0.138385616596.issue29762@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Sometimes after catching some exception the new exception of more appropriate type and with more appropriate message is raised. The initial exception often is not relevant to the final exception, it is raised only due to using EAFP rather than LBYL. It should be excluded from the traceback by using "raise from None". This idiom is often used. Following PR makes it be used in more cases. ---------- components: Library (Lib) messages: 289258 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use "raise from None" type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 16:19:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Mar 2017 21:19:15 +0000 Subject: [issue29762] Use "raise from None" In-Reply-To: <1489007676.29.0.138385616596.issue29762@psf.upfronthosting.co.za> Message-ID: <1489007955.51.0.802258649128.issue29762@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +465 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 16:19:38 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 08 Mar 2017 21:19:38 +0000 Subject: [issue29761] Wrong size of c_ulong in linux, windows version is fine In-Reply-To: <1489007297.65.0.421023863942.issue29761@psf.upfronthosting.co.za> Message-ID: <1489007978.12.0.387403585021.issue29761@psf.upfronthosting.co.za> Eryk Sun added the comment: ctypes is correct. 64-bit Linux uses an LP64 data model, and 64-bit Windows uses LLP64. https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_models ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 16:39:39 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 08 Mar 2017 21:39:39 +0000 Subject: [issue29763] test_site failing on AppVeyor Message-ID: <1489009179.7.0.320606146583.issue29763@psf.upfronthosting.co.za> New submission from Brett Cannon: E.g. https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.142. This looks to be the last consistent failure on AppVeyor. ---------- components: Windows messages: 289260 nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_site failing on AppVeyor versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 18:40:59 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 08 Mar 2017 23:40:59 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1489016459.9.0.484511615715.issue28298@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +466 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 19:08:28 2017 From: report at bugs.python.org (Michael) Date: Thu, 09 Mar 2017 00:08:28 +0000 Subject: [issue29759] Deadlock in multiprocessing.pool.Pool on terminate In-Reply-To: <1488995446.21.0.189589252767.issue29759@psf.upfronthosting.co.za> Message-ID: <1489018108.06.0.0323798693548.issue29759@psf.upfronthosting.co.za> Changes by Michael : ---------- type: -> behavior versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 19:29:32 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 09 Mar 2017 00:29:32 +0000 Subject: [issue29749] Outdated int() docstring In-Reply-To: <1488894289.51.0.465519491821.issue29749@psf.upfronthosting.co.za> Message-ID: <1489019372.26.0.0651643717142.issue29749@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 19:46:30 2017 From: report at bugs.python.org (Alexey Trenikhin) Date: Thu, 09 Mar 2017 00:46:30 +0000 Subject: [issue29764] PyUnicode_Decode with encoding utf8 crashes Message-ID: <1489020390.12.0.948063239633.issue29764@psf.upfronthosting.co.za> New submission from Alexey Trenikhin: #include int main(){ PyUnicode_Decode("abcdef", 4, "utf_8", "ignore"); return 0; } crashes on linux and Windows (but works fine with encoding "utf-8" ) ---------- components: Unicode files: test.c messages: 289261 nosy: Alexey Trenikhin, ezio.melotti, haypo priority: normal severity: normal status: open title: PyUnicode_Decode with encoding utf8 crashes type: crash versions: Python 2.7 Added file: http://bugs.python.org/file46713/test.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 20:00:20 2017 From: report at bugs.python.org (ada) Date: Thu, 09 Mar 2017 01:00:20 +0000 Subject: [issue29765] 2.7.12 compile error from ssl related Message-ID: <1489021220.48.0.868281972312.issue29765@psf.upfronthosting.co.za> New submission from ada: Download the python version 2.7.12 source code from official web site. Compile the python code by the following steps: sudo ./configure sudo make sudo make install but from make, I get the following errors: /Modules/_ssl.c: In function ?_create_tuple_for_X509_NAME?: ./Modules/_ssl.c:684: error: dereferencing pointer to incomplete type ./Modules/_ssl.c:701: error: dereferencing pointer to incomplete type ./Modules/_ssl.c: In function ?_get_peer_alt_names?: ./Modules/_ssl.c:804: error: dereferencing pointer to incomplete type ./Modules/_ssl.c:809: error: dereferencing pointer to incomplete type ./Modules/_ssl.c:815: error: dereferencing pointer to incomplete type ./Modules/_ssl.c:876: warning: ?ASN1_STRING_data? is deprecated (declared at /usr/local/include/openssl/asn1.h:553) ./Modules/_ssl.c: In function ?_get_crl_dp?: ./Modules/_ssl.c:1029: error: dereferencing pointer to incomplete type ./Modules/_ssl.c: In function ?PySSL_compression?: ./Modules/_ssl.c:1446: error: dereferencing pointer to incomplete type ./Modules/_ssl.c:1448: error: dereferencing pointer to incomplete type ./Modules/_ssl.c: In function ?context_new?: ./Modules/_ssl.c:2000: warning: ?TLSv1_method? is deprecated (declared at /usr/local/include/openssl/ssl.h:1596) ./Modules/_ssl.c:2003: warning: ?TLSv1_1_method? is deprecated (declared at /usr/local/include/openssl/ssl.h:1602) please help me check where I take a mistake. The related information is: Linux version: Linux root:2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux OpenSSL version: [root at root Python-2.7.12]# rpm -aq | grep openssl openssl-static-1.0.1e-48.el6_8.4.x86_64 openssl-1.0.1e-48.el6_8.4.x86_64 openssl-devel-1.0.1e-48.el6_8.4.x86_64 COMPILER version: [root at root Python-2.7.12]# yum list installed | grep -i gcc gcc.x86_64 4.4.7-17.el6 gcc-c++.x86_64 4.4.7-17.el6 gcc-gfortran.x86_64 4.4.7-17.el6 libgcc.i686 4.4.7-17.el6 libgcc.x86_64 4.4.7-17.el6 Thanks in advance. ---------- assignee: christian.heimes components: SSL messages: 289262 nosy: ada, christian.heimes priority: normal severity: normal status: open title: 2.7.12 compile error from ssl related type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 20:15:05 2017 From: report at bugs.python.org (Hanno Schlichting) Date: Thu, 09 Mar 2017 01:15:05 +0000 Subject: [issue29766] --with-lto still implied by --enable-optimizations in Python 2.7 Message-ID: <1489022104.7.0.601332376307.issue29766@psf.upfronthosting.co.za> New submission from Hanno Schlichting: I think the fix for issue28032 wasn't applied correctly to the 2.7 branch. Compare the change in Python 2.7: https://github.com/python/cpython/commit/9cbfa79111e7152231556a21af90a220b72ed086#diff-e2d5a00791bce9a01f99bc6fd613a39dL6425 vs. for example Python 3.5: https://github.com/python/cpython/commit/14c7f71150c94ca35ca913b15c3d0cd236691ed6#diff-e2d5a00791bce9a01f99bc6fd613a39dL6567 In Python 3.5 the Py_LTO='true' line was before the Darwin block and got removed. In Python 2.7 the line was after the block and was left in place. I'm guessing this was a simply mistake, while backporting the change. ---------- components: Build messages: 289263 nosy: Hanno Schlichting, gregory.p.smith priority: normal severity: normal status: open title: --with-lto still implied by --enable-optimizations in Python 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 20:17:53 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Mar 2017 01:17:53 +0000 Subject: [issue10408] Denser dicts and linear probing In-Reply-To: <1289659692.61.0.467153013048.issue10408@psf.upfronthosting.co.za> Message-ID: <1489022273.95.0.514318712571.issue10408@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Agreed. This doesn't make sense for the compact dict implementation. ---------- resolution: -> out of date stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 20:53:15 2017 From: report at bugs.python.org (Matt Bogosian) Date: Thu, 09 Mar 2017 01:53:15 +0000 Subject: [issue29760] tarfile chokes on reading .tar file with no entries (but does fine if the same file is bzip2'ed) In-Reply-To: <1489001529.94.0.345849682069.issue29760@psf.upfronthosting.co.za> Message-ID: <1489024395.84.0.0289109953835.issue29760@psf.upfronthosting.co.za> Matt Bogosian added the comment: FWIW, the (offending) fix for #24259 was introduced (e.g., in 2.7) via 2.7.10. I've verified that 2.7.9 works as expected: ``` $ python -V Python 2.7.9 $ python tarfail.py opening /?/tarfail/test.tar.bz2 opening /?/tarfail/test.tar . ---------------------------------------------------------------------- Ran 1 test in 0.010s OK ``` So this should probably be considered a regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 21:27:55 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 09 Mar 2017 02:27:55 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 In-Reply-To: <1488991650.0.0.826679402246.issue29758@psf.upfronthosting.co.za> Message-ID: <1489026475.22.0.62086115861.issue29758@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +haypo, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 21:38:50 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 09 Mar 2017 02:38:50 +0000 Subject: [issue29762] Use "raise from None" In-Reply-To: <1489007676.29.0.138385616596.issue29762@psf.upfronthosting.co.za> Message-ID: <1489027130.74.0.786003705145.issue29762@psf.upfronthosting.co.za> Josh Rosenberg added the comment: To tie the exceptions to the actual line, would it perhaps make sense to copy over the traceback of the original exception using .with_traceback? ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 21:39:42 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 09 Mar 2017 02:39:42 +0000 Subject: [issue29762] Use "raise from None" In-Reply-To: <1489007676.29.0.138385616596.issue29762@psf.upfronthosting.co.za> Message-ID: <1489027182.07.0.724055535804.issue29762@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Particularly when the type of the exception isn't being changed, it's only altering the message to provide more information? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 22:54:20 2017 From: report at bugs.python.org (Shuo Li) Date: Thu, 09 Mar 2017 03:54:20 +0000 Subject: [issue29767] build python failed on test_socket due to unused_port is actually used. Message-ID: <1489031660.84.0.964088839039.issue29767@psf.upfronthosting.co.za> New submission from Shuo Li: I am running a debian system. And trying to build cpython3.6 from source. When I run make altinstall, it failed on test_socket. Reporting cli attribute is missing. After some trouble shooting, it seems the support.get_unused_port() is not reliable. Then I modified it and return a port I am sure no one is using, the build succeeded. ---------- components: Build messages: 289268 nosy: Shuo Li priority: normal severity: normal status: open title: build python failed on test_socket due to unused_port is actually used. versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 23:02:30 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Mar 2017 04:02:30 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489032150.31.0.221338952901.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: As Eryk notes, this has revealed a separate bug in that we don't make the path absolute when adding to sys.path. However, that's *not* directly related to the regression, so I'm resisting the temptation to change it here. Instead, the new test case I'm adding will just run a script directory both with and without -I, and make sure sys.path ends up the same in both cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 23:07:31 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 09 Mar 2017 04:07:31 +0000 Subject: [issue29756] Improve documentation for list methods that compare items by equality In-Reply-To: <1488981833.28.0.455455965624.issue29756@psf.upfronthosting.co.za> Message-ID: <1489032451.42.0.362541284425.issue29756@psf.upfronthosting.co.za> Xiang Zhang added the comment: +1 for jsoh. Actually the behaviour is documented in https://docs.python.org/3/reference/expressions.html#value-comparisons. So a single 'a is b' or 'a == b' is not complete. I would like to use 'equal to' which implies 'a is b or a == b'. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 23:50:51 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Mar 2017 04:50:51 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489035051.15.0.371417354677.issue29723@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +467 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 23:59:26 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 09 Mar 2017 04:59:26 +0000 Subject: [issue29756] Improve documentation for list methods that compare items by equality In-Reply-To: <1488981833.28.0.455455965624.issue29756@psf.upfronthosting.co.za> Message-ID: <1489035566.09.0.685976835276.issue29756@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +468 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 8 23:59:49 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Mar 2017 04:59:49 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489035589.22.0.850620268976.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: Work in progress PR at https://github.com/python/cpython/pull/571 I also came up with a reasonably straightforward way of defining the desired "sys.path" initialisation behaviour, which is that the following should all get the *same* sys.path entries: python3 -S script_dir/__main__.py python3 -S script_dir python3 -I script_dir None of those should have the current directory on sys.path, but they should *all* have `script_dir` as the first entry on sys.path (and it will be absolute by the time user code runs, even though RunMainAsImporter itself doesn't yet ensure that). They all differ from the `python3 -m script_dir` and `python3 -m script_dir.__main__` cases, as those are the exact opposite: they *should* have the current directory as the first entry on sys.path and *should not* have `script_dir` in sys.path at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 00:07:52 2017 From: report at bugs.python.org (svelankar) Date: Thu, 09 Mar 2017 05:07:52 +0000 Subject: [issue29682] Possible missing NULL check in pyexpat In-Reply-To: <1488347676.64.0.259401612021.issue29682@psf.upfronthosting.co.za> Message-ID: <1489036072.88.0.653071284846.issue29682@psf.upfronthosting.co.za> Changes by svelankar : ---------- pull_requests: +469 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 00:34:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 05:34:50 +0000 Subject: [issue29682] Possible missing NULL check in pyexpat In-Reply-To: <1488347676.64.0.259401612021.issue29682@psf.upfronthosting.co.za> Message-ID: <1489037690.12.0.711959505122.issue29682@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Alex and svelankar for your report and fix. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 00:43:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 05:43:24 +0000 Subject: [issue29768] Fix expact version check Message-ID: <1489038204.73.0.479111635922.issue29768@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The compile-time check for expat version added in issue14234 doesn't work with expat 3.0.0. Following PR fixes this. ---------- components: Extension Modules, XML messages: 289273 nosy: gregory.p.smith, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Fix expact version check type: security versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 00:49:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 05:49:23 +0000 Subject: [issue29768] Fix expact version check In-Reply-To: <1489038204.73.0.479111635922.issue29768@psf.upfronthosting.co.za> Message-ID: <1489038563.73.0.676141772834.issue29768@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +470 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 00:51:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 05:51:58 +0000 Subject: [issue29762] Use "raise from None" In-Reply-To: <1489007676.29.0.138385616596.issue29762@psf.upfronthosting.co.za> Message-ID: <1489038718.18.0.645812651344.issue29762@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think this is needed. The traceback points to the actual line -- the line with the "raise" statement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 01:05:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 06:05:13 +0000 Subject: [issue29760] tarfile chokes on reading .tar file with no entries (but does fine if the same file is bzip2'ed) In-Reply-To: <1489001529.94.0.345849682069.issue29760@psf.upfronthosting.co.za> Message-ID: <1489039513.02.0.635058458899.issue29760@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +lars.gustaebel type: crash -> behavior versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 01:08:37 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Mar 2017 06:08:37 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489039717.18.0.497430039282.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: Slightly correction, as I didn't have the isolated mode equivalents quite correct: python3 -s script_dir/__main__.py python3 -s script_dir python3 -I script_dir Isolated mode still runs the system site.py, which turns out to be signficant in a development checkout (getpath includes the Lib/ directory twice, and site.py then cleans out the duplicate). So I think this PR is the right fix, but need confirmation from Steve that it still solves the original problem reported in issue 29319. (Note the current PR is open against the 3.6 branch - I'm going to make a new single-commit one against master, flagging it for cherry-picking, then close this one) ---------- assignee: -> steve.dower stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 01:28:37 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Mar 2017 06:28:37 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489040917.61.0.4525250208.issue29723@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +471 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 01:28:37 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Mar 2017 06:28:37 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1489040917.73.0.656751108039.issue29319@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +472 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 01:31:23 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Mar 2017 06:31:23 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489041083.61.0.846526114814.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, https://github.com/python/cpython/pull/575 is the new PR that covers everything needed to fix the root cause of the problem (which was the entirely unnecessary add-and-overwrite dance that zipfile and directory executation was doing for sys.path[0]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 01:32:27 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 09 Mar 2017 06:32:27 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489041147.91.0.0399149193576.issue29723@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 02:02:24 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 09 Mar 2017 07:02:24 +0000 Subject: [issue29759] Deadlock in multiprocessing.pool.Pool on terminate In-Reply-To: <1488995446.21.0.189589252767.issue29759@psf.upfronthosting.co.za> Message-ID: <1489042944.11.0.652376563062.issue29759@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +davin versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 02:15:30 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 09 Mar 2017 07:15:30 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1489043730.92.0.188887054755.issue20087@psf.upfronthosting.co.za> Benjamin Peterson added the comment: "eo_XX" is just something that appears in the X11 locale.alias file. My change doesn't add that; it was already there. (for Esperanto, which I suppose explains the "XX") Most of the changes you identify the glibc aliases taking precedence over the X11 ones. e.g., glibc has "fi_FI ISO-8859-1" while the X11 locale list has "fi_FI.ISO8859-15". That seems correct to me as far as the intent of this change is concerned. How do you propose to pick and choose what we use from the X11 locale alias list? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 02:23:27 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 09 Mar 2017 07:23:27 +0000 Subject: [issue29764] PyUnicode_Decode with encoding utf8 crashes In-Reply-To: <1489020390.12.0.948063239633.issue29764@psf.upfronthosting.co.za> Message-ID: <1489044207.52.0.690830769671.issue29764@psf.upfronthosting.co.za> Xiang Zhang added the comment: You need to first call `Py_Initialize()` to initialize the Python interpreter. It is required. ---------- nosy: +xiang.zhang resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 02:31:22 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 09 Mar 2017 07:31:22 +0000 Subject: [issue29767] build python failed on test_socket due to unused_port is actually used. In-Reply-To: <1489031660.84.0.964088839039.issue29767@psf.upfronthosting.co.za> Message-ID: <1489044682.88.0.447659908128.issue29767@psf.upfronthosting.co.za> Xiang Zhang added the comment: Could you show the failure message here? And you could make your patch a PR on GitHub. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 03:21:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 08:21:22 +0000 Subject: [issue29768] Fix expact version check In-Reply-To: <1489038204.73.0.479111635922.issue29768@psf.upfronthosting.co.za> Message-ID: <1489047682.63.0.645094177058.issue29768@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +473 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 03:24:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 08:24:31 +0000 Subject: [issue29768] Fix expact version check In-Reply-To: <1489038204.73.0.479111635922.issue29768@psf.upfronthosting.co.za> Message-ID: <1489047871.1.0.327008722309.issue29768@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +474 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 03:26:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 08:26:27 +0000 Subject: [issue29768] Fix expact version check In-Reply-To: <1489038204.73.0.479111635922.issue29768@psf.upfronthosting.co.za> Message-ID: <1489047987.01.0.135035932849.issue29768@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +475 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 03:58:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 08:58:00 +0000 Subject: [issue29768] Fix expact version check In-Reply-To: <1489038204.73.0.479111635922.issue29768@psf.upfronthosting.co.za> Message-ID: <1489049880.42.0.351356592456.issue29768@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 04:15:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Mar 2017 09:15:08 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 In-Reply-To: <1489026475.26.0.257666349094.issue29758@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Which function raises this exception? Add the traceback place. It may be a bug in your code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 05:10:32 2017 From: report at bugs.python.org (Tristan Croll) Date: Thu, 09 Mar 2017 10:10:32 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 In-Reply-To: <1488991650.0.0.826679402246.issue29758@psf.upfronthosting.co.za> Message-ID: <1489054232.8.0.479523239405.issue29758@psf.upfronthosting.co.za> Tristan Croll added the comment: OK, a further clue. First, a little more detail on how my project is arranged (to re-iterate, this works without complaint in Python 3.5): Rather than use my SWIG output directly, I've created a further wrapper layer in Python to add functions/syntactic sugar that would be difficult to achieve in SWIG, add a bit of extra documentation, and bury some classes that may be occasionally useful but don't really need to be in the primary API. The SWIG output Python library I name clipper_core, and I use the following class decorators for classes in the front-end API to reduce the amount of code (Python and SWIG) needed: def mappedclass(old_cls): ''' Ensures that objects returned from functions in the clipper_core library are instantiated in Python as the derived class with the extra functionality. ''' def decorator(cls): def __newnew__(thiscls, *args, **kwargs): if thiscls == old_cls: return object.__new__(cls) return object.__new__(thiscls) old_cls.__new__ = __newnew__ return cls return decorator def getters_to_properties(*funcs): ''' Class decorator. Add the names of any getter functions with void arguments (e.g. Coord_grid.u()) to convert them to properties. If you want the property name to be different from the function name, add the desired name and the function name as a tuple (e.g. ('uvw', '_get_uvw')) ''' def property_factory(func): def getter(self): return getattr(super(self.__class__, self), func)() prop = property(getter) return prop def decorator(cls): for func in funcs: if type(func) == tuple: setattr(cls, func[0], property_factory(func[1])) else: setattr(cls, func, property_factory(func)) return cls return decorator def format_to_string(cls): ''' Class decorator to redirect the Clipper format() function to __str__, to provide pretty printing of the object. ''' def format(self): return super(self.__class__,self).format() def __str__(self): return self.format setattr(cls, 'format', property(format)) setattr(cls, '__str__', __str__) return cls Experimenting this morning with the following two classes: @format_to_string @mappedclass(clipper_core.Cell_descr) class Cell_descr(clipper_core.Cell_descr): def __init__(self, abc, angles): ''' __init__(self, abc, angles) -> Cell_descr Args: abc ([float*3]): cell dimensions in Angstroms angles ([float*3]): alpha, beta and gamma angles in degrees ''' clipper_core.Cell_descr.__init__(self, *abc, *angles) @format_to_string @getters_to_properties('cell_descr', 'matrix_frac', 'matrix_orth', 'metric_real', 'metric_reci', 'volume') @mappedclass(clipper_core.Cell) class Cell(clipper_core.Cell): ''' Define a crystallographic unit cell using the lengths of the three sides a, b, c (in Angstroms) and the three angles alpha, beta, gamma (in degrees). ''' def __init__(self, abc, angles): ''' __init__(self, abc, angles) -> Cell Args: abc ([float*3]): cell dimensions in Angstroms angles ([float*3]): alpha, beta and gamma angles in degrees ''' cell_descr = Cell_descr(abc, angles) #cell_descr = clipper_core.Cell_descr(*abc, *angles) clipper_core.Cell.__init__(self, cell_descr) def __eq__(self, other): return self.equals(other) Then: import clipper cell = clipper.cell([100,100,100],[90,90,90]) cell.cell_descr SystemError Traceback (most recent call last) in () ----> 1 c.cell_descr /home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/clipper/clipper_decorators.py in getter(self) 87 def property_factory(func): 88 def getter(self): ---> 89 return getattr(super(self.__class__, self), func)() 90 prop = property(getter) 91 return prop /home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/clipper/lib/clipper_python_core/clipper.py in cell_descr(self) 8249 8250 """ -> 8251 return _clipper.Cell_cell_descr(self) 8252 8253 __swig_destroy__ = _clipper.delete_Cell SystemError: Objects/tupleobject.c:81: bad argument to internal function ... but if I comment out the derived Cell_descr class and switch to the alternate cell_descr constructor in Cell.__init__(), then it works as expected. I have tried commenting out the other class decorators, with no effect - so it would seem it's what's happening in the @mappedclass decorator that is causing my troubles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 05:23:28 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 09 Mar 2017 10:23:28 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1489043730.92.0.188887054755.issue20087@psf.upfronthosting.co.za> Message-ID: <4839d74f-7b95-7c3a-8054-7d49e06b3513@egenix.com> Marc-Andre Lemburg added the comment: On 09.03.2017 08:15, Benjamin Peterson wrote: > > "eo_XX" is just something that appears in the X11 locale.alias file. My change doesn't add that; it was already there. (for Esperanto, which I suppose explains the "XX") Yes, I know. That was an example of a bug in the X.org list. > Most of the changes you identify the glibc aliases taking precedence over the X11 ones. e.g., glibc has "fi_FI ISO-8859-1" while the X11 locale list has "fi_FI.ISO8859-15". That seems correct to me as far as the intent of this change is concerned. No, it's not correct. ISO-8859-1 is the older version of Latin-1 without the Euro sign. ISO8859-15 adds it. > How do you propose to pick and choose what we use from the X11 locale alias list? We have to go through the list one by one to check whether the mapping update makes sense and is correct. This will be difficult in a few cases where the glibc mapping switches to UTF-8 from an ISO encoding. We'll have to find evidence that this change does indeed make sense. My take on this is that the X.org folks know better than the glibc folks, since the former have to deal with end users that rely on the locale settings a lot more than applications using glibc for getting an initial locale setting right. Also note that you are parsing the SUPPORTED file from glibc (in slightly processed form): https://github.com/bminor/glibc/blob/master/localedata/SUPPORTED This file does not provide a locale alias mapping as the routine in makelocalealias.py suggests. Instead it's a list of locales to install by default: https://github.com/bminor/glibc/blob/73dfd088936b9237599e4ab737c7ae2ea7d710e1/localedata/Makefile In glibc you can define both the locale and the encoding separately when creating a locale using localedef and the file simply provides the default parameters to pass to this tool. As such, I don't see how you can derive a default alias meaning from the file. It's simply an indication of what glibc would have installed in case it were installed from source, but that's hardly ever the case. On today's systems only a bare subset of locales is installed and more added as necessary, so you rarely have all the locales defined in SUPPORTED installed on a system. So the file doesn't even provide a hint at what could be installed on the system ("locale -a" gives you that list). Here's the history: https://github.com/bminor/glibc/commits/master/localedata/SUPPORTED It's merely a list of additions and removals from the default set. Nothing more. It does provide a list of known and supported locales, but no usable or authoritative encoding information (locales are defined using Unicode, so the encoding is a parameter and not predefined). Overall, I believe the file is pretty useless to use as basis for an alias table providing encoding information. It may provide some ideas for corrections, but should not override the X.org one by default. On the other hand, you have the local.alias master file: https://cgit.freedesktop.org/xorg/lib/libX11/tree/nls/locale.alias.pre together with the history of why changes were made and when. This is an authoritative resource and people are making changes against it from the user perspective. I'd suggest to make the override optional in makelocalealias.py via a command line switch and to use this for manually adding or fixing X.org entries. If you absolutely want to parse the glibc file per default as well, please only let it add new entries, not override existing ones. As we've seen in the patch, those overrides need to be carefully reviewed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 05:41:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 10:41:55 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1489056115.67.0.925450308961.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Why is the X11 locale alias map used at all? It seems like it can only create confusion with libc. Originally only the X11 locale alias map was used. The support of the glibc locale alias map was added 2.5 years ago (issue20079). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 05:47:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 10:47:43 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1489056463.92.0.93990220128.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The SUPPORTED file from glibc is used for determining the default encoding for locales that don't include it explicitly. For example en_IN uses UTF-8 rather than ISO8859-1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 06:46:10 2017 From: report at bugs.python.org (Wolfgang Maier) Date: Thu, 09 Mar 2017 11:46:10 +0000 Subject: [issue29769] pkgutil._iter_file_finder_modules should not be fooled by *.py folders Message-ID: <1489059970.36.0.419253660084.issue29769@psf.upfronthosting.co.za> New submission from Wolfgang Maier: The current implementation of _iter_file_finder_modules parses folders with a valid Python module extension as modules (e.g. it would report a *folder* xy.py as a module xy). As a result, e.g., pydoc.apropos('') fails if such a folder is found anywhere on sys.path. I'm attaching a patch that fixes this and also brings a few minor improvements (like using a set instead of a dict with 1 values and reusing the function in ImpImporter). However, I have a question about it (which is also the reason why I didn't turn this into a PR right away): in addition to checking that an item detected as a module is not a directory, I think it would be good to also check that an __init__ module inside a possible package really is a file. If I uncomment the respective check in the patch though, I'm getting a test_pydoc failure because the test creates a package directory with no access to contained file attributes. So even though there is an __init__.py file in the package dir the isfile() check fails. I think that should, in fact, happen and the pydoc test is wrong, but apparently whoever wrote the test had a different opinion. Any thoughts? ---------- components: Library (Lib) files: pkgutil.patch keywords: patch messages: 289285 nosy: ncoghlan, wolma priority: normal severity: normal status: open title: pkgutil._iter_file_finder_modules should not be fooled by *.py folders type: behavior versions: Python 3.7 Added file: http://bugs.python.org/file46714/pkgutil.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 07:42:38 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 09 Mar 2017 12:42:38 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1489056463.92.0.93990220128.issue20087@psf.upfronthosting.co.za> Message-ID: <895ad12c-daeb-5643-0810-9c952543e32c@egenix.com> Marc-Andre Lemburg added the comment: On 09.03.2017 11:47, Serhiy Storchaka wrote: > > The SUPPORTED file from glibc is used for determining the default encoding for locales that don't include it explicitly. For example en_IN uses UTF-8 rather than ISO8859-1. No, the glibc locales don't say anything about default encodings used in a locale: http://manpages.ubuntu.com/manpages/wily/en/man5/locale.5.html These encodings are just used for determining the default set of locale.encoding variants to install on the system, nothing more: https://github.com/bminor/glibc/blob/73dfd088936b9237599e4ab737c7ae2ea7d710e1/localedata/Makefile#L204 glibc does have a locale.alias file: https://github.com/bminor/glibc/blob/73dfd088936b9237599e4ab737c7ae2ea7d710e1/intl/locale.alias which uses the X.org format, but this is completely out of date and declared obsolete. Serhiy: If you believe that there's anything authoritative about the glibc SUPPORTED file in terms of defining the commonly used encoding in a locale, please provide references. These should also clarify why the glibc encoding is the correct one compared to the X.org mapping. It doesn't help, trying to interpret things into such build files. We need a database that is being actively maintained and has a track record of representing what people actually use in their locales. The only one I know is the X.org one. ---------- _______________________________________ Python tracker _______________________________________ From mal at egenix.com Thu Mar 9 07:42:28 2017 From: mal at egenix.com (M.-A. Lemburg) Date: Thu, 9 Mar 2017 13:42:28 +0100 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1489056463.92.0.93990220128.issue20087@psf.upfronthosting.co.za> References: <1489056463.92.0.93990220128.issue20087@psf.upfronthosting.co.za> Message-ID: <895ad12c-daeb-5643-0810-9c952543e32c@egenix.com> On 09.03.2017 11:47, Serhiy Storchaka wrote: > > The SUPPORTED file from glibc is used for determining the default encoding for locales that don't include it explicitly. For example en_IN uses UTF-8 rather than ISO8859-1. No, the glibc locales don't say anything about default encodings used in a locale: http://manpages.ubuntu.com/manpages/wily/en/man5/locale.5.html These encodings are just used for determining the default set of locale.encoding variants to install on the system, nothing more: https://github.com/bminor/glibc/blob/73dfd088936b9237599e4ab737c7ae2ea7d710e1/localedata/Makefile#L204 glibc does have a locale.alias file: https://github.com/bminor/glibc/blob/73dfd088936b9237599e4ab737c7ae2ea7d710e1/intl/locale.alias which uses the X.org format, but this is completely out of date and declared obsolete. Serhiy: If you believe that there's anything authoritative about the glibc SUPPORTED file in terms of defining the commonly used encoding in a locale, please provide references. These should also clarify why the glibc encoding is the correct one compared to the X.org mapping. It doesn't help, trying to interpret things into such build files. We need a database that is being actively maintained and has a track record of representing what people actually use in their locales. The only one I know is the X.org one. -- Marc-Andre Lemburg eGenix.com From report at bugs.python.org Thu Mar 9 07:49:52 2017 From: report at bugs.python.org (Wolfgang Langner) Date: Thu, 09 Mar 2017 12:49:52 +0000 Subject: [issue29770] Executable help output (--help) at commandline is wrong for option -B Message-ID: <1489063792.65.0.00439171993212.issue29770@psf.upfronthosting.co.za> New submission from Wolfgang Langner: The output for "python --help" for the option -B is wrong. It contains also the old pyo files. But they were removed. Output is: -B : don't write .py[co] files on import; also PYTHONDONTWRITEBYTECODE=x should be: -B : don't write .pyc files on import; also PYTHONDONTWRITEBYTECODE=x ---------- assignee: docs at python components: Documentation messages: 289287 nosy: docs at python, tds333 priority: normal severity: normal status: open title: Executable help output (--help) at commandline is wrong for option -B type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 07:52:08 2017 From: report at bugs.python.org (Mba) Date: Thu, 09 Mar 2017 12:52:08 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1489063928.52.0.26649333164.issue29619@psf.upfronthosting.co.za> Mba added the comment: > I don't think that a filesystem produce inodes larger than 2^63-1 The problem is real: the large inode number was assigned to a file created by MacOS on a share exported via CIFS, and then stated by Linux using NFS export. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:05:04 2017 From: report at bugs.python.org (Ma Lin) Date: Thu, 09 Mar 2017 13:05:04 +0000 Subject: [issue26744] print() function hangs on MS-Windows 10 In-Reply-To: <1460512669.99.0.0354506250162.issue26744@psf.upfronthosting.co.za> Message-ID: <1489064704.82.0.177364701196.issue26744@psf.upfronthosting.co.za> Ma Lin added the comment: This is an invalid issue, very sorry for waste your time! Especially apologize to Stinner. After enabling `QuickEdit Mode`, then click the console will suspend the program. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:07:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 13:07:38 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1489064858.06.0.198072531429.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The original issue is issue29571. The locale module returned encoding ISO8859-1 for locale en_IN (as in the X11 locale alias map), but glibc uses UTF-8 (as in glibc SUPPORT file). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:10:10 2017 From: report at bugs.python.org (Jack) Date: Thu, 09 Mar 2017 13:10:10 +0000 Subject: [issue29771] An email and MIME handling package - Add support to send CC of email Message-ID: <1489065010.61.0.0444038371691.issue29771@psf.upfronthosting.co.za> New submission from Jack: Currently using the package we can only define emails in the 'TO' as shown here: https://docs.python.org/2/library/email-examples.html#email-examples There is no support for email to be sent as CC or BCC which is useful quality in many emails. Please see if this can be added. ---------- messages: 289291 nosy: Nonickname priority: normal severity: normal status: open title: An email and MIME handling package - Add support to send CC of email type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:22:40 2017 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 09 Mar 2017 13:22:40 +0000 Subject: [issue29771] An email and MIME handling package - Add support to send CC of email In-Reply-To: <1489065010.61.0.0444038371691.issue29771@psf.upfronthosting.co.za> Message-ID: <1489065760.01.0.22768930354.issue29771@psf.upfronthosting.co.za> Eric V. Smith added the comment: The examples don't cover it, but look at the documentation for setting arbitrary mail headers such as CC. And look at smtplib.SMTP.sendmail() on sending a message to arbitrary recipients (to, cc, or bcc are all the same): https://docs.python.org/2/library/smtplib.html#smtplib.SMTP.sendmail ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:33:31 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 09 Mar 2017 13:33:31 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1489066411.15.0.227145902965.issue28298@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +476 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:34:59 2017 From: report at bugs.python.org (Jack) Date: Thu, 09 Mar 2017 13:34:59 +0000 Subject: [issue29771] An email and MIME handling package - Add support to send CC of email In-Reply-To: <1489065010.61.0.0444038371691.issue29771@psf.upfronthosting.co.za> Message-ID: <1489066499.87.0.164263353866.issue29771@psf.upfronthosting.co.za> Jack added the comment: But this is what I mean.. It shouldn't be arbitrary. When you define CC you want him as CC not as another one in the TO. This is why I said this is enhancement request. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:35:10 2017 From: report at bugs.python.org (Jack) Date: Thu, 09 Mar 2017 13:35:10 +0000 Subject: [issue29771] An email and MIME handling package - Add support to send CC of email In-Reply-To: <1489065010.61.0.0444038371691.issue29771@psf.upfronthosting.co.za> Message-ID: <1489066510.36.0.0806082995948.issue29771@psf.upfronthosting.co.za> Changes by Jack : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:38:05 2017 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 09 Mar 2017 13:38:05 +0000 Subject: [issue29771] An email and MIME handling package - Add support to send CC of email In-Reply-To: <1489065010.61.0.0444038371691.issue29771@psf.upfronthosting.co.za> Message-ID: <1489066685.9.0.0384941553706.issue29771@psf.upfronthosting.co.za> Eric V. Smith added the comment: So, you want to improve the examples? I wouldn't be opposed to that. I don't see that there's any code to change. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:42:28 2017 From: report at bugs.python.org (Jack) Date: Thu, 09 Mar 2017 13:42:28 +0000 Subject: [issue29771] An email and MIME handling package - Add support to send CC of email In-Reply-To: <1489065010.61.0.0444038371691.issue29771@psf.upfronthosting.co.za> Message-ID: <1489066948.98.0.703656568445.issue29771@psf.upfronthosting.co.za> Jack added the comment: I think you missundersttod. I showed the example page just so you would understand what I am talking about. Let me explain it better: msg['Subject'] = 'The contents of %s' % textfile msg['From'] = me msg['To'] = you Works. msg['Subject'] = 'The contents of %s' % textfile msg['From'] = me msg['To'] = you msg['CC'] = x msg['BCC'] = y won't work. It doesn't know what is CC and BCC. This is why I opened this request to modify the package to support it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:43:36 2017 From: report at bugs.python.org (Jack) Date: Thu, 09 Mar 2017 13:43:36 +0000 Subject: [issue29771] An email and MIME handling package - Add support to send CC of email In-Reply-To: <1489065010.61.0.0444038371691.issue29771@psf.upfronthosting.co.za> Message-ID: <1489067016.17.0.844704810228.issue29771@psf.upfronthosting.co.za> Jack added the comment: Please see the stack overflow question: http://stackoverflow.com/questions/42696100/python-smtp-send-email-with-cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:44:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 13:44:54 +0000 Subject: [issue29771] An email and MIME handling package - Add support to send CC of email In-Reply-To: <1489065010.61.0.0444038371691.issue29771@psf.upfronthosting.co.za> Message-ID: <1489067094.07.0.0967000908364.issue29771@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +email nosy: +barry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:53:34 2017 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 09 Mar 2017 13:53:34 +0000 Subject: [issue29771] An email and MIME handling package - Add support to send CC of email In-Reply-To: <1489065010.61.0.0444038371691.issue29771@psf.upfronthosting.co.za> Message-ID: <1489067614.93.0.225025979516.issue29771@psf.upfronthosting.co.za> Eric V. Smith added the comment: You need to review how SMTP works. The contents of the mail message have no bearing on where messages are sent. That's exactly how BCC works: there's nothing in the message telling you who is BCC'd, but the mail is still sent to the BCC recipients, via SMTP. Similarly, you could have the message say that someone at example.com is in the To: header, but not send it to them via SMTP. I'm on the fence about including this in the examples. In any event, this bug tracker is not a place for an email tutorial. From your SO link, there's a reference (by user xyref) to another question which explains this in detail: http://stackoverflow.com/questions/1546367/python-how-to-send-mail-with-to-cc-and-bcc. This completely explains the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:56:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 13:56:52 +0000 Subject: [issue29769] pkgutil._iter_file_finder_modules should not be fooled by *.py folders In-Reply-To: <1489059970.36.0.419253660084.issue29769@psf.upfronthosting.co.za> Message-ID: <1489067812.23.0.770702615132.issue29769@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +brett.cannon, eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:59:09 2017 From: report at bugs.python.org (Jack) Date: Thu, 09 Mar 2017 13:59:09 +0000 Subject: [issue29771] An email and MIME handling package - Add support to send CC of email In-Reply-To: <1489065010.61.0.0444038371691.issue29771@psf.upfronthosting.co.za> Message-ID: <1489067949.17.0.132025099136.issue29771@psf.upfronthosting.co.za> Jack added the comment: "I'm on the fence about including this in the examples." Think of it this way.. Including it in the docs would have prevented this question. It can be just a side note it doesn't have to be a whole example. Thx. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 08:59:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 13:59:53 +0000 Subject: [issue29770] Executable help output (--help) at commandline is wrong for option -B In-Reply-To: <1489063792.65.0.00439171993212.issue29770@psf.upfronthosting.co.za> Message-ID: <1489067993.03.0.372818786356.issue29770@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 09:01:02 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 09 Mar 2017 14:01:02 +0000 Subject: [issue29771] An email and MIME handling package - Add support to send CC of email In-Reply-To: <1489065010.61.0.0444038371691.issue29771@psf.upfronthosting.co.za> Message-ID: <1489068062.69.0.650473060327.issue29771@psf.upfronthosting.co.za> R. David Murray added the comment: If you use smtplib.send_message in python3, it will do what you want (including stripping BCC headers before sending the message). If someone wants to create a PR to add an example of what Eric is talking about (specifying additional senders in smtplib.sendmail to match what is in the CC headers) please open a new issue with a PR (which may or may not get accepted :). I don't think it is worth doing, myself, but I won't object if others think it enhances the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 09:44:56 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Thu, 09 Mar 2017 14:44:56 +0000 Subject: [issue29772] Unintentionally deleted line on library/collections.rst Message-ID: <1489070696.66.0.394233240398.issue29772@psf.upfronthosting.co.za> New submission from Kinebuchi Tomohiko: The last part of "Counter objects" section has a strange line: "in Smalltalk." https://docs.python.org/2.7/library/collections.html#counter-objects The line just before "in Smalltalk" might be deleted by accident. Related issue is bpo-25910 [1]_ and the applied patch is this [2]_, although an intended patch might looks like this [3]_. .. [1] http://bugs.python.org/issue25910 .. [2] https://hg.python.org/cpython/rev/14e00e7e4d51#l15.7 patch for the 2.7 branch .. [3] https://hg.python.org/cpython/rev/ce5ef48b5140#l21.7 patch for the 3.5 branch I will create a pull request. ---------- assignee: docs at python components: Documentation messages: 289300 nosy: cocoatomo, docs at python priority: normal severity: normal status: open title: Unintentionally deleted line on library/collections.rst versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 10:09:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 15:09:02 +0000 Subject: [issue29773] Additional float-from-string tests Message-ID: <1489072142.51.0.122050091916.issue29773@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Following PR adds more corner cases in the test for calling float() with invalid string. ---------- components: Tests messages: 289301 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Additional float-from-string tests type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 10:12:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 15:12:39 +0000 Subject: [issue29773] Additional float-from-string tests In-Reply-To: <1489072142.51.0.122050091916.issue29773@psf.upfronthosting.co.za> Message-ID: <1489072359.63.0.830052825584.issue29773@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +477 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 10:22:28 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 09 Mar 2017 15:22:28 +0000 Subject: [issue29772] Unintentionally deleted line on library/collections.rst In-Reply-To: <1489070696.66.0.394233240398.issue29772@psf.upfronthosting.co.za> Message-ID: <1489072948.01.0.289897211835.issue29772@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +478 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 10:22:59 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Thu, 09 Mar 2017 15:22:59 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489072979.75.0.144767721793.issue28685@psf.upfronthosting.co.za> Changes by Elliot Gorokhovsky : ---------- pull_requests: +479 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 10:27:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 15:27:35 +0000 Subject: [issue29774] Improve zipfile handling of corrupted extra field Message-ID: <1489073255.72.0.694063401806.issue29774@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The zipfile module can raise struct.error when process corrupted extra field. This issue was partially resolved by issue14315. Following PR converts struct.error to BadZipFile in other case. ---------- components: Library (Lib) messages: 289302 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Improve zipfile handling of corrupted extra field type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 10:28:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 15:28:25 +0000 Subject: [issue29774] Improve zipfile handling of corrupted extra field In-Reply-To: <1489073255.72.0.694063401806.issue29774@psf.upfronthosting.co.za> Message-ID: <1489073305.06.0.643071936744.issue29774@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- type: behavior -> enhancement versions: -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 10:33:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 15:33:55 +0000 Subject: [issue29774] Improve zipfile handling of corrupted extra field In-Reply-To: <1489073255.72.0.694063401806.issue29774@psf.upfronthosting.co.za> Message-ID: <1489073635.31.0.664501464233.issue29774@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +480 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 10:37:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 15:37:00 +0000 Subject: [issue29772] Unintentionally deleted line on library/collections.rst In-Reply-To: <1489070696.66.0.394233240398.issue29772@psf.upfronthosting.co.za> Message-ID: <1489073820.38.0.475882712361.issue29772@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 10:56:01 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Mar 2017 15:56:01 +0000 Subject: [issue29772] Unintentionally deleted line on library/collections.rst In-Reply-To: <1489070696.66.0.394233240398.issue29772@psf.upfronthosting.co.za> Message-ID: <1489074961.62.0.388853840839.issue29772@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Nice catch. ---------- nosy: +rhettinger resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 11:17:16 2017 From: report at bugs.python.org (Paul Moore) Date: Thu, 09 Mar 2017 16:17:16 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1489076236.27.0.953275131391.issue29319@psf.upfronthosting.co.za> Paul Moore added the comment: Confirmed that 3.6.1rc1 fixes the issue in my original use case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 11:25:24 2017 From: report at bugs.python.org (Paul Moore) Date: Thu, 09 Mar 2017 16:25:24 +0000 Subject: [issue29775] There appears to be a spurious ^0 in sys.version for 3.6.1rc1 Message-ID: <1489076723.99.0.3863763672.issue29775@psf.upfronthosting.co.za> New submission from Paul Moore: The 3.6.1rc1 build seems to have a spurious "^0" at the end of the version, before the VCS ID - 3.6.1rc1^0): >py -3.6 Python 3.6.1rc1 (v3.6.1rc1^0:e0fbe5feee4f9c00f09eb9659c2182183036261a, Mar 4 2017, 20:00:12) [MSC v.1900 64 bit (AMD64)] on win32 >>> sys.version '3.6.1rc1 (v3.6.1rc1^0:e0fbe5feee4f9c00f09eb9659c2182183036261a, Mar 4 2017, 20:00:12) [MSC v.1900 64 bit (AMD64)]' It's not showing in sys.version_info, so it's probably only cosmetic. Also, I don't think this is really a release blocker - just marking it as such so it gets checked (I wonder if it's an artifact of the github migration, I think git uses ^0 to mean something specific in relation to commit IDs?) I've only checked on Windows. I don't know if it's the same on Unix. If it's deemed cosmetic, I'm happy for it to be downgraded to non-blocking, or even closed as not an issue. Just wanted to flag it up in case it's a symptom of something deeper. ---------- assignee: ned.deily components: Interpreter Core messages: 289305 nosy: ned.deily, paul.moore, steve.dower priority: release blocker severity: normal status: open title: There appears to be a spurious ^0 in sys.version for 3.6.1rc1 type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 11:41:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Mar 2017 16:41:36 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1489077696.24.0.702552032403.issue29619@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +481 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 11:47:58 2017 From: report at bugs.python.org (Ethan Furman) Date: Thu, 09 Mar 2017 16:47:58 +0000 Subject: [issue29752] Enum._missing_ not called for __getattr__ failures In-Reply-To: <1488925792.17.0.971645599389.issue29752@psf.upfronthosting.co.za> Message-ID: <1489078078.81.0.0800784763296.issue29752@psf.upfronthosting.co.za> Ethan Furman added the comment: Thank you, Josh, that's a very good point. One can be expected to have the correct spelling when using attribute access. So the two accesses that make sense for a _missing_ call would then be: - by-value lookup (e.g. Label(1)) - by-name lookup (e.g. Label['redapple']) Sound reasonable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 11:48:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 16:48:24 +0000 Subject: [issue29774] Improve zipfile handling of corrupted extra field In-Reply-To: <1489073255.72.0.694063401806.issue29774@psf.upfronthosting.co.za> Message-ID: <1489078104.07.0.427728438112.issue29774@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 11:51:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Mar 2017 16:51:08 +0000 Subject: [issue29774] Improve zipfile handling of corrupted extra field In-Reply-To: <1489073255.72.0.694063401806.issue29774@psf.upfronthosting.co.za> Message-ID: <1489078268.38.0.141230915373.issue29774@psf.upfronthosting.co.za> STINNER Victor added the comment: I merged your PR, thanks! I don't think that this minor enhancement on error message is worth it to be backported. It only impacts corrupted ZIP files, and 3.6 and older already raise an error message. I updated manually the PR status, it seems like the GitHub bot is still broken. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:08:06 2017 From: report at bugs.python.org (svelankar) Date: Thu, 09 Mar 2017 17:08:06 +0000 Subject: [issue29674] Use GCC __attribute__((alloc_size(x, y))) on PyMem_Malloc() functions In-Reply-To: <1488272050.61.0.409487721584.issue29674@psf.upfronthosting.co.za> Message-ID: <1489079286.08.0.0269952205406.issue29674@psf.upfronthosting.co.za> svelankar added the comment: So once these functions are decorated with this attribute, what kind of testing/validation you have in mind, please let me know. ---------- nosy: +svelankar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:10:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 17:10:02 +0000 Subject: [issue29776] Modernize properties Message-ID: <1489079402.47.0.435152463031.issue29776@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Following PR updates Python sources to use new shiny syntax for properties. It replaces the old code def _foo(self): ... def _set_foo(self, value): ... foo = property(_foo, _set_foo) with the new code @property def foo(self): ... @foo.setter def foo(self, value): ... New syntax was added in Python 2.4. ---------- components: Library (Lib) messages: 289309 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Modernize properties type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:12:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 17:12:28 +0000 Subject: [issue29776] Modernize properties In-Reply-To: <1489079402.47.0.435152463031.issue29776@psf.upfronthosting.co.za> Message-ID: <1489079548.98.0.296981868668.issue29776@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +482 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:13:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Mar 2017 17:13:17 +0000 Subject: [issue29674] Use GCC __attribute__((alloc_size(x, y))) on PyMem_Malloc() functions In-Reply-To: <1488272050.61.0.409487721584.issue29674@psf.upfronthosting.co.za> Message-ID: <1489079597.25.0.699577770151.issue29674@psf.upfronthosting.co.za> STINNER Victor added the comment: > So once these functions are decorated with this attribute, what kind of testing/validation you have in mind, please let me know. Call PyMem_Malloc(Py_ssize_t) for example: it must emit a warning on GCC 7, since casting negative values to size_t overflows. Not sure how to test the attribute on GCC 6. Maybe some GCC related static analyzers are able to detect memory leaks like: void test(void) { void *ptr = PyMem_Malloc(16); /* don't free ptr */ } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:21:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 17:21:44 +0000 Subject: [issue29774] Improve zipfile handling of corrupted extra field In-Reply-To: <1489073255.72.0.694063401806.issue29774@psf.upfronthosting.co.za> Message-ID: <1489080104.63.0.89276054821.issue29774@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:28:08 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 09 Mar 2017 17:28:08 +0000 Subject: [issue29757] The loop in utility `socket.create_connection()` swallows previous errors In-Reply-To: <1488984317.87.0.296010902983.issue29757@psf.upfronthosting.co.za> Message-ID: <1489080488.91.0.188681890456.issue29757@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Case (c) sidesteps the above questions. I like the (c) option. I don't think we should use logging/warnings here, as they can produce unwanted noise that few know how to silence. When the list of errors is passed as a second argument to the exception, how is it rendered? Would it make sense to concatenate all error messages: if errs: errors_msg = ' \n'.join(str(e) for e in errs) raise error(f"connection failed:\n{errors_msg}", errs) Or maybe we should track which addr caused which exception? for res in getaddrinfo(host, port, 0, SOCK_STREAM): af, socktype, proto, canonname, sa = res try: ... except error as e: errs.append((canonname, e)) ... if errs: error_msg = ' \n'.join(f'{addr}: {e}' for addr, e in errs) raise error('connection failed:\n{error_msg}', errs) ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:28:53 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 09 Mar 2017 17:28:53 +0000 Subject: [issue29757] The loop in utility `socket.create_connection()` swallows previous errors In-Reply-To: <1488984317.87.0.296010902983.issue29757@psf.upfronthosting.co.za> Message-ID: <1489080533.9.0.526727350096.issue29757@psf.upfronthosting.co.za> Yury Selivanov added the comment: This is a new feature, so we can only push it to 3.7. ---------- nosy: +brett.cannon, haypo versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:30:00 2017 From: report at bugs.python.org (Tristan Croll) Date: Thu, 09 Mar 2017 17:30:00 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 In-Reply-To: <1488991650.0.0.826679402246.issue29758@psf.upfronthosting.co.za> Message-ID: <1489080600.52.0.29847209478.issue29758@psf.upfronthosting.co.za> Tristan Croll added the comment: OK, this seems to narrow down the problem. The following was legal in Python 3.5.1, but in 3.5.3 and 3.6.1rc1 returns: 'TypeError: must be type, not classobj' class Foo_Base: pass class Bar_Base: def get_foo(self): f = Foo_Base() return f class Foo(Foo_Base): pass class Bar(Bar_Base): def get_foo2(self): return super(Bar, self).get_foo() bar = Bar() b = bar.get_foo2() Is this a deliberate and permanent change? If so, it looks like I have a lot of work on my hands. ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:32:29 2017 From: report at bugs.python.org (Ethan Furman) Date: Thu, 09 Mar 2017 17:32:29 +0000 Subject: [issue29776] Modernize properties In-Reply-To: <1489079402.47.0.435152463031.issue29776@psf.upfronthosting.co.za> Message-ID: <1489080749.96.0.327495276799.issue29776@psf.upfronthosting.co.za> Ethan Furman added the comment: Have you made sure nothing calls the replaced functions manually? Such as: ... self._set_foo(9) ... ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:38:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 17:38:57 +0000 Subject: [issue29776] Modernize properties In-Reply-To: <1489079402.47.0.435152463031.issue29776@psf.upfronthosting.co.za> Message-ID: <1489081137.45.0.662259542982.issue29776@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I replaced only private getters and setters. All tests passed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:39:26 2017 From: report at bugs.python.org (Tristan Croll) Date: Thu, 09 Mar 2017 17:39:26 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 In-Reply-To: <1488991650.0.0.826679402246.issue29758@psf.upfronthosting.co.za> Message-ID: <1489081166.37.0.49127286726.issue29758@psf.upfronthosting.co.za> Tristan Croll added the comment: Nope - belay that. Checking through the SWIG-generated Python code, all the classes correctly inherit from object, which negates that issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:50:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Mar 2017 17:50:02 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 In-Reply-To: <1488991650.0.0.826679402246.issue29758@psf.upfronthosting.co.za> Message-ID: <1489081802.71.0.843144796575.issue29758@psf.upfronthosting.co.za> STINNER Victor added the comment: The code in msg289314 doesn't emit any warning. I tested 3.5, 3.6 and master development branches and system Python 3.5.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:51:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 09 Mar 2017 17:51:13 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 In-Reply-To: <1488991650.0.0.826679402246.issue29758@psf.upfronthosting.co.za> Message-ID: <1489081873.54.0.405693530719.issue29758@psf.upfronthosting.co.za> STINNER Victor added the comment: "Nope - belay that. Checking through the SWIG-generated Python code, all the classes correctly inherit from object, which negates that issue." I don't understand your comment, on Python 3, any class inherit from object be default. There is no more old and new classes. haypo at selma$ cat y.py class A: pass class B(object): pass print(A.__bases__) print(B.__bases__) haypo at selma$ python3 y.py (,) (,) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 12:52:57 2017 From: report at bugs.python.org (Tristan Croll) Date: Thu, 09 Mar 2017 17:52:57 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 In-Reply-To: <1488991650.0.0.826679402246.issue29758@psf.upfronthosting.co.za> Message-ID: <1489081977.55.0.0540217662697.issue29758@psf.upfronthosting.co.za> Tristan Croll added the comment: Sorry - ignore that. Brain-fart at the end of a (very) long day. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 13:28:55 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 09 Mar 2017 18:28:55 +0000 Subject: [issue29769] pkgutil._iter_file_finder_modules should not be fooled by *.py folders In-Reply-To: <1489059970.36.0.419253660084.issue29769@psf.upfronthosting.co.za> Message-ID: <1489084135.16.0.564662004697.issue29769@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 13:36:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 18:36:04 +0000 Subject: [issue29773] Additional float-from-string tests In-Reply-To: <1489072142.51.0.122050091916.issue29773@psf.upfronthosting.co.za> Message-ID: <1489084564.31.0.928657529122.issue29773@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +483 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 13:36:39 2017 From: report at bugs.python.org (Eryk Sun) Date: Thu, 09 Mar 2017 18:36:39 +0000 Subject: [issue26744] print() function hangs on MS-Windows 10 In-Reply-To: <1460512669.99.0.0354506250162.issue26744@psf.upfronthosting.co.za> Message-ID: <1489084599.53.0.111219707336.issue26744@psf.upfronthosting.co.za> Eryk Sun added the comment: > After enabling `QuickEdit Mode`, then click the console will > suspend the program. That's not suspending the entire process. It's blocking the thread that writes to the console. The user-mode WriteConsole function is implemented by a synchronous NtDeviceIoControlFile system call. The console (i.e. conhost.exe) is on the other end of the call. It has at least 2 threads -- an input thread that's basically a standard message loop and an output thread for updating and rendering the contents of its active screen buffer. It's a feature that clicking on the console window to copy text causes its output thread to block. This in turn prevents WriteFile in python.exe from completing. That said, I've seen random hangs in the console that are unrelated to the above (e.g. hanging while reflowing text), but not often enough that I bothered to investigate it. There's a lot of new code in the 2nd generation console implementation (ConhostV2.dll) in Windows 10, and the developers are making significant improvements with each update. I'm waiting for the dust to settle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 13:37:52 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 09 Mar 2017 18:37:52 +0000 Subject: [issue29751] PyLong_FromString documentation wrong on numbers with leading zero and base=0 In-Reply-To: <1488922068.27.0.463542328186.issue29751@psf.upfronthosting.co.za> Message-ID: <1489084672.1.0.495730125602.issue29751@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: PyLong_FromString fails on decimals with leading zero and base=0 -> PyLong_FromString documentation wrong on numbers with leading zero and base=0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 13:39:07 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 09 Mar 2017 18:39:07 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 In-Reply-To: <1488991650.0.0.826679402246.issue29758@psf.upfronthosting.co.za> Message-ID: <1489084747.31.0.130259908259.issue29758@psf.upfronthosting.co.za> Brett Cannon added the comment: Since it sounds like everything on the Python side is fine I'm closing this. ---------- nosy: +brett.cannon resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 13:41:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 18:41:27 +0000 Subject: [issue29773] Additional float-from-string tests In-Reply-To: <1489072142.51.0.122050091916.issue29773@psf.upfronthosting.co.za> Message-ID: <1489084887.97.0.284155782995.issue29773@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +484 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 13:51:24 2017 From: report at bugs.python.org (Tristan Croll) Date: Thu, 09 Mar 2017 18:51:24 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 In-Reply-To: <1488991650.0.0.826679402246.issue29758@psf.upfronthosting.co.za> Message-ID: <1489085484.03.0.317992132778.issue29758@psf.upfronthosting.co.za> Tristan Croll added the comment: I don't agree that it should be closed yet. I still have the issue that an approach that was perfectly legal in Python 3.5 now no longer works in Python 3.6, and I don't know why. The description in msg289281 stands, and is a real problem. Nothing has changed in my code - I compile against Python 3.5 and it works, against 3.6 it doesn't. ---------- resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 13:51:35 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 09 Mar 2017 18:51:35 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1489085495.87.0.133085722599.issue28298@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +485 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 14:03:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 19:03:50 +0000 Subject: [issue29773] Additional float-from-string tests In-Reply-To: <1489072142.51.0.122050091916.issue29773@psf.upfronthosting.co.za> Message-ID: <1489086230.95.0.250392296154.issue29773@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 14:11:32 2017 From: report at bugs.python.org (Tristan Croll) Date: Thu, 09 Mar 2017 19:11:32 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 In-Reply-To: <1488991650.0.0.826679402246.issue29758@psf.upfronthosting.co.za> Message-ID: <1489086692.73.0.00346379210738.issue29758@psf.upfronthosting.co.za> Tristan Croll added the comment: I've cross-posted the following to the SWIG bug tracker. Hopefully someone can find an answer, because I'm getting nowhere. If I have two classes Foo and Bar (where Bar has a function get_foo() that returns a Foo object) defined in the SWIG-generated library foobar, and wrap them as follows: ``` def mappedclass(old_cls): ''' Ensures that objects returned from functions in the clipper_core library are instantiated in Python as the derived class with the extra functionality. ''' def decorator(cls): def __newnew__(thiscls, *args, **kwargs): if thiscls == old_cls: return object.__new__(cls) return object.__new__(thiscls) old_cls.__new__ = __newnew__ return cls return decorator @mappedclass(foobar.Foo) class Foo(foobar.Foo): pass @mappedclass(foobar.Bar) class Bar(foobar.Bar): def get_foo(self): return super(Bar, self).get_foo() ``` then in Python 3.5: ``` f = Foo() b = Bar() b.get_foo() ``` all work. In Python 3.6: ``` f = Foo() b = Bar() ``` ... both work, but `b.get_foo()` yields the error as per my OP. Real-world examples: Constructor (works without trouble in both versions) ``` SWIGINTERN PyObject *_wrap_new_Cell_descr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; clipper::Cell_descr *result = 0 ; if(!PyArg_UnpackTuple(args,(char *)"new_Cell_descr",0,0)) SWIG_fail; { try { result = (clipper::Cell_descr *)new clipper::Cell_descr(); } catch (clipper::Message_fatal m) { SWIG_exception(SWIG_RuntimeError, m.text().c_str() ); SWIG_fail; } catch (std::out_of_range e) { const char *errString; if ( !strcmp(e.what(), "" ) ) { errString = "Index out of range!"; } else { errString = e.what(); } SWIG_exception(SWIG_IndexError, errString ); SWIG_fail; } catch (std::length_error e) { SWIG_exception(SWIG_ValueError, e.what() ); SWIG_fail; } catch (std::invalid_argument e) { SWIG_exception(SWIG_ValueError, e.what() ); SWIG_fail; } catch (std::exception e) { SWIG_exception(SWIG_UnknownError, e.what() ); SWIG_fail; } catch (...) { SWIG_exception(SWIG_UnknownError, "Unknown error" ); SWIG_fail; } } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_clipper__Cell_descr, SWIG_POINTER_NEW | 0 ); return resultobj; fail: return NULL; } ``` Getter (fails under the above conditions): ``` SWIGINTERN PyObject *_wrap_Cell_cell_descr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; clipper::Cell *arg1 = (clipper::Cell *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; clipper::Cell_descr result; if(!PyArg_UnpackTuple(args,(char *)"Cell_cell_descr",1,1,&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_clipper__Cell, 0 | 0 ); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cell_cell_descr" "', argument " "1"" of type '" "clipper::Cell *""'"); } arg1 = reinterpret_cast< clipper::Cell * >(argp1); { try { result = clipper_Cell_cell_descr(arg1); } catch (clipper::Message_fatal m) { SWIG_exception(SWIG_RuntimeError, m.text().c_str() ); SWIG_fail; } catch (std::out_of_range e) { const char *errString; if ( !strcmp(e.what(), "" ) ) { errString = "Index out of range!"; } else { errString = e.what(); } SWIG_exception(SWIG_IndexError, errString ); SWIG_fail; } catch (std::length_error e) { SWIG_exception(SWIG_ValueError, e.what() ); SWIG_fail; } catch (std::invalid_argument e) { SWIG_exception(SWIG_ValueError, e.what() ); SWIG_fail; } catch (std::exception e) { SWIG_exception(SWIG_UnknownError, e.what() ); SWIG_fail; } catch (...) { SWIG_exception(SWIG_UnknownError, "Unknown error" ); SWIG_fail; } } resultobj = SWIG_NewPointerObj((new clipper::Cell_descr(static_cast< const clipper::Cell_descr& >(result))), SWIGTYPE_p_clipper__Cell_descr, SWIG_POINTER_OWN | 0 ); return resultobj; fail: return NULL; } ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 15:09:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 20:09:28 +0000 Subject: [issue29776] Modernize properties In-Reply-To: <1489079402.47.0.435152463031.issue29776@psf.upfronthosting.co.za> Message-ID: <1489090168.84.0.400350737199.issue29776@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have checked and none from replaced function is used. But just for the case I reverted changes for Lib/xml/dom/. Here used more complex logic for generating other properties. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 15:14:57 2017 From: report at bugs.python.org (Ned Deily) Date: Thu, 09 Mar 2017 20:14:57 +0000 Subject: [issue29775] There appears to be a spurious ^0 in sys.version for 3.6.1rc1 In-Reply-To: <1489076723.99.0.3863763672.issue29775@psf.upfronthosting.co.za> Message-ID: <1489090497.33.0.955922405867.issue29775@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Paul, we are aware of the spurious ^0. It will be resolved under Issue 25793. ---------- priority: release blocker -> resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Deprecate sys._mercurial and create sys._git _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 15:35:40 2017 From: report at bugs.python.org (Alan Evangelista) Date: Thu, 09 Mar 2017 20:35:40 +0000 Subject: [issue29777] argparse arguments in main parser hide an argument in subparser Message-ID: <1489091740.64.0.424181036659.issue29777@psf.upfronthosting.co.za> New submission from Alan Evangelista: If you have a argument named -- in a subparser and two arguments named -- in the main parser and call the Python executable with python -- argparse fails with: error: ambiguous option: -- could match --, -- This probably happens due to how the argument abbreviation parsing is implemented. Is it possible to support disabling argument abbreviation in Python 2.7, as it is done in Python 3? ---------- components: Library (Lib) messages: 289327 nosy: Alan Evangelista priority: normal severity: normal status: open title: argparse arguments in main parser hide an argument in subparser versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 16:34:55 2017 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 09 Mar 2017 21:34:55 +0000 Subject: [issue29777] argparse arguments in main parser hide an argument in subparser In-Reply-To: <1489091740.64.0.424181036659.issue29777@psf.upfronthosting.co.za> Message-ID: <1489095295.91.0.192945015973.issue29777@psf.upfronthosting.co.za> Eric V. Smith added the comment: No, we won't be adding new features to 2.7. Sorry. ---------- nosy: +eric.smith resolution: -> rejected stage: -> resolved type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 17:11:17 2017 From: report at bugs.python.org (Christian Heimes) Date: Thu, 09 Mar 2017 22:11:17 +0000 Subject: [issue29765] 2.7.12 compile error from ssl related In-Reply-To: <1489021220.48.0.868281972312.issue29765@psf.upfronthosting.co.za> Message-ID: <1489097477.28.0.381180179345.issue29765@psf.upfronthosting.co.za> Christian Heimes added the comment: /usr/local looks wrong. Did you install a custom build of OpenSSL? What's the output of rpm -qf /usr/local/include/openssl/asn1.h ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 17:38:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Mar 2017 22:38:48 +0000 Subject: [issue19974] tarfile doesn't overwrite symlink by directory In-Reply-To: <1386935948.7.0.893963676407.issue19974@psf.upfronthosting.co.za> Message-ID: <1489099128.33.0.659485484169.issue19974@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 19:16:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 00:16:09 +0000 Subject: [issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183) In-Reply-To: <1472046228.4.0.176948453237.issue27850@psf.upfronthosting.co.za> Message-ID: <1489104969.88.0.134075020916.issue27850@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 20:00:16 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 10 Mar 2017 01:00:16 +0000 Subject: [issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183) In-Reply-To: <1472046228.4.0.176948453237.issue27850@psf.upfronthosting.co.za> Message-ID: <1489107616.81.0.688284445836.issue27850@psf.upfronthosting.co.za> Larry Hastings added the comment: I've accepted PR 224. I don't plan an emergency release of 3.4 to get this change out into the world. Unless there's any other business, we can now close this issue. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 20:26:58 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 10 Mar 2017 01:26:58 +0000 Subject: [issue29752] Enum._missing_ not called for __getattr__ failures In-Reply-To: <1488925792.17.0.971645599389.issue29752@psf.upfronthosting.co.za> Message-ID: <1489109218.94.0.891888430011.issue29752@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Yeah, that sounds fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 20:53:20 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 10 Mar 2017 01:53:20 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1489110800.53.0.212089689676.issue29319@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue 29723 is a follow up issue to this one, where these changes revealed some latent defects in how sys.path[0] was being initialised in general for directory and zipfile execution (those defects mean the change committed here adds an extra directory to sys.path when *not* running in isolated mode). Paul, are you in a position to rebuild 3.6 with the changes from https://github.com/python/cpython/pull/575 and indicate whether or not that still fixes the original problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 21:04:13 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 10 Mar 2017 02:04:13 +0000 Subject: [issue29769] pkgutil._iter_file_finder_modules should not be fooled by *.py folders In-Reply-To: <1489059970.36.0.419253660084.issue29769@psf.upfronthosting.co.za> Message-ID: <1489111453.59.0.248184516971.issue29769@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think there's an open issue somewhere pointing out that _iter_file_finder doesn't handle PEP 420 namespace packages correctly, precisely because it's still looking for an __init__.py file. So I'd suggest not worry about changing the __init__.py handling here, and instead just add a new test case to test_pkgutil that fails with the old traversal code and passes with the new code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 9 23:58:18 2017 From: report at bugs.python.org (Tibor Csonka) Date: Fri, 10 Mar 2017 04:58:18 +0000 Subject: [issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath Message-ID: <1489121898.66.0.224917416789.issue29778@psf.upfronthosting.co.za> New submission from Tibor Csonka: When Py_SetPath is used to set up module path at initialization, the Py_SetPath causes getpathp.c::calculate_path not to be called. However, calculate path is the only function calling getpathp.c::get_progpath which initializes the local dllpath static variable. Later the interpreter tries to load python3.dll and uses dllpath which is empty by default. This empty path gets joined with \python3.dll and \DLLs\python3.dll which is used in the LoadLibraryExW resulting in loading python3.dll from the root location of the windows drive the application is running from. The behavior was reproduced using PyInstaller but it is present in any embedding application which uses Py_SetPath. ---------- components: Windows messages: 289334 nosy: Tibor Csonka, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 00:11:13 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 10 Mar 2017 05:11:13 +0000 Subject: [issue29770] Executable help output (--help) at commandline is wrong for option -B In-Reply-To: <1489063792.65.0.00439171993212.issue29770@psf.upfronthosting.co.za> Message-ID: <1489122673.35.0.79722029944.issue29770@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +486 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 01:04:47 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 10 Mar 2017 06:04:47 +0000 Subject: [issue29679] Add @contextlib.asynccontextmanager In-Reply-To: <1488324069.16.0.696570474408.issue29679@psf.upfronthosting.co.za> Message-ID: <1489125887.16.0.3256970954.issue29679@psf.upfronthosting.co.za> Nick Coghlan added the comment: For anyone interested in the question of backports, I moved that discussion over to the contextlib2 tracker: https://github.com/jazzband/contextlib2/issues/12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 01:14:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 06:14:23 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1489126463.31.0.939222372507.issue28298@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Oren. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 01:24:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 06:24:42 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489127082.59.0.925165927094.issue15988@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch no longer applied cleanly (in particular to arraymodule.c). Oren, could you please update it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 02:02:39 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 10 Mar 2017 07:02:39 +0000 Subject: [issue28739] PEP 498: docstrings as f-strings In-Reply-To: <1479501831.35.0.531195928426.issue28739@psf.upfronthosting.co.za> Message-ID: <1489129359.28.0.0964063917806.issue28739@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +487 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 02:07:17 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 10 Mar 2017 07:07:17 +0000 Subject: [issue28739] PEP 498: docstrings as f-strings In-Reply-To: <1479501831.35.0.531195928426.issue28739@psf.upfronthosting.co.za> Message-ID: <1489129637.44.0.477258088331.issue28739@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi, I updated the documentation mentioning that f-strings cannot be used as docstring. Please review it. Thanks. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 02:07:48 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 10 Mar 2017 07:07:48 +0000 Subject: [issue28739] PEP 498: docstrings as f-strings In-Reply-To: <1479501831.35.0.531195928426.issue28739@psf.upfronthosting.co.za> Message-ID: <1489129668.09.0.974103767238.issue28739@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 02:18:24 2017 From: report at bugs.python.org (Wolfgang Maier) Date: Fri, 10 Mar 2017 07:18:24 +0000 Subject: [issue17062] An os.walk inspired replacement for pkgutil.walk_packages In-Reply-To: <1359371828.89.0.768628623008.issue17062@psf.upfronthosting.co.za> Message-ID: <1489130304.56.0.269466077352.issue17062@psf.upfronthosting.co.za> Changes by Wolfgang Maier : ---------- nosy: +wolma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 02:18:37 2017 From: report at bugs.python.org (Wolfgang Maier) Date: Fri, 10 Mar 2017 07:18:37 +0000 Subject: [issue19821] pydoc.ispackage() could be more accurate In-Reply-To: <1385625330.82.0.952141123031.issue19821@psf.upfronthosting.co.za> Message-ID: <1489130317.62.0.203263101309.issue19821@psf.upfronthosting.co.za> Changes by Wolfgang Maier : ---------- nosy: +wolma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 02:18:52 2017 From: report at bugs.python.org (Wolfgang Maier) Date: Fri, 10 Mar 2017 07:18:52 +0000 Subject: [issue29258] __init__.py required for pkgutil.walk_packages in python3 In-Reply-To: <1484282874.75.0.69511180509.issue29258@psf.upfronthosting.co.za> Message-ID: <1489130332.92.0.747465730768.issue29258@psf.upfronthosting.co.za> Changes by Wolfgang Maier : ---------- nosy: +wolma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 02:26:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 07:26:04 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489130764.0.0.155408111751.issue28685@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The issue shouldn't be closed until it resolved or rejected. I like the idea, and benchmarking results for randomized lists look nice. But could you please run benchmarks for already sorted lists? ---------- nosy: +serhiy.storchaka stage: resolved -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 02:37:04 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 10 Mar 2017 07:37:04 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1489131424.74.0.828824726275.issue20087@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Do you believe this program should work? import locale, os for l in open("/usr/share/i18n/SUPPORTED"): alias, encoding = l.strip().split() locale.setlocale(locale.LC_ALL, alias) try: enc = locale.getlocale()[1] except ValueError: continue # not in table normalized = enc.replace("ISO", "ISO-"). \ replace("_", "-"). \ replace("euc", "EUC-"). \ replace("big5", "big5-").upper() assert normalized == locale.nl_langinfo(locale.CODESET) After my change it does?the encoding returned from getlocale() is the one actually being used by glibc. It fails dramatically on earlier versions of Python (for example on the en_IN example from #29571.) I don't understand why Python needs to editorialize whatever choices libc or the system administrator has made. Is getlocale() expected to return something different from the underlying C locale? In fact, why have this table at all instead of using nl_langinfo to return the encoding for the current locale? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 02:40:03 2017 From: report at bugs.python.org (Levi Sabah) Date: Fri, 10 Mar 2017 07:40:03 +0000 Subject: [issue29779] New environment variable PYTHONHISTORY Message-ID: <1489131603.26.0.135268292164.issue29779@psf.upfronthosting.co.za> Changes by Levi Sabah <0xl3vi at gmail.com>: ---------- nosy: 0xl3vi priority: normal pull_requests: 488 severity: normal status: open title: New environment variable PYTHONHISTORY versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 03:07:37 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 10 Mar 2017 08:07:37 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1489133257.54.0.0837750590005.issue28298@psf.upfronthosting.co.za> Oren Milman added the comment: Thanks for the reviews :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 03:10:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 08:10:24 +0000 Subject: [issue29779] New environment variable PYTHONHISTORY Message-ID: <1489133424.79.0.6086605998.issue29779@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $HISTFILE is the name of the file in which Bash command history is saved. Shouldn't the name of similar environment variable for Python be PYTHONHISTFILE? Bash uses several environment variables for control its command history: HISTCONTROL, HISTFILE, HISTFILESIZE, HISTIGNORE, HISTSIZE, HISTTIMEFORMAT. Does Python need corresponding environment variables? Wouldn't be better to control all these details by Python code in .pythonrc.py rather than by environment variables? For example I have the following code in my .pythonrc.py: if sys.version_info < (3,): try: import readline, os, atexit histfile = os.path.join(os.path.expanduser("~"), ".python2_history") try: readline.read_history_file(histfile) except IOError: pass atexit.register(readline.write_history_file, histfile) del os, histfile except ImportError: pass ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 03:29:17 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Mar 2017 08:29:17 +0000 Subject: [issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6 In-Reply-To: <1428585495.21.0.103830054834.issue23894@psf.upfronthosting.co.za> Message-ID: <1489134557.18.0.526472427393.issue23894@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I don't think we'll fix it for 3.5 anymore but it's definitely worth doing so for 3.6.1. Ned, I have a patch, will upload momentarily. I'd like this to go in 3.6.1 since without it fixed tools depending on lib2to3 will crash seeing f-strings. This includes YAPF, a pretty widely used auto-formatter for Python code. The fix is relatively trivial. What do you think? ---------- nosy: +lukasz.langa, ned.deily title: lib2to3 doesn't recognize rb'...' as a raw byte string in Python 3 -> lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6 versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 04:08:15 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Mar 2017 09:08:15 +0000 Subject: [issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6 In-Reply-To: <1428585495.21.0.103830054834.issue23894@psf.upfronthosting.co.za> Message-ID: <1489136895.42.0.482443648457.issue23894@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- pull_requests: +489 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 04:31:34 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Mar 2017 09:31:34 +0000 Subject: [issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6 In-Reply-To: <1428585495.21.0.103830054834.issue23894@psf.upfronthosting.co.za> Message-ID: <1489138294.48.0.271546317499.issue23894@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- assignee: -> lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 04:31:42 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 10 Mar 2017 09:31:42 +0000 Subject: [issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6 In-Reply-To: <1428585495.21.0.103830054834.issue23894@psf.upfronthosting.co.za> Message-ID: <1489138302.09.0.699418414098.issue23894@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 04:47:54 2017 From: report at bugs.python.org (Keyvan Hedayati) Date: Fri, 10 Mar 2017 09:47:54 +0000 Subject: [issue29780] Interpreter hang on self._epoll.poll(timeout, max_ev) Message-ID: <1489139274.42.0.877186515769.issue29780@psf.upfronthosting.co.za> New submission from Keyvan Hedayati: Hello We have an issue with our application, it randomly hangs and doesn't respond to new requests, at first we thought the problem lies within our code but after attaching to hanged process using gdb I couldn't find any code related to our application so I thought it might be python bug. Here is the info extracted from gdb: https://gist.github.com/k1-hedayati/96e28bf590c4392840650902cb5eceda Python 3.5.2 We run multiple instances of our application and they are fine for a couple of days/hours but suddenly one of them starts hanging and others follow and unfortunately we can't reproduce the problem. I'll be glad to receive any advice on how to solve or debug this issue. ---------- components: asyncio messages: 289344 nosy: gvanrossum, k1.hedayati, yselivanov priority: normal severity: normal status: open title: Interpreter hang on self._epoll.poll(timeout, max_ev) type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 04:54:01 2017 From: report at bugs.python.org (Wolfgang Maier) Date: Fri, 10 Mar 2017 09:54:01 +0000 Subject: [issue29258] __init__.py required for pkgutil.walk_packages in python3 In-Reply-To: <1484282874.75.0.69511180509.issue29258@psf.upfronthosting.co.za> Message-ID: <1489139641.59.0.995460492195.issue29258@psf.upfronthosting.co.za> Wolfgang Maier added the comment: While it is rather trivial to implement the proposed functionality - all that's required here is to eliminate the check for __init__.py from pkgutil._iter_file_finder_modules - this would have undesired impacts on, e.g., pydoc.apropos: This function would then recursively report *any* directory/subdirectory on sys.path, which is quite surely not what people want. I think this is a fundamental problem with namespace packages: they are nice and flexible for specific imports, but they make it impossible to know whether a directory found on the filesystem is *intended* as a Python package or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 05:03:04 2017 From: report at bugs.python.org (Cory Benfield) Date: Fri, 10 Mar 2017 10:03:04 +0000 Subject: [issue29781] SSLObject.version returns incorrect value before handshake. Message-ID: <1489140184.21.0.804659104334.issue29781@psf.upfronthosting.co.za> New submission from Cory Benfield: The SSLObject object from the ssl module has a version() method that is undocumented. A reasonable assumption for the behaviour of that method is that it would follow the behaviour of the same method on SSLSocket(), which has the following documentation: > Return the actual SSL protocol version negotiated by the connection as > a string, or None is no secure connection is established. As of this > writing, possible return values include "SSLv2", "SSLv3", "TLSv1", > "TLSv1.1" and "TLSv1.2". Recent OpenSSL versions may define more return > values. However, SSLObject does not follow that behaviour: Python 3.6.0 (default, Jan 18 2017, 18:08:34) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ssl >>> ctx = ssl.create_default_context() >>> in_bio = ssl.MemoryBIO() >>> out_bio = ssl.MemoryBIO() >>> buffers = ctx.wrap_bio(in_bio, out_bio) >>> buffers.version() 'TLSv1.2' That is, a SSLObject that does not have a TLS session established will incorrectly report that it is using a TLS version. This method should return None in this case. ---------- assignee: christian.heimes components: SSL messages: 289346 nosy: Lukasa, christian.heimes priority: normal severity: normal status: open title: SSLObject.version returns incorrect value before handshake. versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 05:05:46 2017 From: report at bugs.python.org (Wolfgang Maier) Date: Fri, 10 Mar 2017 10:05:46 +0000 Subject: [issue29258] __init__.py required for pkgutil.walk_packages in python3 In-Reply-To: <1484282874.75.0.69511180509.issue29258@psf.upfronthosting.co.za> Message-ID: <1489140346.27.0.00575962095047.issue29258@psf.upfronthosting.co.za> Wolfgang Maier added the comment: > all that's required here is to eliminate the check for __init__.py from pkgutil._iter_file_finder_modules Ok, I was exaggerating here. To do it right would require a more complex change, but that's all that's needed to get an estimate of the effect the real thing would have. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 05:07:44 2017 From: report at bugs.python.org (Cory Benfield) Date: Fri, 10 Mar 2017 10:07:44 +0000 Subject: [issue29781] SSLObject.version returns incorrect value before handshake. In-Reply-To: <1489140184.21.0.804659104334.issue29781@psf.upfronthosting.co.za> Message-ID: <1489140464.99.0.974089222055.issue29781@psf.upfronthosting.co.za> Cory Benfield added the comment: A quick test reveals that Python 3.5 is also affected. ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 05:24:25 2017 From: report at bugs.python.org (Paul Moore) Date: Fri, 10 Mar 2017 10:24:25 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1489141465.96.0.60668063684.issue29319@psf.upfronthosting.co.za> Paul Moore added the comment: Nick (or Steve) can you explain how I'd do that? I have a git checkout of the 3.6 branch that I can build. But, how do I merge in the changes from https://github.com/python/cpython/pull/575? The PR seems to be against master, so I'm not sure how to apply it to another branch (I'm not even sure how to apply it to my copy of master, TBH!) Whatever I do need to do doesn't seem to be in the devguide, although I may be missing it. Maybe there should be a section in there on how to do common tasks like this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 05:29:00 2017 From: report at bugs.python.org (Cory Benfield) Date: Fri, 10 Mar 2017 10:29:00 +0000 Subject: [issue29781] SSLObject.version returns incorrect value before handshake. In-Reply-To: <1489140184.21.0.804659104334.issue29781@psf.upfronthosting.co.za> Message-ID: <1489141740.19.0.481084892619.issue29781@psf.upfronthosting.co.za> Cory Benfield added the comment: This actually appears to be an outcome of OpenSSL's logic. I've attached a smallish C file that, when run against OpenSSL 1.0.2 on my machine, prints "TLSv1.2". This seems like a behaviour we'll have to work around in Python to get the outcome we want here. ---------- Added file: http://bugs.python.org/file46715/test.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 05:41:59 2017 From: report at bugs.python.org (Shuo Li) Date: Fri, 10 Mar 2017 10:41:59 +0000 Subject: [issue29767] build python failed on test_socket due to unused_port is actually used. In-Reply-To: <1489031660.84.0.964088839039.issue29767@psf.upfronthosting.co.za> Message-ID: <1489142519.98.0.60026704831.issue29767@psf.upfronthosting.co.za> Shuo Li added the comment: The error message is just a "Port already used". Possible cause 1: find_port default interface is HOST, which is 127.0.0.1. And in most test cases, they use 0.0.0.0. So they are on different interface. 2: system reuse the port, since I build python on a busy server, that is possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 05:43:45 2017 From: report at bugs.python.org (Cory Benfield) Date: Fri, 10 Mar 2017 10:43:45 +0000 Subject: [issue29781] SSLObject.version returns incorrect value before handshake. In-Reply-To: <1489140184.21.0.804659104334.issue29781@psf.upfronthosting.co.za> Message-ID: <1489142625.66.0.626152420677.issue29781@psf.upfronthosting.co.za> Cory Benfield added the comment: I updated the test script to try with a file-descriptor set and OpenSSL returns TLSv1.2 for that one as well. This strongly suggests that OpenSSL's SSL_get_version documentation is somewhat misleading, and that an SSL object will return a version even when it's not connected. If Python wants to consider this a bug, it will need to track connections state for the SSLObject like it does for the SSLSocket. Otherwise, Python can redocument version for SSLObject to say that it will always return a value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 05:53:57 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Fri, 10 Mar 2017 10:53:57 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available Message-ID: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> New submission from Niklas Fiekas: Baseline performance (9e6ac83acae): $ ./python -m timeit "12345678 == 12345678.0" 5000000 loops, best of 5: 40 nsec per loop $ ./python -m timeit "1 == 1.0" 10000000 loops, best of 5: 38.8 nsec per loop $ ./python -m timeit "(1234578987654321).bit_length()" 10000000 loops, best of 5: 39.4 nsec per loop Upcoming PR: $ ./python -m timeit "12345678 == 12345678.0" 10000000 loops, best of 5: 34.3 nsec per loop $ ./python -m timeit "1 == 1.0" 10000000 loops, best of 5: 34.4 nsec per loop $ ./python -m timeit "(1234578987654321).bit_length()" 10000000 loops, best of 5: 36.4 nsec per loop ---------- components: Interpreter Core messages: 289353 nosy: niklasf priority: normal severity: normal status: open title: Use __builtin_clzl for bits_in_digit if available type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 05:58:59 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Fri, 10 Mar 2017 10:58:59 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1489143539.6.0.242246039531.issue29782@psf.upfronthosting.co.za> Changes by Niklas Fiekas : ---------- pull_requests: +490 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 06:10:48 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 10 Mar 2017 11:10:48 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1489144248.19.0.246696250991.issue29782@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 06:20:15 2017 From: report at bugs.python.org (Mircea Cosbuc) Date: Fri, 10 Mar 2017 11:20:15 +0000 Subject: [issue29478] email.policy.Compat32(max_line_length=None) not as documented In-Reply-To: <1486548645.73.0.926739197467.issue29478@psf.upfronthosting.co.za> Message-ID: <1489144815.39.0.0569434302256.issue29478@psf.upfronthosting.co.za> Changes by Mircea Cosbuc : ---------- pull_requests: +491 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 06:26:49 2017 From: report at bugs.python.org (Shuo Li) Date: Fri, 10 Mar 2017 11:26:49 +0000 Subject: [issue29767] build python failed on test_socket due to unused_port is actually used. In-Reply-To: <1489031660.84.0.964088839039.issue29767@psf.upfronthosting.co.za> Message-ID: <1489145209.14.0.031417224995.issue29767@psf.upfronthosting.co.za> Shuo Li added the comment: Another error message: Unhandled exception in thread started by > Traceback (most recent call last): File "/tmp/python3.6/Python-3.6.0/Lib/test/test_socket.py", line 293, in clientRun self.clientTearDown() File "/tmp/python3.6/Python-3.6.0/Lib/test/test_socket.py", line 4379, in clientTearDown self.cli.close() AttributeError: 'NetworkConnectionAttributesTest' object has no attribute 'cli' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 06:33:20 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 10 Mar 2017 11:33:20 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489145600.04.0.154987974046.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: of course :) but some time has passed, so i would re-check stuff, and run tests etc., so it would probably take me some time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 06:37:44 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 10 Mar 2017 11:37:44 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1489145864.94.0.547036877247.issue29319@psf.upfronthosting.co.za> Nick Coghlan added the comment: If you append ".patch" to a GitHub PR URL, it will give you a patch file that can be applied to any branch with "git apply". In this case, the rendered patch is at https://patch-diff.githubusercontent.com/raw/python/cpython/pull/575.patch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 07:25:33 2017 From: report at bugs.python.org (Paul Moore) Date: Fri, 10 Mar 2017 12:25:33 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1489148733.6.0.716883251463.issue29319@psf.upfronthosting.co.za> Paul Moore added the comment: OK, cool, thanks. I was sort of hoping for a way to just pull&merge direct from the PR (patches on Windows tend to be fiddly due to EOL issues), but I can go with old-style :-) Yes, with that patch applied it still works fine (I copied python3.dll and python36.dll from the build into the existing embedded distribution, which I guess is all I needed to do - I don't know how to build a full embedded distribution file, but I can't see that would make any difference). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 07:37:20 2017 From: report at bugs.python.org (Alan Evangelista) Date: Fri, 10 Mar 2017 12:37:20 +0000 Subject: [issue29777] argparse arguments in main parser hide an argument in subparser In-Reply-To: <1489091740.64.0.424181036659.issue29777@psf.upfronthosting.co.za> Message-ID: <1489149440.18.0.572881911177.issue29777@psf.upfronthosting.co.za> Alan Evangelista added the comment: Adding the feature was just a workaround suggestion, but this is a bug. Arguments in the main parser should not "hide" an argument in a subparser in argument abbreviation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 08:07:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 13:07:24 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1489151244.45.0.864594614644.issue29741@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I would accept changes to Modules/_io/ because I consider them as code cleanup (with little side effect). But I'm not sure about changes to Python implementation and tests. Could you create more narrow PR for Modules/_io/ changes and left other changes for the consideration of the io module maintainers? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 08:16:59 2017 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 10 Mar 2017 13:16:59 +0000 Subject: [issue29777] argparse arguments in main parser hide an argument in subparser In-Reply-To: <1489091740.64.0.424181036659.issue29777@psf.upfronthosting.co.za> Message-ID: <1489151819.58.0.0235350393316.issue29777@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- resolution: rejected -> stage: resolved -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 08:33:08 2017 From: report at bugs.python.org (Thomas Guettler) Date: Fri, 10 Mar 2017 13:33:08 +0000 Subject: [issue29612] TarFile.extract() suffers from hard links inside tarball In-Reply-To: <1487671846.82.0.103027933595.issue29612@psf.upfronthosting.co.za> Message-ID: <1489152788.45.0.131656834623.issue29612@psf.upfronthosting.co.za> Thomas Guettler added the comment: I have the same issue on Python 2.7.12 (Ubuntu 16.04) I tried to execute tartest.py. But I could not find a way how to create the tar which is needed for tartest.py. ---------- nosy: +guettli _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 08:57:44 2017 From: report at bugs.python.org (Alex Gaynor) Date: Fri, 10 Mar 2017 13:57:44 +0000 Subject: [issue23606] ctypes.util.find_library("c") no longer makes sense In-Reply-To: <1425789670.0.0.736264667252.issue23606@psf.upfronthosting.co.za> Message-ID: <1489154264.86.0.670175815846.issue23606@psf.upfronthosting.co.za> Alex Gaynor added the comment: An FYI for the future, it would have been very helpful if this had been documented in the whats-changed file for 3.5. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:17:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 14:17:29 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() Message-ID: <1489155449.02.0.609817047168.issue29783@psf.upfronthosting.co.za> New submission from STINNER Victor: The codecs.StreamReaderWriter() class still has old unfixed issues like the issue #12508 (open since 2011). This issue is even seen as a security vulnerability by the owasp-pysec project: https://github.com/ebranca/owasp-pysec/wiki/Unicode-string-silently-truncated I propose to modify codecs.open() to reuse the io module: call io.open() with newline=''. The io module is now battle-tested and handles well many corner cases of incremental codecs with multibyte encodings. With this change, codecs.open() cannot be used with non-text encodings... but I'm not sure that this feature ever worked in Python 3: $ ./python -bb Python 3.7.0a0 >>> import codecs >>> f = codecs.open('test', 'w', encoding='rot13') >>> f.write('hello') TypeError: a bytes-like object is required, not 'str' >>> f.write(b'hello') TypeError: a bytes-like object is required, not 'dict' The next step would be to deprecate the codecs.StreamReaderWriter class and the codecs.open(). But my latest attempt to deprecate them was the PEP 400 and it wasn't a full success, so I now prefer to move step by step :-) Attached PR: * Modify codecs.open() to use io.open() * Remove "; use codecs.open() to handle arbitrary codecs" from io.open() and _pyio.open() error messages * Replace codecs.open() with open() at various places ---------- components: Unicode messages: 289362 nosy: ezio.melotti, haypo, lemburg, serhiy.storchaka priority: normal severity: normal status: open title: Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:20:09 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 10 Mar 2017 14:20:09 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1489155609.22.0.0405588012027.issue29319@psf.upfronthosting.co.za> Steve Dower added the comment: That will work fine. Thanks for checking The process for pulling someone's PR into your own repo is roughly branch then pull from the repo sending the PR. Github should show instructions for this under m hidden behind a "merge manually" button (though you want to skip the final push that would complete the merge, obviously). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:23:36 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 10 Mar 2017 14:23:36 +0000 Subject: [issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath In-Reply-To: <1489121898.66.0.224917416789.issue29778@psf.upfronthosting.co.za> Message-ID: <1489155816.49.0.728782814913.issue29778@psf.upfronthosting.co.za> Steve Dower added the comment: I thought we'd documented that if you set the path when embedding you should also set the program name, but perhaps not (didn't check just now). If not, we should do that. We shouldn't be loading python3.dll anywhere. Are you sure that's in CPython? Do you have a reference to the source file? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:27:33 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 10 Mar 2017 14:27:33 +0000 Subject: [issue23606] ctypes.util.find_library("c") no longer makes sense In-Reply-To: <1425789670.0.0.736264667252.issue23606@psf.upfronthosting.co.za> Message-ID: <1489156053.02.0.72153624632.issue23606@psf.upfronthosting.co.za> Steve Dower added the comment: Noted. Did this bite you somehow? Is there something else that should be added/changed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:29:01 2017 From: report at bugs.python.org (Alex Gaynor) Date: Fri, 10 Mar 2017 14:29:01 +0000 Subject: [issue23606] ctypes.util.find_library("c") no longer makes sense In-Reply-To: <1425789670.0.0.736264667252.issue23606@psf.upfronthosting.co.za> Message-ID: <1489156141.55.0.78390604458.issue23606@psf.upfronthosting.co.za> Alex Gaynor added the comment: Yeah, this got me (happy to explain what I was trying to do in more detail, if it'd be helpful), took me longer to understand why my tests passed on {26,27,33,34} but failed on 35 since the public "what's changed" docs page is where I went to. Ultimately I discovered the root cause when I started reading the find_library() source code, and found this issue :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:33:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 14:33:11 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() In-Reply-To: <1489155449.02.0.609817047168.issue29783@psf.upfronthosting.co.za> Message-ID: <1489156391.73.0.135070139744.issue29783@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: codecs.open() works with bytes-to-bytes codecs. >>> f = codecs.open('test1', 'w', encoding='hex_codec') >>> f.write(b'hello') >>> f.close() >>> open('test1', 'rb').read() b'68656c6c6f' In additional the interface of StreamReaderWriter is not fully compatible with the interface of io classes. This would be compatible-breaking change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:37:25 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 10 Mar 2017 14:37:25 +0000 Subject: [issue29478] email.policy.Compat32(max_line_length=None) not as documented In-Reply-To: <1486548645.73.0.926739197467.issue29478@psf.upfronthosting.co.za> Message-ID: <1489156645.8.0.46661410799.issue29478@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the PR. However, rereading this: since compat32 is providing backward compatibility with the behavior of the python 3.2 email package, we need to check what it would do in this situation before changing the behavior. What we may need instead is a doc fix, unfortunately :(. But a test for this is needed either way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:42:04 2017 From: report at bugs.python.org (Paul Moore) Date: Fri, 10 Mar 2017 14:42:04 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1489156924.36.0.97450939303.issue29319@psf.upfronthosting.co.za> Paul Moore added the comment: Thanks for that Steve. I had a recollection that there's a way of referencing the PR itself as a branch within the main repo (I guess it must *be* a branch, as how otherwise would github be able to do things like get Travis to build it?) but I don't recall the details. Hmm, a bit of googling later I found https://help.github.com/articles/checking-out-pull-requests-locally/ git fetch origin pull/ID/head:BRANCHNAME And indeed that works - I checked out Nick's patch like that. I'd still need to merge it into the 3.6 branch, which is another set of git commands I don't yet know (cherry-pick, maybe?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:44:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 14:44:08 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() In-Reply-To: <1489155449.02.0.609817047168.issue29783@psf.upfronthosting.co.za> Message-ID: <1489157048.44.0.140701086651.issue29783@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +492 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:44:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 14:44:14 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() In-Reply-To: <1489155449.02.0.609817047168.issue29783@psf.upfronthosting.co.za> Message-ID: <1489157054.84.0.836475522852.issue29783@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +493 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:45:51 2017 From: report at bugs.python.org (Maxime Buquet) Date: Fri, 10 Mar 2017 14:45:51 +0000 Subject: [issue29784] Erroneous link in shutil.copy description Message-ID: <1489157151.86.0.545519035584.issue29784@psf.upfronthosting.co.za> New submission from Maxime Buquet: https://docs.python.org/3/library/shutil.html#shutil.copy The link to "copy()" in the description seems to be pointing to the copy module, but I suppose it was meant to point at shutil.copy. ---------- assignee: docs at python components: Documentation messages: 289370 nosy: docs at python, pep. priority: normal severity: normal status: open title: Erroneous link in shutil.copy description _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:47:40 2017 From: report at bugs.python.org (ada) Date: Fri, 10 Mar 2017 14:47:40 +0000 Subject: [issue29765] 2.7.12 compile error from ssl related In-Reply-To: <1489021220.48.0.868281972312.issue29765@psf.upfronthosting.co.za> Message-ID: <1489157260.6.0.260443190596.issue29765@psf.upfronthosting.co.za> ada added the comment: The output is: [root at root local]# rpm -qf /usr/local/include/openssl/asn1.h file /usr/local/include/openssl/asn1.h is not owned by any package ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:52:38 2017 From: report at bugs.python.org (Maxime Buquet) Date: Fri, 10 Mar 2017 14:52:38 +0000 Subject: [issue29785] Registration link sent via email by the tracker is http Message-ID: <1489157558.36.0.800169235988.issue29785@psf.upfronthosting.co.za> New submission from Maxime Buquet: The link[1] sent via email by the tracker for registration confirmation is http, whereas https is already setup on the tracker itself. Would it be possible to change it to https. [1] http://bugs.python.org/?@action=confrego&otk=TOKEN ---------- components: Demos and Tools messages: 289372 nosy: pep. priority: normal severity: normal status: open title: Registration link sent via email by the tracker is http _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 09:53:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 14:53:11 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() In-Reply-To: <1489155449.02.0.609817047168.issue29783@psf.upfronthosting.co.za> Message-ID: <1489157591.97.0.417387498502.issue29783@psf.upfronthosting.co.za> STINNER Victor added the comment: > codecs.open() works with bytes-to-bytes codecs. Oh ok. What are non-text encodings? I found: * base64 * bz2 * hex * quopri * rot13 * uu * zlib It seems like all these codecs can be used with codecs.open() to write bytes strings, except of rot13. Last time I used these codecs was at least 5 years ago. When I ported code to Python 3, I used directly the module implementing the codecs (like base64 module for base64 codec). It's easy to write code working on Python 2 and Python 3 when using directly the module. > In additional the interface of StreamReaderWriter is not fully compatible with the interface of io classes. StreamReaderWriter has 3 addition attributes: reader, writer and stream. Do you expect that these attributes are used in the wild? I expect that the most common uses of codecs.open() are to read or write text files. The question is if it is easy to update the code for the rare cases using codecs.open() for other purposes. And if it is possible to write code working on Python 2.7 and 3.7. > This would be compatible-breaking change. It's deliberate, this issue breaks the backward compatibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 10:09:55 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 10 Mar 2017 15:09:55 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() In-Reply-To: <1489155449.02.0.609817047168.issue29783@psf.upfronthosting.co.za> Message-ID: <69886c48-0d2f-3f91-7457-41043ddcb1ac@egenix.com> Marc-Andre Lemburg added the comment: On 10.03.2017 15:17, STINNER Victor wrote: > > The codecs.StreamReaderWriter() class still has old unfixed issues like the issue #12508 (open since 2011). This issue is even seen as a security vulnerability by the owasp-pysec project: > https://github.com/ebranca/owasp-pysec/wiki/Unicode-string-silently-truncated The issue should be fixed. Patches welcome :-) The reason for the problem is the UTF-8 decoder (and other decoders) expecting an extension to the codec decoder API, which are not implemented in its StreamReader class (it simply uses the base class). It's not a problem of the base class, but that of the codec. And no: it doesn't have anything to do with codec.open() or the StreamReaderWriter class. > I propose to modify codecs.open() to reuse the io module: call io.open() with newline=''. The io module is now battle-tested and handles well many corner cases of incremental codecs with multibyte encodings. -1. People who want to use the io module should use it directly. > With this change, codecs.open() cannot be used with non-text encodings... but I'm not sure that this feature ever worked in Python 3: > > $ ./python -bb > Python 3.7.0a0 >>>> import codecs >>>> f = codecs.open('test', 'w', encoding='rot13') >>>> f.write('hello') > TypeError: a bytes-like object is required, not 'str' >>>> f.write(b'hello') > TypeError: a bytes-like object is required, not 'dict' That's a bug in the rot13 codec, not a feature. codec.open() works just find with 'hex' and 'base64'. > The next step would be to deprecate the codecs.StreamReaderWriter class and the codecs.open(). But my latest attempt to deprecate them was the PEP 400 and it wasn't a full success, so I now prefer to move step by step :-) I'm still -1 on the deprecations in PEP 400. You are essentially suggesting to replace the complete codecs subsystem with the io module, but forgetting that all codecs use StreamWriter and StreamReader as base classes. StreamReaderWriter is just an amalgamation of the two classes StreamReader and StreamWriter, nothing more. It's a completely harmless class in the codecs.py. The codecs sub system has a clean design. If used correctly and maintained with more care, it works really well. Trying to rip things out won't make it better. Fixing implementations, where the appropriate care was not applied, is a much better strategy. I'm tired of having to fight these fights every few years. Can't we just stop having them, please ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 10:11:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 15:11:45 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() In-Reply-To: <1489155449.02.0.609817047168.issue29783@psf.upfronthosting.co.za> Message-ID: <1489158705.54.0.207796689698.issue29783@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I agree that it is better to use directly the module implementing the codecs. But old third-party code still can use non-text codecs. There should be good reasons for breaking backward compatibility. Wouldn't be better to deprecate codecs.open()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 10:15:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 15:15:39 +0000 Subject: [issue29786] asyncio.wrap_future() is not documented Message-ID: <1489158939.82.0.933594898276.issue29786@psf.upfronthosting.co.za> New submission from STINNER Victor: The following asyncio function is not documented. Is it deliberate? The function is exported in the asyncio module. def wrap_future(future, *, loop=None): """Wrap concurrent.futures.Future object.""" ---------- assignee: docs at python components: Documentation, asyncio messages: 289376 nosy: docs at python, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: asyncio.wrap_future() is not documented versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 10:29:14 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 10 Mar 2017 15:29:14 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1489131424.74.0.828824726275.issue20087@psf.upfronthosting.co.za> Message-ID: <816bda54-4026-5da6-c4c3-6e4b168b99df@egenix.com> Marc-Andre Lemburg added the comment: On 10.03.2017 08:37, Benjamin Peterson wrote: > > Do you believe this program should work? > > import locale, os > for l in open("/usr/share/i18n/SUPPORTED"): > alias, encoding = l.strip().split() > locale.setlocale(locale.LC_ALL, alias) > try: > enc = locale.getlocale()[1] > except ValueError: > continue # not in table > normalized = enc.replace("ISO", "ISO-"). \ > replace("_", "-"). \ > replace("euc", "EUC-"). \ > replace("big5", "big5-").upper() > assert normalized == locale.nl_langinfo(locale.CODESET) > > After my change it does?the encoding returned from getlocale() is the one actually being used by glibc. It fails dramatically on earlier versions of Python (for example on the en_IN example from #29571.) I don't understand why Python needs to editorialize whatever choices libc or the system administrator has made. Your program essentially tests what alias is configured on your particular system. It will fail on older systems (with a different or no version of SUPPORTED), it will fail on systems that do not have all locales installed, it will fail on systems that use the X.org aliases table as basis rather than some list of supported locales of glibc, or custom alias tables. What we want in Python is a consistent mapping of aliases to locales across all (Unix based) Python installations, just like what we have for encoding aliases and those mappings should be taken from a support alias database, not a list of default installations on some glibc version. Also note that a lot of these discussions are really academic, since locales should always be specified with encoding. While Unix gravitates to UTF-8 for all system related things, users still use other encodings a lot for their daily operations, as you can see in the X.org aliases file. This is why defaulting to UTF-8 for locales (as e.g. is done for many locales in the glibc default installs) is not a good idea. Locales affect user work products. What's fine for command line interfacing or piping, is not necessarily for fine for e.g. documents created by users. So to answer your question: No, I don't believe that SUPPORTED has any authority for our purposes and thus don't think that the program can be considered a valid test case. The SUPPORTED file can server as extra resource for fixing bugs in the table, but nothing more. > Is getlocale() expected to return something different from the underlying C locale? getlocale() will return whatever is currently configured via setlocale(). Of course, it can return something different from what some glibc SUPPORTED lists as default installation encoding, if you don't provide the encoding when using setlocale(), but it will always default to the same locale and encoding on all platforms where you run Python. > In fact, why have this table at all instead of using nl_langinfo to return the encoding for the current locale? The table is meant to normalize locale names and enrich them with default encodings from a well known database of such aliases, where necessary. As mentioned above the locale setting should ideally include the encoding as well, so that any such guesses are not necessary. Regarding nl_langinfo(): nl_langinfo() will only work if you have called setlocale() already, since a process always starts up in the C locale without this call. If you don't have a problem with calling setlocale() for testing the default locale settings (e.g. Python is not embedded, you don't have other threads running, no APIs which use locale information called yet, setlocale() was already called to setup the locale, etc.), you can use the approach taken by getpreferredencoding(), which is to temporarily set the locale to the default. Going forward, I think that the following changes make sense: * from ISO8859-1 to ISO8859-15 (the -15 version adds the Euro sign) * casing changes e.g. 'zh_CN.gb2312' to 'zh_CN.GB2312' * fixes which undo removal of modifiers such as 'uz_uz at cyrillic' -> 'uz_UZ.UTF-8' to 'uz_UZ.UTF-8 at cyrillic' As for the other changes: please undo them and also revert the unconditional use of glibc mappings overriding the X.org ones, as mentioned earlier in the thread. We can readd some of the modifications later on if there's evidence that they actually do make sense. Thanks, -- Marc-Andre Lemburg eGenix.com ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 10:41:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 15:41:50 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() In-Reply-To: <69886c48-0d2f-3f91-7457-41043ddcb1ac@egenix.com> Message-ID: STINNER Victor added the comment: > The reason for the problem is the UTF-8 decoder (and other > decoders) expecting an extension to the codec decoder API, > which are not implemented in its StreamReader class (it simply > uses the base class). It's not a problem of the base class, but > that of the codec. > > And no: it doesn't have anything to do with codec.open() > or the StreamReaderWriter class. open("document.txt", encoding="utf-8") uses IncrementalDecoder of encodings.utf_8. This object doesn't seem to have the discussed issue. IMHO the issue is that StreamReader doesn't use an incremental decoder. I don't see how it could support multibyte encodings and error handlers without an incremental decoder. I like TextIOWrapper design between it only handles codecs and text buffering. Bytes buffering is done at lower-level in a different object. I'm not confortable to modify StreamReader because it combines TextIOWrapper with BufferedReader and so is more complex. >> I propose to modify codecs.open() to reuse the io module: call io.open() with newline=''. The io module is now battle-tested and handles well many corner cases of incremental codecs with multibyte encodings. > > -1. People who want to use the io module should use it directly. When porting code to Python 3, many people chose to use codecs.open() to get text files using a single code base for Python 2 and Python 3. Once the code is ported, I don't expect that anyone will replace codecs.open() with io.open(). You know, nobody cares of the technical debt... >> The next step would be to deprecate the codecs.StreamReaderWriter class and the codecs.open(). But my latest attempt to deprecate them was the PEP 400 and it wasn't a full success, so I now prefer to move step by step :-) > > I'm still -1 on the deprecations in PEP 400. You are essentially > suggesting to replace the complete codecs subsystem with the > io module, but forgetting that all codecs use StreamWriter and > StreamReader as base classes. You can elaborate on "all codecs use StreamWriter and StreamReader as base classes". Only codecs.open() uses StreamReader and StreamWriter, no? All codecs implement a StreamReader and StreamWriter class, but my question is how use these classes? > The codecs sub system has a clean design. If used correctly > and maintained with more care, it works really well. It seems like we lack such maintainer, since I wrote the PEP, many issues are still open: http://bugs.python.org/issue7262 http://bugs.python.org/issue8630 http://bugs.python.org/issue10344 http://bugs.python.org/issue12508 http://bugs.python.org/issue12512 See also issue #5445 (wontfix, whereas TextIOWrapper.writeslines() uses "for line in lines") and issue #12513 (this one is not fair, io also has the same bug: issue #12215 :-)). > I'm tired of having to fight these fights every few years. > Can't we just stop having them, please ? The status quo is to do nothing, but as a consequence, bugs are still not fixed yet, and users are still affected by these bugs :-( I'm trying to find a solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 10:46:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 15:46:26 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() In-Reply-To: <1489158705.54.0.207796689698.issue29783@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Serhiy Storchaka added the comment: > I agree that it is better to use directly the module implementing the codecs. But old third-party code still can use non-text codecs. > > There should be good reasons for breaking backward compatibility. Wouldn't be better to deprecate codecs.open()? I'm not sure that I understood. Do you consider that using codecs.open() with a non-text codecs is a "legit" use case or not? I understood that you suggest a smoother transition using a deprecation to give more time to developers to update their code. But what do you want to deprecate? The whole codecs.open() function? Or using non-text codecs with codecs.open()? Or using text codecs with codecs.open()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 10:48:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 15:48:10 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() In-Reply-To: <1489155449.02.0.609817047168.issue29783@psf.upfronthosting.co.za> Message-ID: <1489160890.68.0.766086380494.issue29783@psf.upfronthosting.co.za> STINNER Victor added the comment: About the issue #12508, would it be possible to modify StreamReader to use an incremental decoder? Or my idea doesn't make sense? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 10:50:57 2017 From: report at bugs.python.org (Ulrich Petri) Date: Fri, 10 Mar 2017 15:50:57 +0000 Subject: [issue29787] Internal importlib frames visible when module imported by import_module throws exception Message-ID: <1489161057.85.0.765402774015.issue29787@psf.upfronthosting.co.za> New submission from Ulrich Petri: Importing a module that raises an exception on import trough `importlib.import_module()` causes importlib to not strip it's internal frames from the traceback. Minimal example: --a.py-- import importlib importlib.import_module("b") --a.py-- --b.py-- raise Exception() --b.py-- #~ python3.6 a.py Traceback (most recent call last): File "a.py", line 3, in importlib.import_module("b") File "/Users/ulo/.pythonz/pythons/CPython-3.6.0/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 978, in _gcd_import File "", line 961, in _find_and_load File "", line 950, in _find_and_load_unlocked File "", line 655, in _load_unlocked File "", line 678, in exec_module File "", line 205, in _call_with_frames_removed File "/Users/ulo/t/b.py", line 1, in raise Exception() Exception ---------- messages: 289381 nosy: ulope priority: normal severity: normal status: open title: Internal importlib frames visible when module imported by import_module throws exception type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 10:51:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 15:51:28 +0000 Subject: [issue16258] test_local.TestEnUSCollection failures on Solaris 10 In-Reply-To: <1350440395.6.0.0364005495024.issue16258@psf.upfronthosting.co.za> Message-ID: <1489161088.55.0.304057389881.issue16258@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: May be issue15954 is related to this issue. Is this issue still reproduced? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 10:53:07 2017 From: report at bugs.python.org (Mircea Cosbuc) Date: Fri, 10 Mar 2017 15:53:07 +0000 Subject: [issue29478] email.policy.Compat32(max_line_length=None) not as documented In-Reply-To: <1486548645.73.0.926739197467.issue29478@psf.upfronthosting.co.za> Message-ID: <1489161187.21.0.293193832541.issue29478@psf.upfronthosting.co.za> Mircea Cosbuc added the comment: Thanks for the prompt feedback. In Python 3.2, the closest equivalent for the illustrated issue I could find is: >>> from email.message import Message >>> from email.generator import Generator >>> from sys import stdout >>> m = Message() >>> m["Field"] = "x" * 100 >>> g0 = Generator(stdout, maxheaderlen=0) >>> gn = Generator(stdout, maxheaderlen=None) >>> g0.flatten(m) Field: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >>> gn.flatten(m) Field: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx It may be the case that a documentation change is all that is needed. I'm not sure that this change would break compatibility since `max_line_length=None` for the policy is not the default value. Please advise further if I should just update the documentation and modify the test to guard for future changes. ---------- nosy: +mcosbuc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 10:53:46 2017 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 10 Mar 2017 15:53:46 +0000 Subject: [issue29786] asyncio.wrap_future() is not documented In-Reply-To: <1489158939.82.0.933594898276.issue29786@psf.upfronthosting.co.za> Message-ID: <1489161226.61.0.0779804421731.issue29786@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 11:00:19 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 10 Mar 2017 16:00:19 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489161619.61.0.604019334189.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: Paul Moore reporting on trying out the new PR in http://bugs.python.org/issue29319#msg289357 and confirmed that it still solves the originally reported problem in issue 29319. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 11:00:48 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 10 Mar 2017 16:00:48 +0000 Subject: [issue29478] email.policy.Compat32(max_line_length=None) not as documented In-Reply-To: <1486548645.73.0.926739197467.issue29478@psf.upfronthosting.co.za> Message-ID: <1489161648.44.0.499578818581.issue29478@psf.upfronthosting.co.za> R. David Murray added the comment: So what happens when you do that same operation in 3.5/6 with your change in place? Does the behavior change? (I haven't looked back at the code to see if I think it will :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 11:01:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 16:01:12 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1489161672.27.0.919422458241.issue20087@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm feeling there is something wrong with the current locale design. See issues issue504219, issue10466, issue20088, issue25191, issue29571. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 11:05:28 2017 From: report at bugs.python.org (Mircea Cosbuc) Date: Fri, 10 Mar 2017 16:05:28 +0000 Subject: [issue29478] email.policy.Compat32(max_line_length=None) not as documented In-Reply-To: <1486548645.73.0.926739197467.issue29478@psf.upfronthosting.co.za> Message-ID: <1489161928.48.0.478601684106.issue29478@psf.upfronthosting.co.za> Mircea Cosbuc added the comment: Just to be sure, I performed the same operations with my changes in place, there's no change in behaviour. I think it's expected since I only modified how the Compat32 policy passes `max_line_length` to the header class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 11:13:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 16:13:44 +0000 Subject: [issue29788] Add absolute_path option to tarfile, disabled by default Message-ID: <1489162424.66.0.632437535873.issue29788@psf.upfronthosting.co.za> New submission from STINNER Victor: I noticed that "python3 -m tarfile -x archive.tar" uses absolute paths by default, whereas the UNIX tar command doesn't by default. The UNIX tar command requires to add explicitly --absolute-paths (-P) option. I suggest to add a boolean absolute_path option to tarfile, disabled by default. Example to create such archive. See that tar also removes "/" by default and requires to pass explicitly -P: $ cd $HOME # /home/haypo $ echo TEST > test $ tar -cf test.tar /home/haypo/test tar: Removing leading `/' from member names $ rm -f test.tar $ tar -P -cf test.tar /home/haypo/test $ rm -f test Extracting such archive using tar is safe *by default*: $ mkdir z $ cd z $ tar -xf ~/test.tar tar: Removing leading `/' from member names $ find . ./home ./home/haypo ./home/haypo/test Extracting such archive using Python is unsafe: $ python3 -m tarfile -e ~/test.tar $ cat ~/test TEST $ pwd /home/haypo/z Python creates files outside the current directory which is unsafe, wheras tar doesn't. ---------- messages: 289388 nosy: haypo priority: normal severity: normal status: open title: Add absolute_path option to tarfile, disabled by default type: security versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 11:13:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 16:13:58 +0000 Subject: [issue29788] tarfile: Add absolute_path option to tarfile, disabled by default In-Reply-To: <1489162424.66.0.632437535873.issue29788@psf.upfronthosting.co.za> Message-ID: <1489162438.74.0.668025765331.issue29788@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Library (Lib) title: Add absolute_path option to tarfile, disabled by default -> tarfile: Add absolute_path option to tarfile, disabled by default _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 11:14:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 16:14:55 +0000 Subject: [issue29789] zipfile: Add absolute_path option, disabled by default Message-ID: <1489162495.01.0.911543004747.issue29789@psf.upfronthosting.co.za> New submission from STINNER Victor: Same issue than tarfile issue #29788, but on zipfile. I suggest to add a boolean absolute_path option to zipfile, disabled by default. ---------- components: Library (Lib) messages: 289389 nosy: haypo priority: normal severity: normal status: open title: zipfile: Add absolute_path option, disabled by default type: security versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 11:17:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 16:17:40 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() In-Reply-To: <1489155449.02.0.609817047168.issue29783@psf.upfronthosting.co.za> Message-ID: <1489162660.81.0.0687037339314.issue29783@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think using codecs.open() with a non-text codecs is a legit use case, but is not the best way. I suggest: 1) Encourage of using io.open() rather than codecs.open() for text encodings. codecs.open() was recommended way since it worked in all Python versions, including <2.6, but now we can ignore this advantage. 2) Discourage of using non-text codecs. 3) Deprecate codecs.open() (may be after EOL for Python 2.7). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 11:19:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 16:19:26 +0000 Subject: [issue29789] zipfile: Add absolute_path option, disabled by default In-Reply-To: <1489162495.01.0.911543004747.issue29789@psf.upfronthosting.co.za> Message-ID: <1489162766.39.0.35526025406.issue29789@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is this issue exists on zipfile? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 11:36:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 16:36:40 +0000 Subject: [issue29789] zipfile: Add absolute_path option, disabled by default In-Reply-To: <1489162495.01.0.911543004747.issue29789@psf.upfronthosting.co.za> Message-ID: <1489163800.82.0.0650313010195.issue29789@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, it seems like zipfile is not affected by the issue, only tarfile. The documentation is correct: https://docs.python.org/dev/library/zipfile.html#zipfile.ZipFile.extract You can test using attached test2.zip. haypo at selma$ python3 -m zipfile -l ~/test2.zip File Name Modified Size /home/haypo/test 2017-03-10 17:29:06 5 haypo at selma$ cd $HOME haypo at selma$ rm -rf z/ haypo at selma$ mkdir z haypo at selma$ cd z haypo at selma$ python3 -m zipfile -e ~/test2.zip . haypo at selma$ find . ./home ./home/haypo ./home/haypo/test haypo at selma$ cat ~/test cat: /home/haypo/test: No such file or directory ---------- resolution: -> not a bug stage: -> resolved status: open -> closed Added file: http://bugs.python.org/file46716/test2.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 11:59:50 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 10 Mar 2017 16:59:50 +0000 Subject: [issue28739] PEP 498: docstrings as f-strings In-Reply-To: <1479501831.35.0.531195928426.issue28739@psf.upfronthosting.co.za> Message-ID: <1489165190.99.0.60733912801.issue28739@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +494 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 12:00:13 2017 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 10 Mar 2017 17:00:13 +0000 Subject: [issue17062] An os.walk inspired replacement for pkgutil.walk_packages In-Reply-To: <1359371828.89.0.768628623008.issue17062@psf.upfronthosting.co.za> Message-ID: <1489165213.82.0.499939272125.issue17062@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 12:13:33 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 10 Mar 2017 17:13:33 +0000 Subject: [issue29784] Erroneous link in shutil.copy description In-Reply-To: <1489157151.86.0.545519035584.issue29784@psf.upfronthosting.co.za> Message-ID: <1489166013.41.0.677524903455.issue29784@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +495 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 12:15:05 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 10 Mar 2017 17:15:05 +0000 Subject: [issue29784] Erroneous link in shutil.copy description In-Reply-To: <1489157151.86.0.545519035584.issue29784@psf.upfronthosting.co.za> Message-ID: <1489166105.27.0.213172550393.issue29784@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for your report, Maxime! I open PRs to fix it. ---------- nosy: +xiang.zhang versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 12:19:36 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 10 Mar 2017 17:19:36 +0000 Subject: [issue29784] Erroneous link in shutil.copy description In-Reply-To: <1489157151.86.0.545519035584.issue29784@psf.upfronthosting.co.za> Message-ID: <1489166376.18.0.523947631224.issue29784@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +496 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 12:19:55 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Fri, 10 Mar 2017 17:19:55 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1489130764.0.0.155408111751.issue28685@psf.upfronthosting.co.za> Message-ID: Elliot Gorokhovsky added the comment: On Fri, Mar 10, 2017 at 12:26 AM Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > The issue shouldn't be closed until it resolved or rejected. > Ya, sorry about that. This is my first time contributing. > > I like the idea, and benchmarking results for randomized lists look nice. > But could you please run benchmarks for already sorted lists? > David Mertz asked for the same thing on python-ideas. Here's what I replied (you can also find these numbers in my pull request description): *** You are entirely correct, as the benchmarks below demonstrate. I used the benchmark lists from Objects/listsort.txt, which are: \sort: descending data /sort: ascending data 3sort: ascending, then 3 random exchanges +sort: ascending, then 10 random at the end %sort: ascending, then randomly replace 1% of elements w/ random values ~sort: many duplicates =sort: all equal My results are below (the script can be found at https://github.com/embg/python-fastsort-benchmark/blob/master/bench-structured.py ): Homogeneous ([int]): \sort: 54.6% /sort: 56.5% 3sort: 53.5% +sort: 55.3% %sort: 52.4% ~sort: 48.0% =sort: 45.2% Heterogeneous ([int]*n + [0.0]): \sort: -17.2% /sort: -19.8% 3sort: -18.0% +sort: -18.8% %sort: -10.0% ~sort: -2.1% =sort: -21.3% As you can see, because there's a lot less non-comparison overhead in the structured lists, the impact of the optimization is much greater, both in performance gain and in worst-case cost. However, I would argue that these data do not invalidate the utility of my patch: the probability of encountering a type-heterogeneous list is certainly less than 5% in practice. So the expected savings, even for structured lists, is something like (5%)(-20%) + (95%)(50%) = 46.5%. And, of course, not *all* the lists one encounters in practice are structured; certainly not *this* structured. So, overall, I would say the numbers above are extremely encouraging. Thanks for pointing out the need for this benchmark, though! *** Thanks for the feedback! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 12:26:07 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 10 Mar 2017 17:26:07 +0000 Subject: [issue29784] Erroneous link in shutil.copy description In-Reply-To: <1489157151.86.0.545519035584.issue29784@psf.upfronthosting.co.za> Message-ID: <1489166767.56.0.456916231022.issue29784@psf.upfronthosting.co.za> Xiang Zhang added the comment: Assigned to Mariatta :-). ---------- assignee: docs at python -> Mariatta nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 12:26:08 2017 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 10 Mar 2017 17:26:08 +0000 Subject: [issue29780] Interpreter hang on self._epoll.poll(timeout, max_ev) In-Reply-To: <1489139274.42.0.877186515769.issue29780@psf.upfronthosting.co.za> Message-ID: <1489166768.61.0.624353424895.issue29780@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 12:46:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 17:46:14 +0000 Subject: [issue29784] Erroneous link in shutil.copy description In-Reply-To: <1489157151.86.0.545519035584.issue29784@psf.upfronthosting.co.za> Message-ID: <1489167974.09.0.433965502986.issue29784@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue21818. I suspect there are other incorrect references. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 12:58:02 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 10 Mar 2017 17:58:02 +0000 Subject: [issue28739] PEP 498: docstrings as f-strings In-Reply-To: <1479501831.35.0.531195928426.issue28739@psf.upfronthosting.co.za> Message-ID: <1489168682.36.0.416135520908.issue28739@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks for reviewing, Serhiy and Eric. Documentation has been updated and backported to 3.6. OK to close this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 13:08:55 2017 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 10 Mar 2017 18:08:55 +0000 Subject: [issue28739] PEP 498: docstrings as f-strings In-Reply-To: <1479501831.35.0.531195928426.issue28739@psf.upfronthosting.co.za> Message-ID: <1489169335.53.0.373594385851.issue28739@psf.upfronthosting.co.za> Eric V. Smith added the comment: Yes, I think it can be closed. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 13:12:56 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 10 Mar 2017 18:12:56 +0000 Subject: [issue28739] PEP 498: docstrings as f-strings In-Reply-To: <1479501831.35.0.531195928426.issue28739@psf.upfronthosting.co.za> Message-ID: <1489169576.83.0.463085117125.issue28739@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 13:19:17 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 10 Mar 2017 18:19:17 +0000 Subject: [issue29758] Previously-working SWIG code fails in Python 3.6 In-Reply-To: <1488991650.0.0.826679402246.issue29758@psf.upfronthosting.co.za> Message-ID: <1489169957.95.0.191175929167.issue29758@psf.upfronthosting.co.za> Brett Cannon added the comment: Please keep this issue closed until you hear back from the SWIG team. Just because your code worked under Python 3.5 doesn't mean SWIG didn't accidentally emit something that breaks under Python 3.6 because we started being more stringent about something. Basically unless we have C code (and not SWIG or C++ code) to reproduce this then we have to go on the assumption it's a problem on SWIG's side. ---------- resolution: -> third party status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 13:20:03 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 10 Mar 2017 18:20:03 +0000 Subject: [issue29258] __init__.py required for pkgutil.walk_packages in python3 In-Reply-To: <1484282874.75.0.69511180509.issue29258@psf.upfronthosting.co.za> Message-ID: <1489170003.14.0.00242037852271.issue29258@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 13:25:57 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 10 Mar 2017 18:25:57 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1489170357.61.0.670783613102.issue29782@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the idea, and the PR! To be useful, this would need a bit of tweaking: we can't assume that a digit is always `unsigned long` (in fact, I'd expect that to be rare on 64-bit non-Windows systems, where `unsigned long` typically has 64 bits, and `digit` should be using a 32-bit type), so we'd need to identify and use the most appropriate variant of clz/clzl/clzll somehow. I think it would also make sense to move the detection of the existence of `__builtin_clz` and friends into the configuration machinery: these builtins aren't just restricted to GCC (clang supports them as well), and that would allow other platforms to provide their own substitutes by modifying `pyport.h`. Ideally, the configuration machinery #defines a HAVE_CLZ variable, and then in longobject.c we do an #ifdef HAVE_CLZ ... We also need to trade-off the additional complication in the implementation against the benefits: though we do certainly care about the speed, speed at all costs isn't the target here; readability, portability and maintainability of the source counts, too. It'll probably be easier to weigh those factors once there's an implementation that addresses the above points. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 13:52:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 18:52:27 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1489171947.58.0.584435870463.issue29782@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think we can assume that digit is no larger than unsigned long, otherwise PyLong_AsLong() and like wouldn't work. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 13:54:06 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 10 Mar 2017 18:54:06 +0000 Subject: [issue29779] New environment variable PYTHONHISTORY In-Reply-To: <1489133424.79.0.6086605998.issue29779@psf.upfronthosting.co.za> Message-ID: <1489172046.14.0.799935394811.issue29779@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 13:57:13 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 10 Mar 2017 18:57:13 +0000 Subject: [issue29779] New environment variable PYTHONHISTORY In-Reply-To: <1489133424.79.0.6086605998.issue29779@psf.upfronthosting.co.za> Message-ID: <1489172233.81.0.123965062281.issue29779@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I don't think the Python envar has to follow the contraction from bash. $PYTHONHISTORY reads very nicely. I have similar code in my $PYTHONSTARTUP, but it would be nice to be able to get rid of it and just let Python do the common thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 14:43:32 2017 From: report at bugs.python.org (=?utf-8?q?Adam_H=C3=B6se?=) Date: Fri, 10 Mar 2017 19:43:32 +0000 Subject: [issue24755] asyncio.wrap_future undocumented In-Reply-To: <1438250618.09.0.00442439827356.issue24755@psf.upfronthosting.co.za> Message-ID: <1489175012.7.0.97462388141.issue24755@psf.upfronthosting.co.za> Changes by Adam H?se : ---------- pull_requests: +497 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 14:45:40 2017 From: report at bugs.python.org (=?utf-8?q?Adam_H=C3=B6se?=) Date: Fri, 10 Mar 2017 19:45:40 +0000 Subject: [issue29786] asyncio.wrap_future() is not documented In-Reply-To: <1489158939.82.0.933594898276.issue29786@psf.upfronthosting.co.za> Message-ID: <1489175140.69.0.222196180545.issue29786@psf.upfronthosting.co.za> Adam H?se added the comment: While fixing this issue I found that it's a duplicate of issue 24755. ---------- nosy: +adisbladis pull_requests: +498 type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 14:48:51 2017 From: report at bugs.python.org (Marco Buttu) Date: Fri, 10 Mar 2017 19:48:51 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1489175331.69.0.0997782489789.issue27200@psf.upfronthosting.co.za> Changes by Marco Buttu : ---------- pull_requests: +499 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 14:49:59 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 10 Mar 2017 19:49:59 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1489175399.64.0.273221933264.issue29782@psf.upfronthosting.co.za> Mark Dickinson added the comment: True enough. It looks as though someone (*cough*) already documented that restriction, too: https://github.com/mdickinson/cpython/blob/v3.6.0/Include/longintrepr.h#L28-L30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 14:54:47 2017 From: report at bugs.python.org (Christian Heimes) Date: Fri, 10 Mar 2017 19:54:47 +0000 Subject: [issue29765] 2.7.12 compile error from ssl related In-Reply-To: <1489021220.48.0.868281972312.issue29765@psf.upfronthosting.co.za> Message-ID: <1489175687.22.0.617014595579.issue29765@psf.upfronthosting.co.za> Christian Heimes added the comment: You have some custom, unsupported version of OpenSSL installed in /usr/local. That custom version is not compatible with Python 2.7.12. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 15:09:01 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Fri, 10 Mar 2017 20:09:01 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1489176541.4.0.758981082936.issue29782@psf.upfronthosting.co.za> Niklas Fiekas added the comment: Thanks for the review. I pushed a change to check if clz can be used (`sizeof(digit) <= sizeof(unsigned int)`). Otherwise use clzl. I believe the latter should be the most common, since unsigned long has 32bits. As you say unsigned long long should never be needed. Btw. mathmodule.c currently duplicates the function: https://github.com/python/cpython/blob/master/Modules/mathmodule.c#L1317. It might be worth factoring it out, but I don't know where to put it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 15:12:03 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Fri, 10 Mar 2017 20:12:03 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1489176723.54.0.920129766801.issue29782@psf.upfronthosting.co.za> Niklas Fiekas added the comment: Oops. Actually clz should commonly be enough. And platforms where clz and clzl are different (<=> unsigned int and unsigned long are different) should be rare. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 15:21:50 2017 From: report at bugs.python.org (Matt Bogosian) Date: Fri, 10 Mar 2017 20:21:50 +0000 Subject: [issue29760] tarfile chokes on reading .tar file with no entries (but does fine if the same file is bzip2'ed) In-Reply-To: <1489001529.94.0.345849682069.issue29760@psf.upfronthosting.co.za> Message-ID: <1489177310.15.0.422045850682.issue29760@psf.upfronthosting.co.za> Matt Bogosian added the comment: I'm not sure if it helps at this point, but I've tried several "flavors" of apparently legit tar files with zero entries. All fail. ``tarfile`` module: ``` $ ( set -x ; cd /tmp || exit 1 ; python -V ; rm -fv test.tar ; python -c 'import os, tarfile ; fd = os.open("test.tar", os.O_WRONLY | os.O_CREAT | os.O_EXCL) ; f = os.fdopen(fd, "w") ; f = tarfile.open("test.tar", "w", f) ; f.close() ; f = tarfile.open("test.tar") ; print("okay so far; calling f.next()...") ; f.next()' ; openssl dgst -sha256 test.tar ; rm -fv test.tar ) +/bin/zsh:496> cd /tmp +/bin/zsh:496> python -V Python 2.7.13 +/bin/zsh:496> rm -v -fv test.tar +/bin/zsh:496> python -c 'import os, tarfile ; fd = os.open("test.tar", os.O_WRONLY | os.O_CREAT | os.O_EXCL) ; f = os.fdopen(fd, "w") ; f = tarfile.open("test.tar", "w", f) ; f.close() ; f = tarfile.open("test.tar") ; print("okay so far; calling f.next()...") ; f.next()' okay so far; calling f.next()... Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2350, in next self.fileobj.seek(self.offset - 1) IOError: [Errno 22] Invalid argument +/bin/zsh:496> openssl dgst -sha256 test.tar SHA256(test.tar)= 84ff92691f909a05b224e1c56abb4864f01b4f8e3c854e4bb4c7baf1d3f6d652 +/bin/zsh:496> rm -v -fv test.tar test.tar ``` BSD tar (OS X): ``` $ ( set -x ; cd /tmp || exit 1 ; tar --version ; rm -fv test.tar ; tar -cf test.tar -T /dev/null ; python -c 'import tarfile ; f = tarfile.open("test.tar") ; print("okay so far; calling f.next()...") ; f.next()' ; openssl dgst -sha256 test.tar ; rm -fv test.tar ) +/bin/zsh:499> cd /tmp +/bin/zsh:499> tar --version bsdtar 2.8.3 - libarchive 2.8.3 +/bin/zsh:499> rm -v -fv test.tar +/bin/zsh:499> tar -cf test.tar -T /dev/null +/bin/zsh:499> python -c 'import tarfile ; f = tarfile.open("test.tar") ; print("okay so far; calling f.next()...") ; f.next()' okay so far; calling f.next()... Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2350, in next self.fileobj.seek(self.offset - 1) IOError: [Errno 22] Invalid argument +/bin/zsh:499> openssl dgst -sha256 test.tar SHA256(test.tar)= 5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef +/bin/zsh:499> rm -v -fv test.tar test.tar ``` GNU tar (OS X via MacPorts): ``` ( set -x ; cd /tmp || exit 1 ; gnutar --version ; rm -fv test.tar ; gnutar -cf test.tar -T /dev/null ; python -c 'import tarfile ; f = tarfile.open("test.tar") ; print("okay so far; calling f.next()...") ; f.next()' ; openssl dgst -sha256 test.tar ; rm -fv test.tar ) +-zsh:23> cd /tmp +-zsh:23> gnutar --version tar (GNU tar) 1.29 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. +-zsh:23> rm -v -fv test.tar +-zsh:23> gnutar -cf test.tar -T /dev/null +-zsh:23> python -c 'import tarfile ; f = tarfile.open("test.tar") ; print("okay so far; calling f.next()...") ; f.next()' okay so far; calling f.next()... Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2350, in next self.fileobj.seek(self.offset - 1) IOError: [Errno 22] Invalid argument +-zsh:23> openssl dgst -sha256 test.tar SHA256(test.tar)= 84ff92691f909a05b224e1c56abb4864f01b4f8e3c854e4bb4c7baf1d3f6d652 +-zsh:23> rm -v -fv test.tar test.tar ``` The discussion from #24259 does not appear to contemplate this case, and seems to imply an assumption that there will be at least one entry (which is not always the case). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 15:29:43 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 10 Mar 2017 20:29:43 +0000 Subject: [issue29722] heapq.merge docs are misleading with the "reversed" flag In-Reply-To: <1488684398.15.0.985624873811.issue29722@psf.upfronthosting.co.za> Message-ID: <1489177783.53.0.0198457166131.issue29722@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 15:31:03 2017 From: report at bugs.python.org (Matt Bogosian) Date: Fri, 10 Mar 2017 20:31:03 +0000 Subject: [issue29760] tarfile chokes on reading .tar file with no entries (but does fine if the same file is bzip2'ed) In-Reply-To: <1489001529.94.0.345849682069.issue29760@psf.upfronthosting.co.za> Message-ID: <1489177863.18.0.991353420333.issue29760@psf.upfronthosting.co.za> Matt Bogosian added the comment: This patch (also attached) seems to address this particular use case: ``` --- a/Lib/tarfile.py 2016-12-17 12:41:21.000000000 -0800 +++ b/Lib/tarfile.py 2017-03-10 12:23:34.000000000 -0800 @@ -2347,7 +2347,7 @@ # Advance the file pointer. if self.offset != self.fileobj.tell(): - self.fileobj.seek(self.offset - 1) + self.fileobj.seek(max(self.offset - 1, 0)) if not self.fileobj.read(1): raise ReadError("unexpected end of data") ``` However, I am unfamiliar with the code, especially in light of #24259, and haven't tested it thoroughly. Oversight is needed. ---------- keywords: +patch Added file: http://bugs.python.org/file46717/tarfile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 15:53:03 2017 From: report at bugs.python.org (Ivan Anishchuk) Date: Fri, 10 Mar 2017 20:53:03 +0000 Subject: [issue29790] Optional use of /dev/random on linux Message-ID: <1489179183.06.0.602244031276.issue29790@psf.upfronthosting.co.za> New submission from Ivan Anishchuk: Right now secrets module uses SystemRandom which is hardcoded to use os.urandom() which is fine for most users but some have good hardware sources of entropy (or otherwise replenish entropy pool) in which case it would be much better to use getrandom() with GRND_RANDOM flag i.e. to read from /dev/random pool. Simply subclassing SystemRandom is not enough, the idea is to make it possible for every library and program to use the big entropy pool if it's available. So I'm thinking it would be best to configure it with an environment variable, something like PYTHONTRUERANDOM or PYTHONDEVRANDOM. Admittedly, only a small subset of users would benefit from this but changes required are also small and I'm willing to do all the work here. Are there any reason this patch won't be accepted? Any preferences regarding variable name? ---------- components: Library (Lib) messages: 289410 nosy: IvanAnishchuk priority: normal severity: normal status: open title: Optional use of /dev/random on linux type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 16:06:33 2017 From: report at bugs.python.org (Lucio Ricardo Montero Valenzuela) Date: Fri, 10 Mar 2017 21:06:33 +0000 Subject: [issue29791] print documentation: flush is also a keyword argument Message-ID: <1489179993.27.0.31165504732.issue29791@psf.upfronthosting.co.za> New submission from Lucio Ricardo Montero Valenzuela: In the print() function documentation (https://docs.python.org/3/library/functions.html#print), the first line says "Print objects to the text stream file, separated by sep and followed by end. sep, end and file, if present, must be given as keyword arguments.", but the function definition is said to be "print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)". Based on the Python user function definition grammar, the only way of passing an value to a non-star parameters that appear after a star-parameter is with the keyword (so the interpreter knows not to push the value into the star-parameter list/mapping). So the flush parameter can be set only naming explicitly the keyword 'flush' ?Isn't it?. So the first line of the print() function documentation should say "Print objects to the text stream file, separated by sep and followed by end. sep, end, file and flush, if present, must be given as keyword arguments.". Flush is a new parameter, so maybe you forgot to update this line of the documentation to include it. Best regards. ---------- assignee: docs at python components: Documentation messages: 289411 nosy: Lucio Ricardo Montero Valenzuela, docs at python priority: normal severity: normal status: open title: print documentation: flush is also a keyword argument type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 16:28:41 2017 From: report at bugs.python.org (Martin Panter) Date: Fri, 10 Mar 2017 21:28:41 +0000 Subject: [issue29786] asyncio.wrap_future() is not documented In-Reply-To: <1489158939.82.0.933594898276.issue29786@psf.upfronthosting.co.za> Message-ID: <1489181321.55.0.783038935856.issue29786@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> asyncio.wrap_future undocumented _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 16:30:31 2017 From: report at bugs.python.org (Martin Panter) Date: Fri, 10 Mar 2017 21:30:31 +0000 Subject: [issue24755] asyncio.wrap_future undocumented In-Reply-To: <1438250618.09.0.00442439827356.issue24755@psf.upfronthosting.co.za> Message-ID: <1489181431.1.0.10652863138.issue24755@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- components: +asyncio stage: -> patch review versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 16:30:58 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 Mar 2017 21:30:58 +0000 Subject: [issue29788] tarfile: Add absolute_path option to tarfile, disabled by default In-Reply-To: <1489162424.66.0.632437535873.issue29788@psf.upfronthosting.co.za> Message-ID: <1489181458.41.7.28607659314e-05.issue29788@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 16:32:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Mar 2017 21:32:38 +0000 Subject: [issue29746] Update marshal docs to Python 3 In-Reply-To: <1488883267.82.0.811271477172.issue29746@psf.upfronthosting.co.za> Message-ID: <1489181558.1.0.052168842914.issue29746@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +Mariatta, martin.panter, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 16:50:21 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 10 Mar 2017 21:50:21 +0000 Subject: [issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath In-Reply-To: <1489121898.66.0.224917416789.issue29778@psf.upfronthosting.co.za> Message-ID: <1489182621.26.0.258077888832.issue29778@psf.upfronthosting.co.za> Steve Dower added the comment: Ah, I see. We force load it in PC/getpathp.c to ensure that it's ours and not another version's python3.dll. We should probably refactor the GetModuleFileNameW call into its own function so we can call it from anywhere we need. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 16:50:35 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 10 Mar 2017 21:50:35 +0000 Subject: [issue29778] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath In-Reply-To: <1489121898.66.0.224917416789.issue29778@psf.upfronthosting.co.za> Message-ID: <1489182635.72.0.783327639374.issue29778@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- stage: -> needs patch type: -> behavior versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 17:01:42 2017 From: report at bugs.python.org (Craig Holmquist) Date: Fri, 10 Mar 2017 22:01:42 +0000 Subject: [issue23407] os.walk always follows Windows junctions In-Reply-To: <1423342763.81.0.179122512075.issue23407@psf.upfronthosting.co.za> Message-ID: <1489183302.75.0.503784433154.issue23407@psf.upfronthosting.co.za> Changes by Craig Holmquist : Added file: http://bugs.python.org/file46718/issue23407-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 17:14:26 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 10 Mar 2017 22:14:26 +0000 Subject: [issue29688] Document Path.absolute In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1489184066.8.0.910721074983.issue29688@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm still thinking about this but I'm still leaning towards deprecating pathlib.absolute(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 17:18:51 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 10 Mar 2017 22:18:51 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1489184331.04.0.683607839011.issue28810@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- pull_requests: +500 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 17:28:02 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 10 Mar 2017 22:28:02 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1489184882.38.0.769009223125.issue29741@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +501 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 17:33:20 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 10 Mar 2017 22:33:20 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1489185200.01.0.0530782331682.issue29741@psf.upfronthosting.co.za> Oren Milman added the comment: done ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 17:44:04 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 10 Mar 2017 22:44:04 +0000 Subject: [issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6 In-Reply-To: <1428585495.21.0.103830054834.issue23894@psf.upfronthosting.co.za> Message-ID: <1489185844.23.0.297109810318.issue23894@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, the announced deadline for bugfixes for 3.6.1 has already passed; at this point, only showstopper problems with 3.6.1rc1 are on the table for the final. Trivial impact isn't a criterion for post-rc1 changes and there's a good reason for that: we ask everyone in the community to test a release candidate with the expectation that this is the final release. I don't think it's fair to add more unrelated changes and risk that it will break something and/or cause additional release candidates to be produced. The original problem has been open for nearly two years now and, while "f" string support adds to the importance of the tokenizer getting updated, this can wait 3 more months for 3.6.2 with a proper review cycle and with tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 17:45:45 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 10 Mar 2017 22:45:45 +0000 Subject: [issue29790] Optional use of /dev/random on linux In-Reply-To: <1489179183.06.0.602244031276.issue29790@psf.upfronthosting.co.za> Message-ID: <1489185945.89.0.219103616089.issue29790@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- nosy: +haypo, ncoghlan, steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 17:55:15 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 10 Mar 2017 22:55:15 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1489186515.86.0.660215810072.issue29741@psf.upfronthosting.co.za> Oren Milman added the comment: thanks :) I would update the original PR soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 17:58:17 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 10 Mar 2017 22:58:17 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1489186697.26.0.787418961726.issue28810@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- pull_requests: +502 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 17:59:13 2017 From: report at bugs.python.org (Matt Bogosian) Date: Fri, 10 Mar 2017 22:59:13 +0000 Subject: [issue29760] tarfile chokes on reading .tar file with no entries (but does fine if the same file is bzip2'ed) In-Reply-To: <1489001529.94.0.345849682069.issue29760@psf.upfronthosting.co.za> Message-ID: <1489186753.91.0.322738036522.issue29760@psf.upfronthosting.co.za> Changes by Matt Bogosian : Removed file: http://bugs.python.org/file46717/tarfile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 18:00:48 2017 From: report at bugs.python.org (Matt Bogosian) Date: Fri, 10 Mar 2017 23:00:48 +0000 Subject: [issue29760] tarfile chokes on reading .tar file with no entries (but does fine if the same file is bzip2'ed) In-Reply-To: <1489001529.94.0.345849682069.issue29760@psf.upfronthosting.co.za> Message-ID: <1489186848.76.0.378505146332.issue29760@psf.upfronthosting.co.za> Matt Bogosian added the comment: After some consideration, I think this is probably more correct: ``` --- /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py 2016-12-17 12:41:21.000000000 -0800 +++ tarfile.py 2017-03-10 14:57:15.000000000 -0800 @@ -2347,9 +2347,10 @@ # Advance the file pointer. if self.offset != self.fileobj.tell(): - self.fileobj.seek(self.offset - 1) + self.fileobj.seek(max(self.offset - 1, 0)) if not self.fileobj.read(1): raise ReadError("unexpected end of data") + self.fileobj.seek(self.offset) # Read the next block. tarinfo = None ``` But again, I'm no expert here. ---------- Added file: http://bugs.python.org/file46719/tarfile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 18:05:20 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 10 Mar 2017 23:05:20 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1489187120.47.0.450673888552.issue29741@psf.upfronthosting.co.za> Oren Milman added the comment: or maybe git is smart enough to realize what happened, and I don't have to update PR 560? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 18:09:51 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 10 Mar 2017 23:09:51 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1489187391.12.0.964558709223.issue28810@psf.upfronthosting.co.za> Brett Cannon added the comment: I have merged all the PRs that Ivan had open. I'll leave the issue open since Ivan said he had another PR he wanted to create. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 18:29:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 10 Mar 2017 23:29:30 +0000 Subject: [issue29790] Optional use of /dev/random on linux In-Reply-To: <1489185945.91.0.121783110725.issue29790@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I'm opposed to use blocking /dev/random instead of /dev/urandom: see PEP 524 for the rationale. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 18:43:28 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 10 Mar 2017 23:43:28 +0000 Subject: [issue29478] email.policy.Compat32(max_line_length=None) not as documented In-Reply-To: <1486548645.73.0.926739197467.issue29478@psf.upfronthosting.co.za> Message-ID: <1489189408.23.0.32415098233.issue29478@psf.upfronthosting.co.za> R. David Murray added the comment: OK. This looks good to me. I haven't figured out the new commit process, though (like how to do misc news and backports), so I'm not going to be the one to merge it, I'm afraid. At least not until I do find time to learn. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 19:08:37 2017 From: report at bugs.python.org (ppperry) Date: Sat, 11 Mar 2017 00:08:37 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489190917.06.0.311868687218.issue28685@psf.upfronthosting.co.za> ppperry added the comment: Does this work with wacky code like this? @functools.total_ordering class ClassAssignmentCanBreakChecks(): def __init__(self, i): self._i = i def __lt__ (self, other): last.__class__ = OrdinaryOldInteger return self._i < (other._i if hasattr(other, '_i') else other) @functools.total_ordering class OrdinaryOldInteger: def __init__(self, i): self._i = i def __lt__(self, other): return self._i < (other._i if hasattr(other, '_i') else other) lst = [ClassAssignmentCanBreakChecks(i) for i in range(10)] random.shuffle(lst) last = lst[-1] lst.sort() It looks like it will initially say that all are the same type, and attempt that optimization, which will probably lead to unexpected results as that condition is no longer true after the first compare. ---------- nosy: +ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 19:08:57 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 11 Mar 2017 00:08:57 +0000 Subject: [issue23894] lib2to3 doesn't recognize rb'...' and f'...' in Python 3.6 In-Reply-To: <1428585495.21.0.103830054834.issue23894@psf.upfronthosting.co.za> Message-ID: <1489190937.41.0.688263585514.issue23894@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Alright, we'll merge this for 3.6.2 then! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 19:10:46 2017 From: report at bugs.python.org (Ivan Anishchuk) Date: Sat, 11 Mar 2017 00:10:46 +0000 Subject: [issue29790] Optional use of /dev/random on linux In-Reply-To: <1489179183.06.0.602244031276.issue29790@psf.upfronthosting.co.za> Message-ID: <1489191046.55.0.493809660567.issue29790@psf.upfronthosting.co.za> Ivan Anishchuk added the comment: Victor, I suppose you don't happen to have a good entropy source? :) I cannot really stress the word "optional" enough here. And I understand why most user wouldn't want this. That's why I'm proposing to make it optional. As per PEP, "The /dev/random device should only used for very specific use cases." and that's exactly what I'm proposing, a special option for special use cases. (Speaking of options, it would've been nice to have more of those, I would really like to have an easy way to access an entropy source directly, not through system PRNG, for generating keys and like. But devices and interfaces can be different so it's out of scope for this proposal.) To be absolutely clear: what I'm proposing is a small improvement for linux users who have a good entropy source (e.g. a hardware TRNG) and specifically opt for this feature setting an environment variable (or by other means). Without affecting anyone else under any circumstances. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 19:30:48 2017 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 11 Mar 2017 00:30:48 +0000 Subject: [issue29785] Registration link sent via email by the tracker is http In-Reply-To: <1489157558.36.0.800169235988.issue29785@psf.upfronthosting.co.za> Message-ID: <1489192248.37.0.81342017315.issue29785@psf.upfronthosting.co.za> Ezio Melotti added the comment: Could you report this to http://psf.upfronthosting.co.za/roundup/meta/ ? ---------- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 19:31:27 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Sat, 11 Mar 2017 00:31:27 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1489190917.06.0.311868687218.issue28685@psf.upfronthosting.co.za> Message-ID: Elliot Gorokhovsky added the comment: Your code changes __class__, not type, which would remain equal to "instance". (my understanding, could be wrong). The docs say the following: https://docs.python.org/3.7/reference/datamodel.html > Like its identity, an object?s type is also unchangeable. [1] > > [1] It is possible in some cases to change an object?s type, under certain controlled conditions. > It generally isn?t a good idea though, since it can lead to some very strange behavior if it is > handled incorrectly. So I think it's safe to assume that type doesn't change; if you change type, you get undefined ("very strange") behavior. Based on the comment in the footnote, other code clearly assumes that type doesn't change, so I don't see why list.sort() should be any different. On Fri, Mar 10, 2017 at 5:08 PM ppperry wrote: > > ppperry added the comment: > > Does this work with wacky code like this? > @functools.total_ordering > class ClassAssignmentCanBreakChecks(): > def __init__(self, i): > self._i = i > def __lt__ (self, other): > last.__class__ = OrdinaryOldInteger > return self._i < (other._i if hasattr(other, '_i') > else other) > @functools.total_ordering > class OrdinaryOldInteger: > def __init__(self, i): > self._i = i > def __lt__(self, other): > return self._i < (other._i if hasattr(other, '_i') > else other) > lst = [ClassAssignmentCanBreakChecks(i) for i in range(10)] > random.shuffle(lst) > last = lst[-1] > lst.sort() > It looks like it will initially say that all are the same type, and > attempt that optimization, which will probably lead to unexpected results > as that condition is no longer true after the first compare. > > ---------- > nosy: +ppperry > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 19:41:55 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 11 Mar 2017 00:41:55 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() In-Reply-To: <1489155449.02.0.609817047168.issue29783@psf.upfronthosting.co.za> Message-ID: <1489192915.17.0.113302835188.issue29783@psf.upfronthosting.co.za> Martin Panter added the comment: I agree that it would be better to hold off deprecating codecs.open until Python 2 is no longer supported. This deprecation also discussed in Issue 8796. There is more to compatability than the missing attributes. The most obvious one to me is that the TextIOBase.read?s parameter (read size) seems to correspond best with the second parameter (chars) to StreamReader.read. The rot-13 codec is not relevant to codecs.open, because rot-13 is a text-to-text codec. Codecs.open is documented as opening files in ?binary? (i.e. bytes) mode. I don?t think this is a bug with the rot-13 StreamWriter. The documentation gives the impression that bytes-to-bytes codecs should work, including stateful usage such as with codecs.open. So I would consider that usage legitimate. But see Issue 20132 about problems with various (mainly bytes?bytes) stateful codecs. Either the problems should be treated as bugs to be fixed, or the documentation should be clarified to say they represent missing features. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 19:55:19 2017 From: report at bugs.python.org (Maxime Buquet) Date: Sat, 11 Mar 2017 00:55:19 +0000 Subject: [issue29785] Registration link sent via email by the tracker is http In-Reply-To: <1489192248.37.0.81342017315.issue29785@psf.upfronthosting.co.za> Message-ID: <728F36D7-9634-440C-801A-EA2595C3662A@bouah.net> Maxime Buquet added the comment: On 11 March 2017 00:30:48 GMT+00:00, Ezio Melotti wrote: > >Ezio Melotti added the comment: > >Could you report this to http://psf.upfronthosting.co.za/roundup/meta/ >? No problem! Sorry for the noise ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 20:15:19 2017 From: report at bugs.python.org (ppperry) Date: Sat, 11 Mar 2017 01:15:19 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: Message-ID: <4c7969ce14c49ecdc3de59674caaa0d1.squirrel@neptune.place.org> ppperry added the comment: > > Elliot Gorokhovsky added the comment: > > Your code changes __class__, not type, which would remain equal to > "instance". (my understanding, could be wrong). The docs say the > following: > Nope: class A:pass class B:pass a = A() a.__class__ = B type(a) returns "" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 20:36:06 2017 From: report at bugs.python.org (paul j3) Date: Sat, 11 Mar 2017 01:36:06 +0000 Subject: [issue29777] argparse arguments in main parser hide an argument in subparser In-Reply-To: <1489091740.64.0.424181036659.issue29777@psf.upfronthosting.co.za> Message-ID: <1489196166.53.0.849341864956.issue29777@psf.upfronthosting.co.za> Changes by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 21:18:47 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 11 Mar 2017 02:18:47 +0000 Subject: [issue29784] Erroneous link in shutil.copy description In-Reply-To: <1489157151.86.0.545519035584.issue29784@psf.upfronthosting.co.za> Message-ID: <1489198727.73.0.025946739606.issue29784@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 21:19:02 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 11 Mar 2017 02:19:02 +0000 Subject: [issue29784] Erroneous link in shutil.copy description In-Reply-To: <1489157151.86.0.545519035584.issue29784@psf.upfronthosting.co.za> Message-ID: <1489198742.92.0.266517578084.issue29784@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +504 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 21:50:09 2017 From: report at bugs.python.org (paul j3) Date: Sat, 11 Mar 2017 02:50:09 +0000 Subject: [issue29777] argparse arguments in main parser hide an argument in subparser In-Reply-To: <1489091740.64.0.424181036659.issue29777@psf.upfronthosting.co.za> Message-ID: <1489200609.72.0.813684179238.issue29777@psf.upfronthosting.co.za> paul j3 added the comment: allow_abbrev as added with http://bugs.python.org/issue14910 I contributed to the patch, but my memory isn't fresh. The fact that this works across the subparser boundary is, in a sense, accidental. We didn't think about how abbreviations are handled across this boundary. The loop that matches flag strings with Action options ignores the subparser command. It's just another positional argument. So items that will later be parsed by the subparser are still being matched with the main parser's optionals. If they don't trigger this abbreviation they will just be put in the unidentified category. The patch is big enough that I hesitate to add it to Py2. There's doesn't seem to be enough manpower to properly test this obscure corner of code. Technically it was a feature addition, not a bug fix in 3.5. 'allow_abbrev=False' messes with the handling of short options: http://bugs.python.org/issue26967 In http://bugs.python.org/issue14910#msg204678 I suggest a subclassing patch that might work with Py2. All the logic for handing subparsers is in the _SubParsersAction class. 'parse_args' really doesn't know anything about the concept. As a result, similarly named Actions in the main and subparsers is inherently a confusing issue. http://bugs.python.org/issue9351 for example, changes how defaults are handled when there are matching Actions at both levels. The simplest fix is to use different flags in the main parser and subparsers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 22:15:52 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 11 Mar 2017 03:15:52 +0000 Subject: [issue29746] Update marshal docs to Python 3 In-Reply-To: <1488883267.82.0.811271477172.issue29746@psf.upfronthosting.co.za> Message-ID: <1489202152.17.0.776570777968.issue29746@psf.upfronthosting.co.za> Martin Panter added the comment: One other difference between 2 and 3 is that Python 3 has two kinds of ?binary? files. In most cases, a subset of the BufferedIOBase API is assumed, which does ?exact? reads and writes. I understand this is how Python 2 files worked. But there is also RawIOBase, which does short reads and writes. Perhaps it is worth clarifying if the file objects have to be the ?buffered? kind or not. In my patches for Issue 24291 and Issue 26721, I resorted to wording like The ?write? method . . . should write each chunk in full, like BufferedIOBase. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 22:39:21 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Sat, 11 Mar 2017 03:39:21 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <4c7969ce14c49ecdc3de59674caaa0d1.squirrel@neptune.place.org> Message-ID: Elliot Gorokhovsky added the comment: Yup, I was completely wrong. If your classes were defined in pure-Python, this would raise an exception (since the pure-Python operators/functions check for bad types, correct me if I'm wrong). However, if you defined your compares at the C API level, you could get a segfault. There are much easier ways to get segfaults using the C API, however :) Overall, I feel like if you're mutating the objects while they're being sorted, you should be prepared for undefined behavior. Specifically, in the current implementation, the sort result can be incorrect if you mutate as you sort; no sort algorithm will recheck comparisons periodically to see if you've tried to fool it. Anyway, here's what Tim Peters said on the Github PR comments, where I asked about the issue you raised: > About the __class__-changing example, I don't care provided it doesn't > blow up. But someone else should weigh in on that. I hope we can get, > e.g., Raymond Hettinger to stare at this issue too. Either way, great catch! Thanks for the feedback. On Fri, Mar 10, 2017 at 6:15 PM ppperry wrote: > > ppperry added the comment: > > > > > Elliot Gorokhovsky added the comment: > > > > Your code changes __class__, not type, which would remain equal to > > "instance". (my understanding, could be wrong). The docs say the > > following: > > > Nope: > class A:pass > class B:pass > a = A() > a.__class__ = B > type(a) > returns "" > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 22:41:18 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 11 Mar 2017 03:41:18 +0000 Subject: [issue29784] Erroneous link in shutil.copy description In-Reply-To: <1489157151.86.0.545519035584.issue29784@psf.upfronthosting.co.za> Message-ID: <1489203678.97.0.104525882443.issue29784@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks all :) I fixed the two references to copy() in shutil docs, and backported to 3.5 and 3.6. Since this particular issue is fixed, I'm closing this. If people find other incorrect references, they can open another ticket. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 22:58:36 2017 From: report at bugs.python.org (ppperry) Date: Sat, 11 Mar 2017 03:58:36 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489204716.4.0.691010220299.issue28685@psf.upfronthosting.co.za> ppperry added the comment: And what about even wackier code like this? class A(int): def __lt__(self, other): print("zebra") A.__lt__ = A.__false_lt__ return int.__lt__(self, other) __true_lt__ = __lt__ def __false_lt__(self, other): print("gizmo") A.__lt__ = A.__true_lt__ return int.__lt__(self, other) [A(i) for i in range(20, 5, -1)].sort() This alternates printing "zebra" and "gizmo" for every comparison, and there is no way to add some sort of caching without changing this behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 10 23:07:08 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Sat, 11 Mar 2017 04:07:08 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1489204716.4.0.691010220299.issue28685@psf.upfronthosting.co.za> Message-ID: Elliot Gorokhovsky added the comment: Actually, I just ran this in the patched interpreter, and it worked! It printed: zebra gizmo zebra gizmo zebra gizmo zebra gizmo zebra gizmo zebra gizmo zebra gizmo Inspired by the above result, I ran your counterexample (below) to see if it would work as well: from random import * class ClassAssignmentCanBreakChecks(): def __init__(self, i): self._i = i def __lt__ (self, other): print('gizmo') last.__class__ = OrdinaryOldInteger return self._i < (other._i if hasattr(other, '_i') else other) class OrdinaryOldInteger: def __init__(self, i): self._i = i def __lt__(self, other): print('rocket') return self._i < (other._i if hasattr(other, '_i') else other) lst = [ClassAssignmentCanBreakChecks(i) for i in range(10)] shuffle(lst) last = lst[-1] lst.sort() And it did! It printed: gizmo gizmo gizmo gizmo gizmo gizmo gizmo gizmo gizmo gizmo gizmo gizmo gizmo gizmo gizmo gizmo gizmo gizmo gizmo rocket rocket rocket Note the "rocket" prints at the end; those could not have printed if the compare method didn't change! Do I have any idea *why* these tests work? No. But I swear, I *just* re-made the patched interpeter in the directory where I ran the tests. You will definitely be able to reproduce my results on your system. Wacky! (seriously though I have no idea *why* this works, it just... does... I'm scared...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 00:17:14 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 11 Mar 2017 05:17:14 +0000 Subject: [issue29688] Document Path.absolute In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1489209434.4.0.690311145907.issue29688@psf.upfronthosting.co.za> Eryk Sun added the comment: resolve() can't replace absolute(). They serve different purposes. Sometimes one wants an absolute path, but without resolving symbolic links. absolute() processes a path as a string, which will continue to be true if it's updated to call nt._getfullpathname (GetFullPathName) on Windows. OTOH, resolve() can outright fail on Windows. I can write up a list of examples (I can think of 5 or 6 unhandled error codes), but it's not directly relevant to this issue. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 00:27:55 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 11 Mar 2017 05:27:55 +0000 Subject: [issue29788] tarfile: Add absolute_path option to tarfile, disabled by default In-Reply-To: <1489162424.66.0.632437535873.issue29788@psf.upfronthosting.co.za> Message-ID: <1489210075.97.0.226922314029.issue29788@psf.upfronthosting.co.za> Martin Panter added the comment: The CLI was added in Issue 13477. I didn?t see any discussion of traversal attacks there, so maybe it was overlooked. Perhaps there should also be a warning, like with the Tarfile.extract and ?extractall? methods. However I did see one of the goals was to keep the CLI simple, which I agree with. I would suggest that the CLI get this proposed behaviour by default (matching the default behaviour of modern ?tar? commands), with no option to restore the current less-robust behaviour. To implement it, I suggest to fix the module internals first: Issue 21109 and/or Issue 17102. FWIW BSD calls the option ?--absolute-paths? (plural paths) , while Gnu calls it ?--absolute-names? . Both these options disable other checks, such as for parent directories (..) and external symbolic link targets, so I think the term ?absolute? is too specific. But please use at least replace the underscore with a dash or hyphen: ?--absolute-path?, not ?--absolute_path?. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 00:29:40 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 11 Mar 2017 05:29:40 +0000 Subject: [issue21109] tarfile: Traversal attack vulnerability In-Reply-To: <1396253659.12.0.842636239516.issue21109@psf.upfronthosting.co.za> Message-ID: <1489210180.37.0.52915049082.issue21109@psf.upfronthosting.co.za> Martin Panter added the comment: Issue 29788 proposes an option to disable the vulnerability in the CLI ---------- dependencies: +tarfile: Add absolute_path option to tarfile, disabled by default _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 00:34:26 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 11 Mar 2017 05:34:26 +0000 Subject: [issue29770] Executable help output (--help) at commandline is wrong for option -B In-Reply-To: <1489063792.65.0.00439171993212.issue29770@psf.upfronthosting.co.za> Message-ID: <1489210466.33.0.835852502285.issue29770@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +505 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 00:49:03 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 11 Mar 2017 05:49:03 +0000 Subject: [issue29770] Executable help output (--help) at commandline is wrong for option -B In-Reply-To: <1489063792.65.0.00439171993212.issue29770@psf.upfronthosting.co.za> Message-ID: <1489211343.54.0.911210951289.issue29770@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +506 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 01:16:53 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 11 Mar 2017 06:16:53 +0000 Subject: [issue29770] Executable help output (--help) at commandline is wrong for option -B In-Reply-To: <1489063792.65.0.00439171993212.issue29770@psf.upfronthosting.co.za> Message-ID: <1489213013.7.0.901606241732.issue29770@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 02:55:04 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 11 Mar 2017 07:55:04 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1489218904.01.0.0364266302295.issue20087@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm still confused about what getlocale() is supposed to do. Why do we attempt to return an encoding anyway if the underlying setlocale call doesn't return one? Is getlocale() not supposed to a simple wrapper over the C locale? If not, how is one supposed to get the encoding associated with the C locale? The old alias table code meant that the encoding returned from getlocale() could be related to or completely unrelated to the actual C locale. Misunderstanding this results in issues like #29571. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 03:34:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Mar 2017 08:34:55 +0000 Subject: [issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files In-Reply-To: <1389140586.13.0.921060348978.issue20186@psf.upfronthosting.co.za> Message-ID: <1489221295.16.0.732704083505.issue20186@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +507 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 03:35:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Mar 2017 08:35:50 +0000 Subject: [issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files In-Reply-To: <1389140586.13.0.921060348978.issue20186@psf.upfronthosting.co.za> Message-ID: <1489221350.7.0.428507605957.issue20186@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 614: Objects/tupleobject.c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 06:33:02 2017 From: report at bugs.python.org (David MacIver) Date: Sat, 11 Mar 2017 11:33:02 +0000 Subject: [issue29792] "Fatal Python error: Cannot recover from stack overflow." from pure Python code Message-ID: <1489231982.25.0.506172470023.issue29792@psf.upfronthosting.co.za> New submission from David MacIver: When run under Python 3.6.0 or 3.5.1 (and presumably other versions of Python 3) the attached code fails with "Fatal Python error: Cannot recover from stack overflow." then aborts with a core dump and an error code indicating it got a SIGABRT. On Python 2.7 it instead hangs indefinitely. Obviously this code is stupid and shouldn't be expected to do anything very reasonable - It's shrunk down from what was probably just a bug on my end in a larger example - but it seemed like it might be symptomatic of a more general class of problems. ---------- files: recursionerror.py messages: 289441 nosy: David MacIver priority: normal severity: normal status: open title: "Fatal Python error: Cannot recover from stack overflow." from pure Python code versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file46720/recursionerror.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 07:19:03 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 11 Mar 2017 12:19:03 +0000 Subject: [issue29792] "Fatal Python error: Cannot recover from stack overflow." from pure Python code In-Reply-To: <1489231982.25.0.506172470023.issue29792@psf.upfronthosting.co.za> Message-ID: <1489234743.35.0.695164443725.issue29792@psf.upfronthosting.co.za> Xiang Zhang added the comment: Looks same as #6028. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 07:22:22 2017 From: report at bugs.python.org (David MacIver) Date: Sat, 11 Mar 2017 12:22:22 +0000 Subject: [issue29792] "Fatal Python error: Cannot recover from stack overflow." from pure Python code In-Reply-To: <1489231982.25.0.506172470023.issue29792@psf.upfronthosting.co.za> Message-ID: <1489234942.2.0.671862228305.issue29792@psf.upfronthosting.co.za> David MacIver added the comment: So it does. My apologies. I'll close this. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 07:28:32 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 11 Mar 2017 12:28:32 +0000 Subject: [issue29792] "Fatal Python error: Cannot recover from stack overflow." from pure Python code In-Reply-To: <1489231982.25.0.506172470023.issue29792@psf.upfronthosting.co.za> Message-ID: <1489235312.15.0.148953174967.issue29792@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> duplicate superseder: -> Interpreter aborts when chaining an infinite number of exceptions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 07:33:28 2017 From: report at bugs.python.org (Wonsup Yoon) Date: Sat, 11 Mar 2017 12:33:28 +0000 Subject: [issue29456] bug in unicodedata.normalize: u1176, u11a7 and u11c3 In-Reply-To: <1486355272.29.0.0894514518656.issue29456@psf.upfronthosting.co.za> Message-ID: <1489235608.87.0.127604512332.issue29456@psf.upfronthosting.co.za> Changes by Wonsup Yoon : ---------- title: bug in unicodedata.normalize: u1176 -> bug in unicodedata.normalize: u1176, u11a7 and u11c3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 07:55:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Mar 2017 12:55:26 +0000 Subject: [issue29456] bug in unicodedata.normalize: u1176, u11a7 and u11c3 In-Reply-To: <1486355272.29.0.0894514518656.issue29456@psf.upfronthosting.co.za> Message-ID: <1489236926.47.0.18515976456.issue29456@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +lemburg, loewis stage: -> patch review type: -> behavior versions: +Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 08:07:50 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 11 Mar 2017 13:07:50 +0000 Subject: [issue29790] Optional use of /dev/random on linux In-Reply-To: <1489179183.06.0.602244031276.issue29790@psf.upfronthosting.co.za> Message-ID: <1489237670.73.0.285991149548.issue29790@psf.upfronthosting.co.za> Nick Coghlan added the comment: This RFE is unfortunately based on some incorrect assumptions about the way Linux kernels use CSPRNGs and entropy pools. Using /dev/random isn't magically more secure than /dev/urandom, it just makes your applications less reliable for no good reason. Folks are free to do that through an extension module if they really wish to do so, but it's not an option we're interested in supporting in the standard library. This is a good article providing some additional background on that topic: http://www.2uo.de/myths-about-urandom/ There was one genuine problem with /dev/urandom (it could return potentially predictable values if the entropy pool hadn't been adequately seeded), but Victor addressed that in PEP 524 by switching to the blocking variant of the getrandom() syscall (when available) rather than using the file descriptor interface. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 08:45:18 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 11 Mar 2017 13:45:18 +0000 Subject: [issue29790] Optional use of /dev/random on linux In-Reply-To: <1489179183.06.0.602244031276.issue29790@psf.upfronthosting.co.za> Message-ID: <1489239918.11.0.651479809369.issue29790@psf.upfronthosting.co.za> Nick Coghlan added the comment: To provide some additional context to that answer: the problem isn't with folks wanting direct access to their hardware entropy devices as such. There are plenty of options for that (such as exposing it as a file descriptor distinct from both /dev/random and /dev/urandom), but going through /dev/random (or calling "os.getrandom(n, os.GRND_RANDOM)") isn't one of them. Instead, /dev/random consumes the same kernel CSPRNG that /dev/urandom does, it just adds an extra check to make it block when the kernel's collected entropy estimate happens to be low. So this isn't something we want to expose or explain to Python users in general - instead, it's something that only folks doing highly specialised work involving hardware security modules might be interested in, and hence can be safely left to third party tools and frameworks, rather than being something that would ever be shipped by default as part of the reference interpreter and standard library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 08:46:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Mar 2017 13:46:33 +0000 Subject: [issue29793] Convert some builtin types constructors to Argument Clinic Message-ID: <1489239993.83.0.329707117156.issue29793@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Following PR converts some builtin types constructors to Argument Clinic: complex.__new__ float.__new__ function.__new__ int.__new__ mappingproxy.__new__ module.__init__ property.__init__ structseq.__new__ ---------- components: Interpreter Core messages: 289446 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: Convert some builtin types constructors to Argument Clinic type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 08:52:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Mar 2017 13:52:40 +0000 Subject: [issue29793] Convert some builtin types constructors to Argument Clinic In-Reply-To: <1489239993.83.0.329707117156.issue29793@psf.upfronthosting.co.za> Message-ID: <1489240360.23.0.938714404406.issue29793@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +508 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 08:53:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Mar 2017 13:53:25 +0000 Subject: [issue29793] Convert some builtin types constructors to Argument Clinic In-Reply-To: <1489239993.83.0.329707117156.issue29793@psf.upfronthosting.co.za> Message-ID: <1489240405.99.0.720083729579.issue29793@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Argument Clinic nosy: +larry stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 10:10:56 2017 From: report at bugs.python.org (Marco Buttu) Date: Sat, 11 Mar 2017 15:10:56 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1489245056.42.0.179721929642.issue27200@psf.upfronthosting.co.za> Changes by Marco Buttu : ---------- pull_requests: +509 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 10:12:31 2017 From: report at bugs.python.org (ppperry) Date: Sat, 11 Mar 2017 15:12:31 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: Message-ID: <7c123cfb290ea93447b7e48329c92583.squirrel@neptune.place.org> ppperry added the comment: What about if one of the relevant comparison functions is implemented in C? class WackyComparator(int): def __lt__(self, other): elem.__class__ = WackyList2 return int.__lt__(self, other) class WackyList1(list):pass class WackyList2(list): def __lt__(self, other): raise ValueError lst = list(map(WackyList1,[[WackyComparator(3),5],[WackyComparator(4),6],[WackyComparator(7),7]])) random.shuffle(lst) elem = lst[-1] lst.sort() This code raises ValueError, and caching seems like it would cache the comparator for WackyList1 objects, which is the same as the comparator for 'list' objects -- and midway through comparison, one of them changes type to WackyList2, which has its own (broken) comparison function. Python is very very dynamic ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 11:00:21 2017 From: report at bugs.python.org (ppperry) Date: Sat, 11 Mar 2017 16:00:21 +0000 Subject: [issue29794] Incorrect error message on invalid __class__ assignments Message-ID: <1489248021.29.0.604014111232.issue29794@psf.upfronthosting.co.za> New submission from ppperry: If you try to set the __class__ of a type which doesn't support "__class__" assignments, you get the error message: TypeError: __class__ assignment only supported for heap types or ModuleType subclasses However, the actual restriction doesn't require a subclass of "ModuleType"; the below code works: import random class M(type(random)):pass random.__class__ = M Thus the error message is incorrect. ---------- components: Interpreter Core messages: 289448 nosy: ppperry priority: normal severity: normal status: open title: Incorrect error message on invalid __class__ assignments type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 11:25:59 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 11 Mar 2017 16:25:59 +0000 Subject: [issue29794] Incorrect error message on invalid __class__ assignments In-Reply-To: <1489248021.29.0.604014111232.issue29794@psf.upfronthosting.co.za> Message-ID: <1489249559.6.0.520308184855.issue29794@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 13:20:34 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 11 Mar 2017 18:20:34 +0000 Subject: [issue29722] heapq.merge docs are misleading with the "reversed" flag In-Reply-To: <1488684398.15.0.985624873811.issue29722@psf.upfronthosting.co.za> Message-ID: <1489256434.83.0.285162990081.issue29722@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The PR was applied to 3.7. I don't think it is worth backing. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 13:41:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 Mar 2017 18:41:31 +0000 Subject: [issue29790] Optional use of /dev/random on linux In-Reply-To: <1489239918.11.0.651479809369.issue29790@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: You can already use os.getrandom() if you want /dev/urandom. And as you wrote, it is easy to inherit from SystemRandom if you need something else than bytes. I am strongly opposed to use /dev/random because most users misunderdood RNG znd so will use /dev/random for *bad* reason. There is no need to extend the stdlib. I suggest yo close this issue as WONTFIX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 13:42:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 11 Mar 2017 18:42:19 +0000 Subject: [issue29793] Convert some builtin types constructors to Argument Clinic In-Reply-To: <1489239993.83.0.329707117156.issue29793@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Cool. You can close my issue, this one supersed it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 13:43:06 2017 From: report at bugs.python.org (Brett Cannon) Date: Sat, 11 Mar 2017 18:43:06 +0000 Subject: [issue29688] Document Path.absolute In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1489257786.7.0.348725428818.issue29688@psf.upfronthosting.co.za> Brett Cannon added the comment: I know it has it's uses (avoiding stat calls is one of them), but it is still undocumented, untested, and has two comments in it saying it needs work. Because of all that it might as well not exist since it doesn't meet our standards of quality. If someone wants to fix all those issues then we can properly document it as supported, but if no one is willing to then I don't think we should leave unsupported code lying around that people might discover through dir(). And it doesn't serve a _different_ purpose compared to resolve(), it serves a _subset_ of resolve()'s purpose since resolve() calls absolute() unconditionally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 13:43:17 2017 From: report at bugs.python.org (Brett Cannon) Date: Sat, 11 Mar 2017 18:43:17 +0000 Subject: [issue29688] Add support for Path.absolute In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1489257797.27.0.656304091324.issue29688@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: Document Path.absolute -> Add support for Path.absolute _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 13:43:22 2017 From: report at bugs.python.org (Brett Cannon) Date: Sat, 11 Mar 2017 18:43:22 +0000 Subject: [issue29688] Add support for Path.absolute() In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1489257802.41.0.88902029063.issue29688@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: Add support for Path.absolute -> Add support for Path.absolute() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 13:45:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Mar 2017 18:45:22 +0000 Subject: [issue29793] Convert some builtin types constructors to Argument Clinic In-Reply-To: <1489239993.83.0.329707117156.issue29793@psf.upfronthosting.co.za> Message-ID: <1489257922.86.0.234374124546.issue29793@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: str, bytes and bytearray still are not converted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 14:25:49 2017 From: report at bugs.python.org (Max) Date: Sat, 11 Mar 2017 19:25:49 +0000 Subject: [issue29795] Clarify how to share multiprocessing primitives Message-ID: <1489260349.05.0.251290010989.issue29795@psf.upfronthosting.co.za> New submission from Max: It seems both me and many other people (judging from SO questions) are confused about whether it's ok to write this: from multiprocessing import Process, Queue q = Queue() def f(): q.put([42, None, 'hello']) def main(): p = Process(target=f) p.start() print(q.get()) # prints "[42, None, 'hello']" p.join() if __name__ == '__main__': main() It's not ok (doesn't work on Windows presumably because somehow when it's pickled, the connection between global queues in the two processes is lost; works on Linux, because I guess fork keeps more information than pickle, so the connection is maintained). I thought it would be good to clarify in the docs that all the Queue() and Manager().* and other similar objects should be passed as parameters not just defined as globals. ---------- assignee: docs at python components: Documentation messages: 289454 nosy: docs at python, max priority: normal severity: normal status: open title: Clarify how to share multiprocessing primitives type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 14:52:15 2017 From: report at bugs.python.org (Eric Appelt) Date: Sat, 11 Mar 2017 19:52:15 +0000 Subject: [issue29514] Add a test case that prevents magic number changes in minor releases In-Reply-To: <1486654210.44.0.116789566768.issue29514@psf.upfronthosting.co.za> Message-ID: <1489261935.3.0.637539891049.issue29514@psf.upfronthosting.co.za> Eric Appelt added the comment: Thank you for the review and suggestions Nick, Serhiy, and all. I believe that I have implemented the suggestions here and on github into a new commit on my pull request which moves the test into an existing module and removes the notion of a table in favor of a single expected value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 15:46:23 2017 From: report at bugs.python.org (Davin Potts) Date: Sat, 11 Mar 2017 20:46:23 +0000 Subject: [issue29795] Clarify how to share multiprocessing primitives In-Reply-To: <1489260349.05.0.251290010989.issue29795@psf.upfronthosting.co.za> Message-ID: <1489265183.45.0.907010686151.issue29795@psf.upfronthosting.co.za> Davin Potts added the comment: On Windows, because that OS does not support fork, multiprocessing uses spawn to create new processes by default. Note that in Python 3, multiprocessing provides the user with a choice of how to create new processes (i.e. fork, spawn, forkserver). When fork is used, the 'q = Queue()' in this example would be executed once by the parent process before the fork takes place, the resulting child process continues execution from the same point as the parent when it triggered the fork, and thus both parent and child processes would see the same multiprocessing.Queue. When spawn is used, a new process is spawned and the whole of this example script would be executed again from scratch by the child process, resulting in the child (spawned) process creating a new Queue object of its own with no sense of connection to the parent. Would you be up for proposing replacement text to improve the documentation? Getting the documentation just right so that everyone understands it is worth spending time on. ---------- nosy: +davin stage: -> needs patch type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 15:47:25 2017 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 11 Mar 2017 20:47:25 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1489265245.6.0.159941495948.issue26121@psf.upfronthosting.co.za> Mark Dickinson added the comment: So the GitHub branch fails on my OS X 10.10 machine: there are a number of test failures for gamma and lgamma (but none for erf and erfc). Some of the gamma and lgamma test failures are accuracy issues; some are more likely to do with errno handling: OS X probably isn't setting errno appropriate on domain or range errors, so any implementation using the libm lgamma/tgamma would need to add code for error handling. Given this, I'd prefer to leave lgamma and gamma as-is, using their current implementations, at least on OS X; I don't regard the accuracy loss in using the libm functions to be within acceptable limits. There may still be a case for using the libm versions of erf and erfc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 17:11:53 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 11 Mar 2017 22:11:53 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1489270313.88.0.682307986958.issue29730@psf.upfronthosting.co.za> Oren Milman added the comment: after some closer examination, ISTM that in Objects/exceptions.c, we can't remove PyNumber_Check to optimize or simplify the code, as the argument 'filename' can be either an integer type (only in case the error is a BlockingIOError), or quite anything else, except for None. We could replace PyNumber_Check(filename) with PyIndex_Check(filename), but this would change the behavior of BlockingIOError. IMHO, this isn't that important, and thus we should leave the code in Objects/exceptions.c as is. anyway, I would soon create a pull request to remove all other aforementioned calls to PyNumber_Check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 17:23:01 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 11 Mar 2017 22:23:01 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1489270981.24.0.670169938882.issue29730@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +510 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 17:43:26 2017 From: report at bugs.python.org (Zachary Ware) Date: Sat, 11 Mar 2017 22:43:26 +0000 Subject: [issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike` In-Reply-To: <1487418512.16.0.401961352482.issue28624@psf.upfronthosting.co.za> Message-ID: <1489272206.02.0.317175963952.issue28624@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- pull_requests: +511 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 19:46:36 2017 From: report at bugs.python.org (Max) Date: Sun, 12 Mar 2017 00:46:36 +0000 Subject: [issue29795] Clarify how to share multiprocessing primitives In-Reply-To: <1489260349.05.0.251290010989.issue29795@psf.upfronthosting.co.za> Message-ID: <1489279596.17.0.239300163841.issue29795@psf.upfronthosting.co.za> Max added the comment: How about inserting this text somewhere: Note that sharing and synchronization objects (such as `Queue()`, `Pipe()`, `Manager()`, `Lock()`, `Semaphore()`) should be made available to a new process by passing them as arguments to the `target` function invoked by the `run()` method. Making these objects visible through global variables will only work when the process was started using `fork` (and as such sacrifices portability for no special benefit). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 19:47:05 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 12 Mar 2017 00:47:05 +0000 Subject: [issue29688] Add support for Path.absolute() In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1489279625.84.0.115528051027.issue29688@psf.upfronthosting.co.za> Eryk Sun added the comment: What's the rationale for not calling self._flavour.pathmod.abspath() to implement absolute()? For example: >>> p = pathlib.Path('C:/con') >>> p._flavour.pathmod.abspath(p) '\\\\.\\con' >>> p._from_parts((p._flavour.pathmod.abspath(p),), init=False) WindowsPath('//./con/') That's almost right except for an unrelated problem that pathlib shouldn't append a trailing slash for \\.\ local device paths. Doing so creates a different path, which may be invalid. \\.\con is a symbolic link to \Device\ConDrv\Console, and adding a trailing backslash after the "Console" filename is invalid. An example where the resulting path is valid but wrong is the volume device \\.\C:, which is a link to something like \Device\HarddiskVolume2. Appending a backslash refers to the root directory of the file system on the volume. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 20:01:35 2017 From: report at bugs.python.org (Zachary Ware) Date: Sun, 12 Mar 2017 01:01:35 +0000 Subject: [issue29796] test_weakref hangs on AppVeyor (2.7) Message-ID: <1489280495.74.0.987527414659.issue29796@psf.upfronthosting.co.za> New submission from Zachary Ware: See PR493 (https://ci.appveyor.com/project/python/cpython/build/2.7.13+.184) for an example. I'd rather not merge PR493, which adds AppVeyor to 2.7, until this is resolved. ---------- components: Windows messages: 289461 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: test needed status: open title: test_weakref hangs on AppVeyor (2.7) type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 21:06:36 2017 From: report at bugs.python.org (Tim Peters) Date: Sun, 12 Mar 2017 02:06:36 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489284396.0.0.701510194268.issue28685@psf.upfronthosting.co.za> Tim Peters added the comment: I haven't tried the example, but at this point I'd be surprised if it failed. The caching here isn't at level of `__lt__` but at the higher level of (invisible from Python code) a type's tp_richcompare slot. A heap type - regardless of whether it derives from a C-level or Python-level type - has to be prepared for methods to pop into existence, change, or vanish at (almost) any time. So its tp_richcompare has to be defensive itself. For example: >>> class F(float): ... pass >>> a = F(2) >>> b = F(3) >>> a < b True Is F.tp_richcompare the same as float.tp_richcompare? We can't tell from Python code, because tp_richcompare isn't exposed. But, _whatever_ F.tp_richcompare is, it notices when relevant new methods are defined (which float.tp_richcompare emphatically does not); for example, continuing the above: >>> F.__lt__ = lambda a, b: 0 >>> a < b 0 >>> del F.__lt__ >>> a < b True That said, I know nothing about how comparison internals changed for Python 3, so I may just be hallucinating :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 21:15:14 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 12 Mar 2017 02:15:14 +0000 Subject: [issue29794] Incorrect error message on invalid __class__ assignments In-Reply-To: <1489248021.29.0.604014111232.issue29794@psf.upfronthosting.co.za> Message-ID: <1489284914.01.0.476482940726.issue29794@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Your example works because random is a module: py> from types import ModuleType py> import random py> type(random) is ModuleType True Since random is an instance of ModuleType, your class M is a subclass of ModuleType, and assigning to random.__class__ is allowed. I'm closing this issue, but if can demonstrate an actual problem, please feel free to re-open it. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 21:39:24 2017 From: report at bugs.python.org (Zachary Ware) Date: Sun, 12 Mar 2017 02:39:24 +0000 Subject: [issue29763] test_site failing on AppVeyor In-Reply-To: <1489009179.7.0.320606146583.issue29763@psf.upfronthosting.co.za> Message-ID: <1489286364.78.0.394375106309.issue29763@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- pull_requests: +512 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 21:48:53 2017 From: report at bugs.python.org (ppperry) Date: Sun, 12 Mar 2017 02:48:53 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489286933.16.0.405151378874.issue28685@psf.upfronthosting.co.za> ppperry added the comment: Wouldn't the assignment of "__lt__" change the value of the tp_richcompare slot? That seems to be what the code in Objects/typeobject.c is doing with the update_slot method and the related helper functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 22:14:58 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Sun, 12 Mar 2017 03:14:58 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1489286933.16.0.405151378874.issue28685@psf.upfronthosting.co.za> Message-ID: Elliot Gorokhovsky added the comment: I just ran it. With the patched interpreter, I get no error. With the unpatched interpreter, I get ValueError. :(. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 22:30:20 2017 From: report at bugs.python.org (Tim Peters) Date: Sun, 12 Mar 2017 03:30:20 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489289420.43.0.893184899338.issue28685@psf.upfronthosting.co.za> Tim Peters added the comment: @ppperry, I have no idea what the bulk of the code in typeobect.c is trying to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:01:18 2017 From: report at bugs.python.org (Tim Peters) Date: Sun, 12 Mar 2017 04:01:18 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489291278.0.0.47941295317.issue28685@psf.upfronthosting.co.za> Tim Peters added the comment: Elliot, I don't care if the example behaves differently. Although someone else may ;-) The only things `.sort()` has ever tried to guarantee in the presence of mutations (of either the list or the elements) during sorting are that (a) the implementation won't segfault; and, (b) the list at the end is _some_ permutation of the input list (no elements are lost or duplicated). If crazy mutation examples can provoke a segfault, that's possibly "a problem" - but different results really aren't (at least not to me). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:05:18 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Sun, 12 Mar 2017 04:05:18 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1489291278.0.0.47941295317.issue28685@psf.upfronthosting.co.za> Message-ID: Elliot Gorokhovsky added the comment: On Sat, Mar 11, 2017 at 9:01 PM Tim Peters wrote: > > Elliot, I don't care if the example behaves differently. Although someone > else may ;-) > > The only things `.sort()` has ever tried to guarantee in the presence of > mutations (of either the list or the elements) during sorting are that (a) > the implementation won't segfault; and, (b) the list at the end is _some_ > permutation of the input list (no elements are lost or duplicated). > > If crazy mutation examples can provoke a segfault, that's possibly "a > problem" - but different results really aren't (at least not to me). > > That's great to hear. (Of course, one could always remove unsafe_object_compare from the patch and keep the rest, but that would be a real shame). I don't think segfaults are possible if the code is pure-Python, because all the builtin/stdlib functions type-check anyway, so you would just get an exception. Right? Of course, using the C API you could probably provoke segfaults, but there are much easier ways to segfault using the C API :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:12:50 2017 From: report at bugs.python.org (Tim Peters) Date: Sun, 12 Mar 2017 04:12:50 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489291970.05.0.293748253475.issue28685@psf.upfronthosting.co.za> Tim Peters added the comment: Elliot, did you run the example in a release build or a debug build? I'm wondering why this: assert(v->ob_type == w->ob_type && v->ob_type->tp_richcompare != NULL && v->ob_type->tp_richcompare == compare_funcs.key_richcompare); didn't blow up (in `unsafe_object_compare`). If that does blow up in a debug build, it suggests "a fix": unconditionally check whether the tp_richcompare slot is the expected value. If not, use `PyObject_RichCompareBool(v, w, Py_LT)` instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:13:27 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 12 Mar 2017 04:13:27 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489292007.1.0.754585357181.issue28685@psf.upfronthosting.co.za> Eryk Sun added the comment: > assignment of "__lt__" change the value of the tp_richcompare slot? Yes. CPython doesn't implement individual dispatching of the rich-comparison functions. There's a single tp_richcompare slot, so overriding one rich comparison forces the use of slot_tp_richcompare. For built-in types this incurs the performance penalty of using a wrapper_descriptor for the other rich comparisons. For example, overriding F.__lt__ forces calling float.__gt__ for the greater-than comparison. Before: >>> F() > 1 Breakpoint 0 hit python37_d!float_richcompare: 00000000`6099d930 4489442418 mov dword ptr [rsp+18h],r8d ss:00000056`cefef280=a1670058 0:000> kc 3 Call Site python37_d!float_richcompare python37_d!do_richcompare python37_d!PyObject_RichCompare 0:000> g False After: >>> F.__lt__ = lambda a, b: 0 >>> F() > 1 Breakpoint 0 hit python37_d!float_richcompare: 00000000`6099d930 4489442418 mov dword ptr [rsp+18h],r8d ss:00000056`cefef0a0=a39d7c70 0:000> kc 9 Call Site python37_d!float_richcompare python37_d!wrap_richcmpfunc python37_d!richcmp_gt python37_d!wrapper_call python37_d!_PyObject_FastCallDict python37_d!call_unbound python37_d!slot_tp_richcompare python37_d!do_richcompare python37_d!PyObject_RichCompare The __gt__ wrapper_descriptor gets bound as a method-wrapper, and the method-wrapper tp_call is wrapper_call, which calls the wrapper function (e.g. richcmp_gt) with the wrapped function (e.g. float_richcompare). The object ID in CPython is the object address, so we can easily get the address of the __gt__ wrapper_descriptor to confirm how these C function pointers are stored in it: >>> id(vars(float)['__gt__']) 2154486684248 0:001> ln @@(((PyWrapperDescrObject *)2154486684248)->d_base->wrapper) (00000000`60a20580) python37_d!richcmp_gt | (00000000`60a205c0) python37_d!slot_tp_finalize Exact matches: python37_d!richcmp_gt (struct _object *, struct _object *, void *) 0:001> ln @@(((PyWrapperDescrObject *)2154486684248)->d_wrapped) (00000000`6099d930) python37_d!float_richcompare | (00000000`6099e6f0) python37_d!float_getzero Exact matches: python37_d!float_richcompare (struct _object *, struct _object *, int) ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:16:04 2017 From: report at bugs.python.org (Zachary Ware) Date: Sun, 12 Mar 2017 04:16:04 +0000 Subject: [issue29763] test_site failing on AppVeyor In-Reply-To: <1489009179.7.0.320606146583.issue29763@psf.upfronthosting.co.za> Message-ID: <1489292164.63.0.295565999211.issue29763@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- pull_requests: +513 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:28:44 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Sun, 12 Mar 2017 04:28:44 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1489291970.05.0.293748253475.issue28685@psf.upfronthosting.co.za> Message-ID: Elliot Gorokhovsky added the comment: It was a release build -- it would blow up in a debug build. Now, regarding the fix you propose: I'll benchmark it tomorrow. If the impact is small, I agree that it would be an elegant fix. If not, however, perhaps we just have to get rid of unsafe_object_compare entirely? The common use cases would still work just fine, and maybe we could add a case for bytes or something to compensate for the loss. On Sat, Mar 11, 2017 at 9:12 PM Tim Peters wrote: > > Tim Peters added the comment: > > Elliot, did you run the example in a release build or a debug build? I'm > wondering why this: > > assert(v->ob_type == w->ob_type && > v->ob_type->tp_richcompare != NULL && > v->ob_type->tp_richcompare == compare_funcs.key_richcompare); > > didn't blow up (in `unsafe_object_compare`). > > If that does blow up in a debug build, it suggests "a fix": > unconditionally check whether the tp_richcompare slot is the expected > value. If not, use `PyObject_RichCompareBool(v, w, Py_LT)` instead. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:32:05 2017 From: report at bugs.python.org (Tim Peters) Date: Sun, 12 Mar 2017 04:32:05 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489293125.83.0.492750228094.issue28685@psf.upfronthosting.co.za> Tim Peters added the comment: The impact would be small: it would add one (or so) pointer-equality compare that, in practice, will always say "yup, they're equal". Dirt cheap, and the branch is 100% predictable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:41:01 2017 From: report at bugs.python.org (Zachary Ware) Date: Sun, 12 Mar 2017 04:41:01 +0000 Subject: [issue29763] test_site failing on AppVeyor In-Reply-To: <1489009179.7.0.320606146583.issue29763@psf.upfronthosting.co.za> Message-ID: <1489293661.32.0.0757022443026.issue29763@psf.upfronthosting.co.za> Zachary Ware added the comment: This should be fixed by PR624 and PR625. ---------- assignee: -> zach.ware components: +Tests stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:41:21 2017 From: report at bugs.python.org (Zachary Ware) Date: Sun, 12 Mar 2017 04:41:21 +0000 Subject: [issue29763] test_site failing on AppVeyor In-Reply-To: <1489009179.7.0.320606146583.issue29763@psf.upfronthosting.co.za> Message-ID: <1489293681.86.0.678357546222.issue29763@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:46:08 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Sun, 12 Mar 2017 04:46:08 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1489293125.83.0.492750228094.issue28685@psf.upfronthosting.co.za> Message-ID: Elliot Gorokhovsky added the comment: Ya, that makes sense... I just don't get why it's faster at all, then! Because if we add the (v==w) check, and the tp_richcompare check, how is unsafe_object_compare any different from PyObject_RichComareBool? Is it that we're saving function calls? (PyObject_RichCompareBool calls do_richcompare, so it's one extra call IIRC). On Sat, Mar 11, 2017 at 9:32 PM Tim Peters wrote: > > Tim Peters added the comment: > > The impact would be small: it would add one (or so) pointer-equality > compare that, in practice, will always say "yup, they're equal". Dirt > cheap, and the branch is 100% predictable. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:48:31 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 04:48:31 +0000 Subject: [issue29656] Change "make patchcheck" to be branch aware In-Reply-To: <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za> Message-ID: <1489294111.3.0.393776978919.issue29656@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +514 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:48:52 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 04:48:52 +0000 Subject: [issue29656] Change "make patchcheck" to be branch aware In-Reply-To: <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za> Message-ID: <1489294132.14.0.226109064015.issue29656@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +515 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 11 23:50:03 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Sun, 12 Mar 2017 04:50:03 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1489292007.1.0.754585357181.issue28685@psf.upfronthosting.co.za> Message-ID: Elliot Gorokhovsky added the comment: Eryk Sun: Thanks for your detailed response. I'm curious, though: can you figure out why those other two examples *didn't* fail? It's driving me crazy! For reference: https://bugs.python.org/msg289435 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 00:07:52 2017 From: report at bugs.python.org (Tim Peters) Date: Sun, 12 Mar 2017 05:07:52 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489295272.97.0.340730239961.issue28685@psf.upfronthosting.co.za> Tim Peters added the comment: Elliot, PyObject_RichCompareBool calls PyObject_RichCompare. That in turn does some checks, hides a small mountain of tests in the expansions of the recursion-checking macros, and calls do_richcompare. That in turn does some useless (in the cases you're aiming at) tests and finally gets around to invoking tp_richcompare. Your patch gets to that final step at once. I'm surprised you didn't know that ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 00:11:39 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Sun, 12 Mar 2017 05:11:39 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1489295272.97.0.340730239961.issue28685@psf.upfronthosting.co.za> Message-ID: Elliot Gorokhovsky added the comment: I am embarrassed! That's why I said IIRC... I remembered that either RichCompare calls RichCompareBool, or the other way around, and I was too lazy to check :) I did remember about do_richcompare, though! On Sat, Mar 11, 2017 at 10:07 PM Tim Peters wrote: > > Tim Peters added the comment: > > Elliot, PyObject_RichCompareBool calls PyObject_RichCompare. That in turn > does some checks, hides a small mountain of tests in the expansions of the > recursion-checking macros, and calls do_richcompare. That in turn does > some useless (in the cases you're aiming at) tests and finally gets around > to invoking tp_richcompare. Your patch gets to that final step at once. > > I'm surprised you didn't know that ;-) > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 00:40:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 05:40:24 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1489297224.23.0.316396652904.issue26121@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests are failed only on s390x RHEL 3.x. http://buildbot.python.org/all/builders/s390x%20RHEL%203.x/builds/446/steps/test/logs/stdio ====================================================================== FAIL: test_mtestfile (test.test_math.MathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z/build/Lib/test/test_math.py", line 1287, in test_mtestfile '\n '.join(failures)) AssertionError: Failures in test_mtestfile: gam0003: gamma(-inf): expected 'ValueError', got nan (not equal) gam0045: gamma(1e-160): expected 1e+160, got 1.0000000000000063e+160 (error = 6.24e+145 (40 ulps); permitted error = 0 or 20 ulps) gam0046: gamma(1e-308): expected 1e+308, got 1.0000000000000136e+308 (error = 1.36e+294 (68 ulps); permitted error = 0 or 20 ulps) gam0047: gamma(5.6e-309): expected 1.7857142857142848e+308, got 1.785714285714199e+308 (error = 8.58e+294 (430 ulps); permitted error = 0 or 20 ulps) gam0065: gamma(-1e-160): expected -1e+160, got -1.0000000000000063e+160 (error = 6.24e+145 (40 ulps); permitted error = 0 or 20 ulps) gam0066: gamma(-1e-308): expected -1e+308, got -1.0000000000000136e+308 (error = 1.36e+294 (68 ulps); permitted error = 0 or 20 ulps) gam0067: gamma(-5.6e-309): expected -1.7857142857142848e+308, got -1.785714285714199e+308 (error = 8.58e+294 (430 ulps); permitted error = 0 or 20 ulps) gam0081: gamma(-1.0000000000000002): expected 4503599627370495.5, got 4503599627370484.5 (error = 11 (22 ulps); permitted error = 0 or 20 ulps) gam0084: gamma(-100.00000000000001): expected -7.540083334883109e-145, got -7.540083334882688e-145 (error = 4.21e-158 (296 ulps); permitted error = 0 or 20 ulps) gam0085: gamma(-99.99999999999999): expected 7.540083334884096e-145, got 7.540083334884402e-145 (error = 3.06e-158 (215 ulps); permitted error = 0 or 20 ulps) gam0100: gamma(170.0): expected 4.269068009004705e+304, got 4.269068009005011e+304 (error = 3.06e+291 (628 ulps); permitted error = 0 or 20 ulps) gam0101: gamma(171.0): expected 7.257415615307999e+306, got 7.257415615308882e+306 (error = 8.83e+293 (708 ulps); permitted error = 0 or 20 ulps) gam0102: gamma(171.624): expected 1.7942117599248104e+308, got 1.794211759924979e+308 (error = 1.69e+295 (845 ulps); permitted error = 0 or 20 ulps) gam0120: gamma(-100.5): expected -3.3536908198076787e-159, got -3.353690819807666e-159 (error = 1.26e-173 (25 ulps); permitted error = 0 or 20 ulps) gam0121: gamma(-160.5): expected -5.255546447007829e-286, got -5.255546447008121e-286 (error = 2.92e-299 (313 ulps); permitted error = 0 or 20 ulps) gam0122: gamma(-170.5): expected -3.3127395215386074e-308, got -3.312739521538679e-308 (error = 7.16e-322 (145 ulps); permitted error = 0 or 20 ulps) gam0140: gamma(-63.349078729022985): expected 4.177797167776188e-88, got 4.177797167776136e-88 (error = 5.19e-102 (93 ulps); permitted error = 0 or 20 ulps) gam0141: gamma(-127.45117632943295): expected 1.183111089623681e-214, got 1.183111089623727e-214 (error = 4.6e-228 (223 ulps); permitted error = 0 or 20 ulps) ---------------------------------------------------------------------- ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 00:45:09 2017 From: report at bugs.python.org (Max) Date: Sun, 12 Mar 2017 05:45:09 +0000 Subject: [issue29797] Deadlock with multiprocessing.Queue() Message-ID: <1489297509.89.0.0510120322322.issue29797@psf.upfronthosting.co.za> New submission from Max: Using multiprocessing.Queue() with several processes writing very fast results in a deadlock both on Windows and UNIX. For example, this code: from multiprocessing import Process, Queue, Manager import time, sys def simulate(q, n_results): for i in range(n_results): time.sleep(0.01) q.put(i) def main(): n_workers = int(sys.argv[1]) n_results = int(sys.argv[2]) q = Queue() proc_list = [Process(target=simulate, args=(q, n_results), daemon=True) for i in range(n_workers)] for proc in proc_list: proc.start() for i in range(5): time.sleep(1) print('current approximate queue size:', q.qsize()) alive = [p.pid for p in proc_list if p.is_alive()] if alive: print(len(alive), 'processes alive; among them:', alive[:5]) else: break for p in proc_list: p.join() print('final appr queue size', q.qsize()) if __name__ == '__main__': main() hangs on Windows 10 (python 3.6) with 2 workers and 1000 results each, and on Ubuntu 16.04 (python 3.5) with 100 workers and 100 results each. The print out shows that the queue has reached the full size, but a bunch of processes are still alive. Presumably, they somehow manage to lock themselves out even though they don't depend on each other (must be in the implementation of Queue()): current approximate queue size: 9984 47 processes alive; among them: [2238, 2241, 2242, 2244, 2247] current approximate queue size: 10000 47 processes alive; among them: [2238, 2241, 2242, 2244, 2247] The deadlock disappears once multiprocessing.Queue() is replaced with multiprocessing.Manager().Queue() - or at least I wasn't able to replicate it with a reasonable number of processes and results. ---------- components: Library (Lib) messages: 289479 nosy: max priority: normal severity: normal status: open title: Deadlock with multiprocessing.Queue() type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 01:12:36 2017 From: report at bugs.python.org (Tim Peters) Date: Sun, 12 Mar 2017 06:12:36 +0000 Subject: [issue29797] Deadlock with multiprocessing.Queue() In-Reply-To: <1489297509.89.0.0510120322322.issue29797@psf.upfronthosting.co.za> Message-ID: <1489299156.13.0.117349518231.issue29797@psf.upfronthosting.co.za> Tim Peters added the comment: I think this is expected. Add this as the first line of `simulate()` and the problem should go away: q.cancel_join_thread() As the docs say, a Queue works with a background thread, which feeds incoming data from an internal buffer to a (interprocess) pipe. By default, a process using the Queue attempts to join that thread when the process exits. But since you never take anything off the queue, the thread waits forever, hoping for the pipe to drain so it can feed in the rest of its buffer. But see the docs for why you don't really want to use .cancel_join_thread(): the process will just exit then, and the data in the internal buffer will most likely simply be lost. A Manager.Queue doesn't have this problem because it runs in its own (Manager) process: q.put() sends the data to that process at once, without buffering anything. So if you have write-only Queues, that's the way to go ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 01:13:31 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 06:13:31 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" Message-ID: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> New submission from Nick Coghlan: While backporting issue 29656 to get "make patchcheck" to play nice with git PR branches, I discovered an incompatibility between the way "git worktree" works and the assumptions in "patchcheck.py". Specifically, in a worktree, ".git" is a file, rather than a directory: $ cat .git gitdir: /home/ncoghlan/devel/cpython/.git/worktrees/py27 So the current isdir() check should be relaxed to just an exists() check. ---------- assignee: ncoghlan components: Demos and Tools messages: 289481 nosy: ncoghlan priority: normal severity: normal status: open title: Handle "git worktree" in "make patchcheck" type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 01:16:27 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 06:16:27 +0000 Subject: [issue29656] Change "make patchcheck" to be branch aware In-Reply-To: <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za> Message-ID: <1489299387.41.0.178646656564.issue29656@psf.upfronthosting.co.za> Nick Coghlan added the comment: http://bugs.python.org/issue29798 is a follow-up issue to make the patchcheck script compatible with `git worktree`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 01:16:45 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 06:16:45 +0000 Subject: [issue29656] Change "make patchcheck" to be branch aware In-Reply-To: <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za> Message-ID: <1489299405.16.0.43108698306.issue29656@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 01:34:42 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 06:34:42 +0000 Subject: [issue29656] Change "make patchcheck" to be branch aware In-Reply-To: <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za> Message-ID: <1489300482.65.0.831729598003.issue29656@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +516 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 01:57:14 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 06:57:14 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" In-Reply-To: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> Message-ID: <1489301834.35.0.344498264161.issue29798@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +517 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 03:15:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 07:15:37 +0000 Subject: [issue29746] Update marshal docs to Python 3 In-Reply-To: <1488883267.82.0.811271477172.issue29746@psf.upfronthosting.co.za> Message-ID: <1489302937.33.0.485763406557.issue29746@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +518 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 03:19:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 07:19:04 +0000 Subject: [issue29746] Update marshal docs to Python 3 In-Reply-To: <1488883267.82.0.811271477172.issue29746@psf.upfronthosting.co.za> Message-ID: <1489303144.05.0.687611178821.issue29746@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +519 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 03:41:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 07:41:51 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1489304511.53.0.565187645775.issue29730@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it would be better to replace PyNumber_Check() with PyIndex_Check() and change error messages to more specific. In IO related functions the accepted values are integers and None. In bytes/bytearray methods -- integers and bytes-like objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 04:09:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 08:09:08 +0000 Subject: [issue28749] Fixed the documentation of the mapping codec APIs In-Reply-To: <1479637798.25.0.994184606714.issue28749@psf.upfronthosting.co.za> Message-ID: <1489306148.02.0.71599877546.issue28749@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Do you still have objections Marc-Andre? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 04:15:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 08:15:07 +0000 Subject: [issue25996] Add support of file descriptor in os.scandir() In-Reply-To: <1451758238.49.0.729670752807.issue25996@psf.upfronthosting.co.za> Message-ID: <1489306507.64.0.557491153818.issue25996@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your investigation Eryk. Helpful as always. Since I have no access to Windows I left this feature Unix-only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 04:16:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 08:16:34 +0000 Subject: [issue29746] Update marshal docs to Python 3 In-Reply-To: <1488883267.82.0.811271477172.issue29746@psf.upfronthosting.co.za> Message-ID: <1489306594.16.0.657370133582.issue29746@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 04:39:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 08:39:46 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1489307986.6.0.131353805134.issue26121@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +520 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 04:42:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 08:42:15 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1489308135.97.0.687560753336.issue26121@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 632 switch on using libc implementation on Windows. Will see how AppVeyor tests passed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 04:48:00 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 12 Mar 2017 08:48:00 +0000 Subject: [issue29797] Deadlock with multiprocessing.Queue() In-Reply-To: <1489297509.89.0.0510120322322.issue29797@psf.upfronthosting.co.za> Message-ID: <1489308480.63.0.0988033700706.issue29797@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 05:00:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 09:00:27 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1489309227.56.0.101958149413.issue26121@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are accuracy issues with tgamma() and lgamma() on Windows. But less than on OS X. ====================================================================== FAIL: test_mtestfile (test.test_math.MathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_math.py", line 1287, in test_mtestfile '\n '.join(failures)) AssertionError: Failures in test_mtestfile: lgam0085: lgamma(-99.99999999999999): expected -331.85460524980596, got -331.86198661322277 (error = 0.00738 (129854318490 ulps); permitted error = 1e-15 or 5 ulps) gam0085: gamma(-99.99999999999999): expected 7.540083334884096e-145, got 7.484632144060724e-145 (error = 5.55e-147 (38979707393612 ulps); permitted error = 0 or 20 ulps) gam0124: gamma(-176.5): expected -1.196e-321, got 0.0 (error = 1.2e-321 (243 ulps); permitted error = 0 or 20 ulps) ---------------------------------------------------------------------- Does this mean that we should not use libc implementations of tgamma() and lgamma() on Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 05:17:33 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 12 Mar 2017 09:17:33 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1489310253.96.0.934579051849.issue29730@psf.upfronthosting.co.za> Oren Milman added the comment: "In bytes/bytearray methods -- integers and bytes-like objects." (I guess you refer to parse_args_finds_byte (in Objects/bytes_methods.c)) so you suggest that in case (!PyIndex_Check(tmp_subobj)), we also check whether (PyByteArray_Check(tmp_subobj) or PyBytes_Check(tmp_subobj)), and raise an error if needed? anyway, you and Raymond suggest different things. how do we proceed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 05:34:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 09:34:48 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1489311288.04.0.18328202024.issue29730@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The call of PyNumber_Check() is redundant if we don't bother about error message. But if we want to have accurate error message we should check types before converting. In parse_args_finds_byte we should check rather PyObject_CheckBuffer() (and maybe PyBytes_Check() for fast path if this makes sense). Perhaps some methods need to check also PyTuple_Check(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 05:36:09 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 09:36:09 +0000 Subject: [issue29656] Change "make patchcheck" to be branch aware In-Reply-To: <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za> Message-ID: <1489311369.52.0.421106281457.issue29656@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 05:39:44 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 09:39:44 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" In-Reply-To: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> Message-ID: <1489311584.88.0.775825132394.issue29798@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +521 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 05:40:03 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 09:40:03 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" In-Reply-To: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> Message-ID: <1489311603.57.0.139471701216.issue29798@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +522 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 05:42:46 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 09:42:46 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" In-Reply-To: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> Message-ID: <1489311766.95.0.269733734511.issue29798@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +523 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 05:47:32 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 12 Mar 2017 09:47:32 +0000 Subject: [issue29797] Deadlock with multiprocessing.Queue() In-Reply-To: <1489297509.89.0.0510120322322.issue29797@psf.upfronthosting.co.za> Message-ID: <1489312052.72.0.641484691899.issue29797@psf.upfronthosting.co.za> Eryk Sun added the comment: On Windows the "QueueFeederThread" in each child process is blocked in WaitForMultipleObjects in PipeConnection._send_bytes. The pipe buffer size is 8 KiB, and each pickled int is 5-6 bytes. With 2 processes the pipe is full after sending (256 + 469) * 2 == 1450 int objects. Joining this feeder thread waits until all of the data is sent, however long that takes. This appears to be working correctly as designed. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 05:50:58 2017 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 12 Mar 2017 09:50:58 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1489312258.06.0.342210668505.issue26121@psf.upfronthosting.co.za> Mark Dickinson added the comment: Please can we revert to using the existing implementations of lgamma and gamma on all platforms? It's clear that there are many issues with OS-provided implementations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 06:04:15 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 10:04:15 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" In-Reply-To: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> Message-ID: <1489313055.54.0.178809594187.issue29798@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 06:25:41 2017 From: report at bugs.python.org (Max) Date: Sun, 12 Mar 2017 10:25:41 +0000 Subject: [issue29797] Deadlock with multiprocessing.Queue() In-Reply-To: <1489297509.89.0.0510120322322.issue29797@psf.upfronthosting.co.za> Message-ID: <1489314341.65.0.833740687957.issue29797@psf.upfronthosting.co.za> Max added the comment: Yes, this makes sense. My bad, I didn't realize processes might need to wait until the queue is consumed. I don't think there's any need to update the docs either, nobody should have production code that never reads the queue (mine was a test of some other issue). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 06:40:28 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 10:40:28 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489315228.24.0.0614650930574.issue29723@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +524 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 06:40:28 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 10:40:28 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1489315228.33.0.537208345301.issue29319@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 06:42:58 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 10:42:58 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489315378.27.0.777489691447.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've merged PR 575 to master, and 636 is pending a successful Travis run for 3.6. Both branches still need NEWS entries- I'll do those as independent PRs rather than cherry-picking (since cherry picking NEWS changes is currently still doomed to fail) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 06:48:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 10:48:24 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1489315704.81.0.943589447974.issue26121@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +526 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 06:50:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 10:50:42 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1489315842.35.0.585988545975.issue26121@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 637 revert to using the own implementations of lgamma and gamma on all platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 06:54:05 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 10:54:05 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489316045.82.0.772119261095.issue29723@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +527 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 07:13:55 2017 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sun, 12 Mar 2017 11:13:55 +0000 Subject: [issue29779] New environment variable PYTHONHISTORY In-Reply-To: <1489133424.79.0.6086605998.issue29779@psf.upfronthosting.co.za> Message-ID: <1489317235.0.0.0883559997511.issue29779@psf.upfronthosting.co.za> Changes by Chi Hsuan Yen : ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 07:36:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 11:36:59 +0000 Subject: [issue15695] Correct __sizeof__ support for StgDict In-Reply-To: <1345144416.71.0.984691068113.issue15695@psf.upfronthosting.co.za> Message-ID: <1489318619.85.0.264835861608.issue15695@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +528 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 07:38:57 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 11:38:57 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489318737.63.0.25743666417.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: Noting for the record: Steve reviewed & approved the original PR before I merged that and did the backport to 3.6. With the new test case ensuring sys.path configuration consistency and Paul's report of success when checking the original problem from issue 29319 was resolved, I think this is OK to just go out with 3.6.1 final rather than needing an rc2 release. ---------- assignee: steve.dower -> ncoghlan resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 07:41:29 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 12 Mar 2017 11:41:29 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1489318889.37.0.919311725895.issue29319@psf.upfronthosting.co.za> Nick Coghlan added the comment: With the fix for issue 29723 merged, this should be properly resolved now (and the fix available with 3.6.1). ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 07:42:51 2017 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sun, 12 Mar 2017 11:42:51 +0000 Subject: [issue29779] New environment variable PYTHONHISTORY In-Reply-To: <1489133424.79.0.6086605998.issue29779@psf.upfronthosting.co.za> Message-ID: <1489318971.89.0.0703868184894.issue29779@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: That's a great feature! Here's a question: what should be CPython's behavior when PYTHONHISTORY is explicitly set to empty? Currently there's an error: $ PYTHONHISTORY= ./python Python 3.7.0a0 (master:f6595983e08fe20cf06a2535d74d912c6dbb044f, Mar 12 2017, 19:22:29) [GCC 6.3.1 20170306] on linux Type "help", "copyright", "credits" or "license" for more information. >>> Error in atexit._run_exitfuncs: FileNotFoundError: [Errno 2] No such file or directory Maybe it's better to just disable the history functionality in this case? By the way, seems comments starting from https://github.com/python/cpython/pull/473/files#diff-f34a16518c608b2ca946d3f5ca0a1942R419 should be updated too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 07:55:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 11:55:48 +0000 Subject: [issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None In-Reply-To: <1269807316.51.0.487538621224.issue8256@psf.upfronthosting.co.za> Message-ID: <1489319748.49.0.439335074806.issue8256@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +529 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 08:11:05 2017 From: report at bugs.python.org (Shoham Peller) Date: Sun, 12 Mar 2017 12:11:05 +0000 Subject: [issue8450] httplib: false BadStatusLine() raised In-Reply-To: <1271630731.08.0.327097174192.issue8450@psf.upfronthosting.co.za> Message-ID: <1489320665.45.0.760450461987.issue8450@psf.upfronthosting.co.za> Shoham Peller added the comment: How about back-porting the v3.5 fix, and the new "RemoteDisconnected" exception? Is that reasonable? ---------- nosy: +Shoham Peller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 08:18:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 12:18:22 +0000 Subject: [issue15695] Correct __sizeof__ support for StgDict In-Reply-To: <1345144416.71.0.984691068113.issue15695@psf.upfronthosting.co.za> Message-ID: <1489321102.02.0.435150277529.issue15695@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 08:23:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 12:23:40 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1489321420.74.0.102071986601.issue26121@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Done. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 08:31:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 12:31:34 +0000 Subject: [issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None In-Reply-To: <1269807316.51.0.487538621224.issue8256@psf.upfronthosting.co.za> Message-ID: <1489321894.17.0.690654797615.issue8256@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +530 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 08:41:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 12:41:28 +0000 Subject: [issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None In-Reply-To: <1269807316.51.0.487538621224.issue8256@psf.upfronthosting.co.za> Message-ID: <1489322488.12.0.416602934056.issue8256@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +531 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 08:49:16 2017 From: report at bugs.python.org (Jaysinh shukla) Date: Sun, 12 Mar 2017 12:49:16 +0000 Subject: [issue29799] Add tests for header API of 'urllib.request.Request' class Message-ID: <1489322956.53.0.812108141257.issue29799@psf.upfronthosting.co.za> Changes by Jaysinh shukla : ---------- components: Tests nosy: jaysinh.shukla priority: normal severity: normal status: open title: Add tests for header API of 'urllib.request.Request' class type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 08:51:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 12:51:30 +0000 Subject: [issue28667] FD_SETSIZE is unsigned on FreeBSD In-Reply-To: <1478872990.6.0.256289601446.issue28667@psf.upfronthosting.co.za> Message-ID: <1489323090.69.0.248387971826.issue28667@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 08:54:42 2017 From: report at bugs.python.org (Jaysinh shukla) Date: Sun, 12 Mar 2017 12:54:42 +0000 Subject: [issue29799] Add tests for header API of 'urllib.request.Request' class Message-ID: <1489323282.55.0.846725204888.issue29799@psf.upfronthosting.co.za> Changes by Jaysinh shukla : ---------- pull_requests: +532 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 09:06:37 2017 From: report at bugs.python.org (Steve Dower) Date: Sun, 12 Mar 2017 13:06:37 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489323997.61.0.693793103641.issue29723@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks, Nick! I agree that this alone isn't worth a second RC, though if we fix another "nearly worth it" (especially anything related to the github transition) we may want to consider it still. Ned - I'd be okay to sneak out another release this week if we want, without slipping the final release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 10:03:38 2017 From: report at bugs.python.org (Claudiu Popa) Date: Sun, 12 Mar 2017 14:03:38 +0000 Subject: [issue29051] Improve error reporting involving f-strings (PEP 498) In-Reply-To: <1482494461.91.0.191852219403.issue29051@psf.upfronthosting.co.za> Message-ID: <1489327418.79.0.974196410237.issue29051@psf.upfronthosting.co.za> Claudiu Popa added the comment: I'm adding another example here, where the lineno reporting is wrong: from ast import parse n = parse(''' def test(): return f"{a}" ''') f = n.body[0].body[0].value.values[0] n = f.value print("name lineno", n.lineno) In this example, the line number of the f-string inner variable is 1, while it should be 3. As Mark Shannon said, this bug is affecting tools such as pyflakes and pylint. ---------- nosy: +Claudiu.Popa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 11:52:23 2017 From: report at bugs.python.org (Tim Peters) Date: Sun, 12 Mar 2017 15:52:23 +0000 Subject: [issue29797] Deadlock with multiprocessing.Queue() In-Reply-To: <1489297509.89.0.0510120322322.issue29797@psf.upfronthosting.co.za> Message-ID: <1489333943.68.0.20494443652.issue29797@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 12:29:57 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 12 Mar 2017 16:29:57 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1489336197.71.0.817283635929.issue29730@psf.upfronthosting.co.za> Oren Milman added the comment: "Perhaps some methods need to check also PyTuple_Check()." which methods? anyway, a new patch diff file is attached, according to your other seggustions, Serhiy. (I ran the test module, and some tests of my own, and it seems that the patch doesn't break anything.) ---------- keywords: +patch Added file: http://bugs.python.org/file46721/patchVer2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 12:54:22 2017 From: report at bugs.python.org (paul j3) Date: Sun, 12 Mar 2017 16:54:22 +0000 Subject: [issue29715] Arparse improperly handles "-_" In-Reply-To: <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za> Message-ID: <1489337662.09.0.685165255248.issue29715@psf.upfronthosting.co.za> Changes by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 12:59:15 2017 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 12 Mar 2017 16:59:15 +0000 Subject: [issue29600] Returning an exception object from a coroutine triggers implicit exception chaining?!? In-Reply-To: <1487511889.54.0.248268466732.issue29600@psf.upfronthosting.co.za> Message-ID: <1489337955.29.0.705064017346.issue29600@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 13:01:30 2017 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 12 Mar 2017 17:01:30 +0000 Subject: [issue29600] Returning an exception object from a coroutine triggers implicit exception chaining?!? In-Reply-To: <1487511889.54.0.248268466732.issue29600@psf.upfronthosting.co.za> Message-ID: <1489338090.5.0.0774601069962.issue29600@psf.upfronthosting.co.za> Yury Selivanov added the comment: What a bizarre bug. Created a PR with a fix. Nathaniel, please put me in a nosy list when you submit issues about generators/coroutines. ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 13:45:04 2017 From: report at bugs.python.org (paul j3) Date: Sun, 12 Mar 2017 17:45:04 +0000 Subject: [issue29715] Arparse improperly handles "-_" In-Reply-To: <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za> Message-ID: <1489340704.53.0.19495012093.issue29715@psf.upfronthosting.co.za> paul j3 added the comment: I think that this string falls through to the last case in 'parser._parse_optional' (the first parsing loop) # it was meant to be an optional but there is no such option # in this parser (though it might be a valid option in a subparser) return None, arg_string, None It has the format of a optional flag, not a positional argument. If preceded by '--' it gets classed as argument. (In the second, main, parsing loop) Since it doesn't match any defined Actions it gets put in the list of 'extras' (as returned by 'parse_known_args'). But the parser also runs a check on required arguments, and finds the positional, 'first', was not filled. So that's the error that's raised. For example if I provide another string that fills the positional: In [5]: parser.parse_known_args(['-_','other']) Out[5]: (Namespace(first='other'), ['-_']) 'parse_args' would produce a 'error: unrecognized arguments: -_' error. I don't see how the error message could be improved without some major changes in the testing and parsing. It would either have to disallow unmatched optional's flags (and maybe break subparsers) or deduce that this 'extra' was meant for the unfilled positional. Bernard has argued that it is better to raise an error in ambiguous cases, than to make too many assumptions about what the user intended. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 15:22:21 2017 From: report at bugs.python.org (Max) Date: Sun, 12 Mar 2017 19:22:21 +0000 Subject: [issue29795] Clarify how to share multiprocessing primitives In-Reply-To: <1489260349.05.0.251290010989.issue29795@psf.upfronthosting.co.za> Message-ID: <1489346541.31.0.816526431745.issue29795@psf.upfronthosting.co.za> Max added the comment: Somewhat related is this statement from Programming Guidelines: > When using the spawn or forkserver start methods many types from multiprocessing need to be picklable so that child processes can use them. However, one should generally avoid sending shared objects to other processes using pipes or queues. Instead you should arrange the program so that a process which needs access to a shared resource created elsewhere can inherit it from an ancestor process. Since on Windows, even "inheritance" is really the same pickle + pipe executed inside CPython, I assume the entire paragraph is intended for UNIX platform only (might be worth clarifying, btw). On Linux, "inheritance" works faster, and can deal with more complex objects compared to pickle with pipe/queue -- but it's equally true whether it's inheritance through global variables or through arguments to the target function. There's no reason So the text I proposed earlier wouldn't conflict with this one. It would just encourage programmers to use function arguments instead of global variables: because it's doesn't matter on Linux but makes the code portable to Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 15:29:56 2017 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 12 Mar 2017 19:29:56 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1489346996.24.0.0481461409704.issue29742@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +534 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 15:30:20 2017 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 12 Mar 2017 19:30:20 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1489347020.51.0.604058468228.issue29742@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +535 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 16:00:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 20:00:20 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1489348820.89.0.562653839612.issue29730@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please open a PR for review. Checking PyTuple_Check() is needed if this code is used in startswith() and endswith(). "integer argument or None expected" -- I'm not sure this wording is correct enough. What wording is used in other similar code? I'm sure there other functions that accept int or None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 16:24:29 2017 From: report at bugs.python.org (Brett Cannon) Date: Sun, 12 Mar 2017 20:24:29 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1489350269.69.0.588782670333.issue26121@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 16:26:41 2017 From: report at bugs.python.org (Brett Cannon) Date: Sun, 12 Mar 2017 20:26:41 +0000 Subject: [issue29688] Add support for Path.absolute() In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1489350401.43.0.924787768905.issue29688@psf.upfronthosting.co.za> Brett Cannon added the comment: "What's the rationale for not calling self._flavour.pathmod.abspath() to implement absolute()?" Beats me. :) It's just how Antoine wrote it and that's all I know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 16:36:41 2017 From: report at bugs.python.org (Elliot Gorokhovsky) Date: Sun, 12 Mar 2017 20:36:41 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1489293125.83.0.492750228094.issue28685@psf.upfronthosting.co.za> Message-ID: Elliot Gorokhovsky added the comment: OK, I added the safety check to unsafe_object_compare. I verified that it matches the current implementation on all the tests proposed in this thread. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 16:52:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 20:52:49 +0000 Subject: [issue29688] Add support for Path.absolute() In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1489351969.3.0.589063053771.issue29688@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: posixpath.abspath() collapses "//.." to "", this is not correct. Not sure about ntpath.abspath(). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 17:04:58 2017 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 12 Mar 2017 21:04:58 +0000 Subject: [issue29600] Returning an exception object from a coroutine triggers implicit exception chaining?!? In-Reply-To: <1487511889.54.0.248268466732.issue29600@psf.upfronthosting.co.za> Message-ID: <1489352698.16.0.282113156087.issue29600@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 17:06:52 2017 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 12 Mar 2017 21:06:52 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1489352812.14.0.428363898956.issue29742@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 17:10:14 2017 From: report at bugs.python.org (Michael Seifert) Date: Sun, 12 Mar 2017 21:10:14 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused Message-ID: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> New submission from Michael Seifert: It's possible to create a segfault when one (inappropriatly) changes the functools.partial.keywords attribute manually. A minimal example reproducing the segfault is: >>> from functools import partial >>> p = partial(int) >>> p.keywords[1] = 10 >>> repr(p) System: Windows 10 Python: 3.5.3, 3.6.0, master-branch ---------- components: Library (Lib) messages: 289510 nosy: MSeifert priority: normal severity: normal status: open title: functools.partial segfaults in repr when keywords attribute is abused type: crash versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 17:13:07 2017 From: report at bugs.python.org (Michael Seifert) Date: Sun, 12 Mar 2017 21:13:07 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1489353187.13.0.399559926731.issue29800@psf.upfronthosting.co.za> Changes by Michael Seifert : ---------- pull_requests: +536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 17:43:43 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 12 Mar 2017 21:43:43 +0000 Subject: [issue15082] [httplib] httplib.BadStatusLine on any HTTPS connection in certain unknown cases. In-Reply-To: <1339811528.79.0.0690651710917.issue15082@psf.upfronthosting.co.za> Message-ID: <1489355023.81.0.963798121805.issue15082@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> fixed stage: -> test needed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 17:48:19 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 12 Mar 2017 21:48:19 +0000 Subject: [issue7427] BadStatusLine is hell to debug In-Reply-To: <1259855564.36.0.140869506599.issue7427@psf.upfronthosting.co.za> Message-ID: <1489355299.3.0.987407555624.issue7427@psf.upfronthosting.co.za> Martin Panter added the comment: This change was only made in 2.7a4, not 2.6 ---------- versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 17:53:16 2017 From: report at bugs.python.org (Alexander Todorov) Date: Sun, 12 Mar 2017 21:53:16 +0000 Subject: [issue29756] Improve documentation for list methods that compare items by equality In-Reply-To: <1488981833.28.0.455455965624.issue29756@psf.upfronthosting.co.za> Message-ID: <1489355596.92.0.947827040639.issue29756@psf.upfronthosting.co.za> Alexander Todorov added the comment: Hi folks, I have another very similar issue, it could be the same root cause. Let me know if it is. assert 3 == 3.0 will pass self.assertEqual(3, 3.0) - will pass this had the nasty side effect of my test suite not catching a problem with SUT. I have updated the test suite to validate the result type as well but want to know how to file this use-case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 17:56:02 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 12 Mar 2017 21:56:02 +0000 Subject: [issue8450] httplib: false BadStatusLine() raised In-Reply-To: <1271630731.08.0.327097174192.issue8450@psf.upfronthosting.co.za> Message-ID: <1489355762.84.0.100822498262.issue8450@psf.upfronthosting.co.za> Martin Panter added the comment: I don?t think so. It is best to avoid a new exception type (even a subclass) in a bug fix. That would break code which checks ?type(exc) == BadStatusLine? or similar. Specific exception messages are supposed to be implementation details, and the current message is already quirky due to the change from Issue 7427 (released in 2.7a4). That is why I thought it might be reasonable to just change the exception message in a bug fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 18:00:47 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 12 Mar 2017 22:00:47 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1489356047.24.0.0249528273508.issue29730@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +537 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 18:01:23 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 12 Mar 2017 22:01:23 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1489356083.81.0.109087763533.issue29730@psf.upfronthosting.co.za> Oren Milman added the comment: I am sorry, but I guess I am missing something about startswith() and endswith(). ISTM that PyTuple_Check() is already called by unicode_startswith, unicode_endswith and _Py_bytes_tailmatch, which already raise a TypeError with an appropriate error message (e.g. "%s first arg must be bytes or a tuple of bytes, not %s"). I searched the codebase, and found that in most places, if PyIndex_Check(obj) is true, then obj is described as 'integer' in error messages. rarely, obj would be described as 'int'. I found only two relevant TypeError messages of functions that accept an integer type or None (BTW, I took the term 'integer type' from https://docs.python.org/3.7/reference/atamodel.html?highlight=__index__#object.__index__.): - in Modules/posixmodule.c in dir_fd_converter(): PyErr_Format(PyExc_TypeError, "argument should be integer or None, not %.200s", Py_TYPE(o)->tp_name); - in Modules/_functoolsmodule.c in lru_cache_new(): PyErr_SetString(PyExc_TypeError, "maxsize should be integer or None"); so I changed the error messages in my patch to the form of 'argument should be ...' (which is, IMHO, much clearer). also, now that the new PR was created, should I close the old one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 18:32:47 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 12 Mar 2017 22:32:47 +0000 Subject: [issue29799] Add tests for header API of 'urllib.request.Request' class Message-ID: <1489357967.78.0.336863380753.issue29799@psf.upfronthosting.co.za> New submission from Martin Panter: I think the RequestTests class really belongs in test_urllib2, which already has a RequestHdrsTests class testing these APIs. BTW test_urllib.py (no 2) is mainly for testing the stuff that came from Python 2?s ?urllib? module, but the Request class is in ?urllib2? instead. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 18:39:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 12 Mar 2017 22:39:00 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1489358340.09.0.69964203261.issue29730@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Thank you Oren. ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 20:06:31 2017 From: report at bugs.python.org (Eryk Sun) Date: Mon, 13 Mar 2017 00:06:31 +0000 Subject: [issue29688] Add support for Path.absolute() In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1489363591.18.0.252408954954.issue29688@psf.upfronthosting.co.za> Eryk Sun added the comment: It's the same with ntpath.abspath since the underlying GetFullPathName function processes the path only as a string. OK, so it seems we're requiring that p.absolute().resolve() is the same as p.resolve(). Consider the following example: >>> p = Path('C:/symlink/../nul .eggs & spam') >>> print(p.absolute()) C:\symlink\..\nul .eggs & spam >>> print(os.path.abspath(p)) \\.\nul If the current absolute() result is fine, then I think resolve() should return \\.\nul, which means it needs to be expanded to handle device-path cases for which _getfinalpathname fails. We should be able to handle these cases by falling back on _getfullpathname. It's a separate issue, but here are some concrete examples that currently cause resolve() to fail. GetFinalPathNameByHandle will fail with ERROR_INVALID_FUNCTION or ERROR_INVALID_PARAMETER for devices that aren't file systems and thus do not support the particular NtQueryInformationFile and NtDeviceIoControlFile information classes and IOCTLs that it requests. Also, getting a handle via CreateFile can fail with ERROR_INVALID_PARAMETER for devices that require either read or write access such as CON. It can also fail with ERROR_ACCESS_DENIED for exclusive devices that are already open such as COM1. ERROR_ACCESS_DENIED can also be due to the file security denying the right to read attributes or synchronize since CreateFile implicitly requests those rights. There's also ERROR_SHARING_VIOLATION when trying to open a system paging file. These non-device PermissionError cases can be handled the same way that resolve() currently handles FileNotFoundError by trying to resolve the parent directory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 20:17:56 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 13 Mar 2017 00:17:56 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1489364276.25.0.779712913346.issue28810@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- pull_requests: +538 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 20:35:06 2017 From: report at bugs.python.org (ppperry) Date: Mon, 13 Mar 2017 00:35:06 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: Message-ID: <5b48ba352872fce6026ef05c227d24a5.squirrel@neptune.place.org> ppperry added the comment: ----- Doesn't youre skipping PyObject_RichCompareBool and directly getting tp_richcompare also mean that you bypass the NotImplemented checking? Thus, wouldn't this code, which raises a TypeError currently, silently work? class PointlessComparator: def __lt__(self, other): return NotImplemented [PointlessComparator(),PointlessComparator()].sort() ... ... ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 21:28:02 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 13 Mar 2017 01:28:02 +0000 Subject: [issue29756] Improve documentation for list methods that compare items by equality In-Reply-To: <1489355596.92.0.947827040639.issue29756@psf.upfronthosting.co.za> Message-ID: <20170313012700.GT5689@ando.pearwood.info> Steven D'Aprano added the comment: I'm afraid I don't know what SUT means. But 3 == 3.0 is the correct and expected behaviour. If you need to check that two values are both the same type and the same value, you have to validate the type and value separately. Changing the behaviour of == is ruled out for backwards compatability, but perhaps you could suggest a new === operator to check type and value. That would require some discussion on the Python Ideas mailing list, not just a feature request on the tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 22:08:24 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 13 Mar 2017 02:08:24 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1489370904.25.0.0977714813362.issue28856@psf.upfronthosting.co.za> Xiang Zhang added the comment: What's your opinions Alexander and Ethan? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 22:11:02 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 13 Mar 2017 02:11:02 +0000 Subject: [issue29756] Improve documentation for list methods that compare items by equality In-Reply-To: <1488981833.28.0.455455965624.issue29756@psf.upfronthosting.co.za> Message-ID: <1489371062.29.0.639037373837.issue29756@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 22:25:13 2017 From: report at bugs.python.org (Max Rothman) Date: Mon, 13 Mar 2017 02:25:13 +0000 Subject: [issue29715] Arparse improperly handles "-_" In-Reply-To: <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za> Message-ID: <1489371913.12.0.0889091278729.issue29715@psf.upfronthosting.co.za> Max Rothman added the comment: I think that makes sense, but there's still an open question: what should the correct way be to allow dashes to be present at the beginning of positional arguments? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 22:25:52 2017 From: report at bugs.python.org (Max) Date: Mon, 13 Mar 2017 02:25:52 +0000 Subject: [issue29795] Clarify how to share multiprocessing primitives In-Reply-To: <1489260349.05.0.251290010989.issue29795@psf.upfronthosting.co.za> Message-ID: <1489371952.8.0.300316658755.issue29795@psf.upfronthosting.co.za> Max added the comment: Actually, never mind, I think one of the paragraphs in the Programming Guidelines ("Explicitly pass resources to child processes") basically explains everything already. I just didn't notice it until @noxdafox pointed it out to me on SO. Close please. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 22:33:41 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 13 Mar 2017 02:33:41 +0000 Subject: [issue22576] ftplib documentation gives a wrong argument name for storbinary In-Reply-To: <1412714078.21.0.80330944433.issue22576@psf.upfronthosting.co.za> Message-ID: <1489372421.98.0.822553494362.issue22576@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +539 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 22:35:07 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 13 Mar 2017 02:35:07 +0000 Subject: [issue22576] ftplib documentation gives a wrong argument name for storbinary In-Reply-To: <1412714078.21.0.80330944433.issue22576@psf.upfronthosting.co.za> Message-ID: <1489372507.02.0.0763325876336.issue22576@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 22:46:39 2017 From: report at bugs.python.org (Tim Peters) Date: Mon, 13 Mar 2017 02:46:39 +0000 Subject: [issue28685] Optimizing list.sort() by performing safety checks in advance In-Reply-To: <1479071980.11.0.232140584241.issue28685@psf.upfronthosting.co.za> Message-ID: <1489373198.99.0.184858489076.issue28685@psf.upfronthosting.co.za> Tim Peters added the comment: @ppperry, I believe you're right - good catch! I expect the current patch would treat the NotImplemented return as meaning "the first argument is less than the second argument". I added a comment to the code (on github) suggesting an obvious fix for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 22:53:52 2017 From: report at bugs.python.org (artxyz) Date: Mon, 13 Mar 2017 02:53:52 +0000 Subject: [issue17560] problem using multiprocessing with really big objects? In-Reply-To: <1364399521.2.0.696890688109.issue17560@psf.upfronthosting.co.za> Message-ID: <1489373632.5.0.995245200588.issue17560@psf.upfronthosting.co.za> artxyz added the comment: This is still an issue in Python 2.7.5 Will it be fixed? ---------- nosy: +artxyz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 22:58:12 2017 From: report at bugs.python.org (shayan) Date: Mon, 13 Mar 2017 02:58:12 +0000 Subject: [issue29801] amazing! Message-ID: <1150825008.20170313055754@yahoo.com> New submission from shayan: Dear, You won't believe what I've just read, this is so amazing, read more at http://popular.wonderamau.tv/4948 Best, shili8_256 ---------- messages: 289525 nosy: SH4Y4N priority: normal severity: normal status: open title: amazing! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 22:58:49 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 13 Mar 2017 02:58:49 +0000 Subject: [issue29688] Add support for Path.absolute() In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1489373929.76.0.223814828695.issue29688@psf.upfronthosting.co.za> INADA Naoki added the comment: > posixpath.abspath() collapses "//.." to "", this is not correct. Not sure about ntpath.abspath(). I feel this is reasonable limitation, and expected behavior for some cases. So I think adding note about this in document is enough. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 22:59:38 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 13 Mar 2017 02:59:38 +0000 Subject: [issue29801] amazing! Message-ID: <1489373978.84.0.298019046406.issue29801@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- Removed message: http://bugs.python.org/msg289525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 22:59:58 2017 From: report at bugs.python.org (Zachary Ware) Date: Mon, 13 Mar 2017 02:59:58 +0000 Subject: [issue29801] Spam Message-ID: <1489373998.86.0.807219860328.issue29801@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: -SH4Y4N resolution: -> not a bug stage: -> resolved status: open -> closed title: amazing! -> Spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 23:40:11 2017 From: report at bugs.python.org (Davin Potts) Date: Mon, 13 Mar 2017 03:40:11 +0000 Subject: [issue17560] problem using multiprocessing with really big objects? In-Reply-To: <1364399521.2.0.696890688109.issue17560@psf.upfronthosting.co.za> Message-ID: <1489376411.94.0.0435281546363.issue17560@psf.upfronthosting.co.za> Davin Potts added the comment: @artxyz: The current release of 2.7 is 2.7.13 -- if you are still using 2.7.5 you might consider updating to the latest release. As pointed out in the text of the issue, the multiprocessing pickler has been made pluggable in 3.3 and it's been made more conveniently so in 3.6. The issue reported here arises from the constraints of working with large objects and pickle, hence the enhanced ability to take control of the multiprocessing pickler in 3.x applies. I'll assign this issue to myself as a reminder to create a blog post around this example and potentially include it as a motivating need for controlling the multiprocessing pickler in the documentation. ---------- assignee: -> davin nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 23:42:17 2017 From: report at bugs.python.org (Davin Potts) Date: Mon, 13 Mar 2017 03:42:17 +0000 Subject: [issue29795] Clarify how to share multiprocessing primitives In-Reply-To: <1489260349.05.0.251290010989.issue29795@psf.upfronthosting.co.za> Message-ID: <1489376537.52.0.287758528693.issue29795@psf.upfronthosting.co.za> Changes by Davin Potts : ---------- resolution: -> works for me stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 23:45:13 2017 From: report at bugs.python.org (artxyz) Date: Mon, 13 Mar 2017 03:45:13 +0000 Subject: [issue17560] problem using multiprocessing with really big objects? In-Reply-To: <1364399521.2.0.696890688109.issue17560@psf.upfronthosting.co.za> Message-ID: <1489376713.02.0.867333647091.issue17560@psf.upfronthosting.co.za> artxyz added the comment: @davin Thanks for your answer! I will update to the current version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 12 23:54:34 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 13 Mar 2017 03:54:34 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" In-Reply-To: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> Message-ID: <1489377274.97.0.238929720669.issue29798@psf.upfronthosting.co.za> Nick Coghlan added the comment: Turns out I missed another isdir() check in get_base_branch(), so this still isn't working properly in git worktree directories. ---------- resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 00:11:15 2017 From: report at bugs.python.org (paul j3) Date: Mon, 13 Mar 2017 04:11:15 +0000 Subject: [issue29715] Arparse improperly handles "-_" In-Reply-To: <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za> Message-ID: <1489378275.92.0.436711160823.issue29715@psf.upfronthosting.co.za> paul j3 added the comment: http://bugs.python.org/issue9334, 'argparse does not accept options taking arguments beginning with dash (regression from optparse)' is an old discussion about strings that begin with a dash and don't match defined flags. One proposal was to add a 'args_default_to_positional' parameter, and change the parsing that I described before to: + # behave more like optparse even if the argument looks like a option + if self.args_default_to_positional: + return None # instead of return None, arg_string, None There's a long discussion but nothing was changed (not even the test for negative numbers). Two work arounds still apply prog.py -- -_ # use -- to signal positional values prog.py --first=-_ # = to attach any string to optional (in my previous post I cited 'Bernard', I meant the module's original author, Steven Bethard. He's no longer actively involved in these bug/issues.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 00:26:59 2017 From: report at bugs.python.org (Artem Smotrakov) Date: Mon, 13 Mar 2017 04:26:59 +0000 Subject: [issue29802] A possible null-pointer dereference in struct.s_unpack_internal() Message-ID: <1489379218.66.0.044857321803.issue29802@psf.upfronthosting.co.za> New submission from Artem Smotrakov: Attached struct_unpack_crash.py results to a null-pointer dereference in s_unpack_internal() function of _struct module: ASAN:SIGSEGV ================================================================= ==20245==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7facd2cea83a bp 0x000000000000 sp 0x7ffd0250f860 T0) #0 0x7facd2cea839 in s_unpack_internal /home/artem/projects/python/src/cpython-asan/Modules/_struct.c:1515 #1 0x7facd2ceab69 in Struct_unpack_impl /home/artem/projects/python/src/cpython-asan/Modules/_struct.c:1570 #2 0x7facd2ceab69 in unpack_impl /home/artem/projects/python/src/cpython-asan/Modules/_struct.c:2192 #3 0x7facd2ceab69 in unpack /home/artem/projects/python/src/cpython-asan/Modules/clinic/_struct.c.h:215 #4 0x474397 in _PyMethodDef_RawFastCallKeywords Objects/call.c:618 #5 0x474397 in _PyCFunction_FastCallKeywords Objects/call.c:690 #6 0x42685f in call_function Python/ceval.c:4817 #7 0x42685f in _PyEval_EvalFrameDefault Python/ceval.c:3298 #8 0x54b164 in PyEval_EvalFrameEx Python/ceval.c:663 #9 0x54b164 in _PyEval_EvalCodeWithName Python/ceval.c:4173 #10 0x54b252 in PyEval_EvalCodeEx Python/ceval.c:4200 #11 0x54b252 in PyEval_EvalCode Python/ceval.c:640 #12 0x431e0e in run_mod Python/pythonrun.c:976 #13 0x431e0e in PyRun_FileExFlags Python/pythonrun.c:929 #14 0x43203b in PyRun_SimpleFileExFlags Python/pythonrun.c:392 #15 0x446354 in run_file Modules/main.c:338 #16 0x446354 in Py_Main Modules/main.c:809 #17 0x41df71 in main Programs/python.c:69 #18 0x7facd58ac82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) #19 0x428728 in _start (/home/artem/projects/python/build/cpython-asan/bin/python3.7+0x428728) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /home/artem/projects/python/src/cpython-asan/Modules/_struct.c:1515 s_unpack_internal ==20245==ABORTING Looks like _struct implementation assumes that PyStructObject->s_codes cannot be null, but it may happen if a bytearray was passed to unpack(). PyStructObject->s_codes becomes null in a couple of places in _struct.c, but that's not the case. unpack() calls _PyArg_ParseStack() with cache_struct_converter() which maintains a cache. Even if unpack() was called incorrectly with a string as second parameter (see below), this value is going to be cached anyway. Next time, if the same format string is used, the value is going to be retrieved from the cache. But PyStructObject->s_codes is still not null in cache_struct_converter() function. If you watch "s_object" under gdb, you can see that "s_codes" becomes null here: PyBuffer_FillInfo (view=0x7fffffffd700, obj=obj at entry=0x7ffff7e50730, buf=0x8df478 <_PyByteArray_empty_string>, len=0, readonly=readonly at entry=0, flags=0) at Objects/abstract.c:647 647 view->format = NULL; (gdb) bt #0 PyBuffer_FillInfo (view=0x7fffffffd700, obj=obj at entry=0x7ffff7e50730, buf=0x8df478 <_PyByteArray_empty_string>, len=0, readonly=readonly at entry=0, flags=0) at Objects/abstract.c:647 #1 0x000000000046020c in bytearray_getbuffer (obj=0x7ffff7e50730, view=, flags=) at Objects/bytearrayobject.c:72 #2 0x0000000000560b0a in getbuffer (errmsg=, view=0x7fffffffd700, arg=0x7ffff7e50730) at Python/getargs.c:1380 #3 convertsimple (freelist=0x7fffffffd3b0, bufsize=256, msgbuf=0x7fffffffd4c0 "must be bytes-like object, not str", flags=2, p_va=0x0, p_format=, arg=0x7ffff7e50730) at Python/getargs.c:938 #4 convertitem (arg=0x7ffff7e50730, p_format=p_format at entry=0x7fffffffd3a8, p_va=p_va at entry=0x7fffffffd610, flags=flags at entry=2, levels=levels at entry=0x7fffffffd3c0, msgbuf=msgbuf at entry=0x7fffffffd4c0 "must be bytes-like object, not str", bufsize=256, freelist=0x7fffffffd3b0) at Python/getargs.c:596 #5 0x0000000000561d6f in vgetargs1_impl (compat_args=compat_args at entry=0x0, stack=stack at entry=0x61600004b520, nargs=2, format=format at entry=0x7ffff35d5c88 "O&y*:unpack", p_va=p_va at entry=0x7fffffffd610, flags=flags at entry=2) at Python/getargs.c:388 #6 0x00000000005639b0 in _PyArg_ParseStack_SizeT ( args=args at entry=0x61600004b520, nargs=, format=format at entry=0x7ffff35d5c88 "O&y*:unpack") at Python/getargs.c:163 #7 0x00007ffff35d2df8 in unpack (module=module at entry=0x7ffff7e523b8, args=args at entry=0x61600004b520, nargs=, kwnames=kwnames at entry=0x0) at /home/artem/projects/python/src/cpython-asan/Modules/clinic/_struct.c.h:207 #8 0x0000000000474398 in _PyMethodDef_RawFastCallKeywords (kwnames=0x0, nargs=140737352377272, args=0x61600004b520, self=0x7ffff7e523b8, method=0x7ffff37d94e0 ) at Objects/call.c:618 #9 _PyCFunction_FastCallKeywords (func=func at entry=0x7ffff7e53828, args=args at entry=0x61600004b520, nargs=nargs at entry=2, kwnames=kwnames at entry=0x0) at Objects/call.c:690 #10 0x0000000000426860 in call_function (kwnames=0x0, oparg=2, pp_stack=) at Python/ceval.c:4817 #11 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3298 #12 0x000000000054b165 in PyEval_EvalFrameEx (throwflag=0, f=0x61600004b398) at Python/ceval.c:663 #13 _PyEval_EvalCodeWithName (_co=_co at entry=0x7ffff7ed3ae0, globals=globals at entry=0x7ffff7f2f150, locals=locals at entry=0x7ffff7ed3ae0, args=args at entry=0x0, argcount=argcount at entry=0, kwnames=kwnames at entry=0x0, kwargs=0x8, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:4173 #14 0x000000000054b253 in PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0, defs=0x0, kwcount=0, kws=0x0, argcount=0, args=0x0, locals=locals at entry=0x7ffff7ed3ae0, globals=globals at entry=0x7ffff7f2f150, _co=_co at entry=0x7ffff7ed3ae0) at Python/ceval.c:4200 #15 PyEval_EvalCode (co=co at entry=0x7ffff7ed3ae0, globals=globals at entry=0x7ffff7f16288, locals=locals at entry=0x7ffff7f16288) at Python/ceval.c:640 #16 0x0000000000431e0f in run_mod (arena=0x7ffff7f2f150, flags=0x7fffffffdb60, locals=0x7ffff7f16288, globals=0x7ffff7f16288, filename=0x7ffff7e534b0, mod=0x625000021078) at Python/pythonrun.c:976 #17 PyRun_FileExFlags (fp=0x61600003cc80, filename_str=, start=, globals=0x7ffff7f16288, locals=0x7ffff7f16288, closeit=1, flags=0x7fffffffdb60) at Python/pythonrun.c:929 #18 0x000000000043203c in PyRun_SimpleFileExFlags (fp=0x61600003cc80, filename=, closeit=1, flags=0x7fffffffdb60) at Python/pythonrun.c:392 #19 0x0000000000446355 in run_file (p_cf=0x7fffffffdb60, filename=0x60800000bf20 L"struct_unpack_crash.py", fp=0x61600003cc80) at Modules/main.c:338 #20 Py_Main (argc=argc at entry=2, argv=argv at entry=0x60300000efe0) at Modules/main.c:809 #21 0x000000000041df72 in main (argc=2, argv=) at ./Programs/python.c:69 I am not sure if it should cache an object if a error occurred. But clearing the cache in case of error seems to fix this null-pointer dereference. Here is a patch (untested): diff --git a/Modules/clinic/_struct.c.h b/Modules/clinic/_struct.c.h index 71ac290..9573769 100644 --- a/Modules/clinic/_struct.c.h +++ b/Modules/clinic/_struct.c.h @@ -206,6 +206,7 @@ unpack(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames) if (!_PyArg_ParseStack(args, nargs, "O&y*:unpack", cache_struct_converter, &s_object, &buffer)) { + _clearcache_impl(NULL); goto exit; } If this solution is okay, then _clearcache_impl() should probably be called in a couple of other unpack functions. ---------- files: struct_unpack_crash.py messages: 289531 nosy: artem.smotrakov priority: normal severity: normal status: open title: A possible null-pointer dereference in struct.s_unpack_internal() type: crash versions: Python 3.7 Added file: http://bugs.python.org/file46722/struct_unpack_crash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 00:27:37 2017 From: report at bugs.python.org (Artem Smotrakov) Date: Mon, 13 Mar 2017 04:27:37 +0000 Subject: [issue29802] A possible null-pointer dereference in struct.s_unpack_internal() In-Reply-To: <1489379218.66.0.044857321803.issue29802@psf.upfronthosting.co.za> Message-ID: <1489379257.01.0.39032619034.issue29802@psf.upfronthosting.co.za> Changes by Artem Smotrakov : ---------- keywords: +patch Added file: http://bugs.python.org/file46723/_struct_cache.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 02:08:40 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 13 Mar 2017 06:08:40 +0000 Subject: [issue28180] sys.getfilesystemencoding() should default to utf-8 In-Reply-To: <1474024622.65.0.838685461995.issue28180@psf.upfronthosting.co.za> Message-ID: <1489385320.5.0.481176865127.issue28180@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +540 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 02:10:05 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 13 Mar 2017 06:10:05 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1489385405.45.0.110201558145.issue29730@psf.upfronthosting.co.za> Oren Milman added the comment: thanks for the reviews :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 02:15:46 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 13 Mar 2017 06:15:46 +0000 Subject: [issue29803] Remove some redandunt ops in unicodeobject.c Message-ID: <1489385746.75.0.206550301215.issue29803@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- components: Interpreter Core nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Remove some redandunt ops in unicodeobject.c type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 02:16:57 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 13 Mar 2017 06:16:57 +0000 Subject: [issue29803] Remove some redandunt ops in unicodeobject.c Message-ID: <1489385817.57.0.785011150759.issue29803@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +541 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 02:22:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Mar 2017 06:22:05 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1489386125.12.0.399406298237.issue28856@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sometimes the implementation can expose drawbacks of initial design. I don't know whether there was good reason for omitting the support of the buffer protocol (in that case the PEP should be updated) or this is just an oversign. We should ask Ethan about this. The change proposed by Xiang looks correct, but not very efficient. It makes one redundant copy of the data. More efficient implementation will complicate the code, and that can hit the performance of other cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 03:22:30 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 13 Mar 2017 07:22:30 +0000 Subject: [issue28180] sys.getfilesystemencoding() should default to utf-8 In-Reply-To: <1474024622.65.0.838685461995.issue28180@psf.upfronthosting.co.za> Message-ID: <1489389750.42.0.241322885418.issue28180@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, the PEP 538 reference implementation has reached the point where I was willing to create a PR for it: https://github.com/python/cpython/pull/659 That PR/branch also includes the necessary changes to always force the C.UTF-8 locale on Android rather than defaulting to the C locale. I believe the only thing missing at this point is the configure.ac dance to ensure that PY_WARN_ON_C_LOCALE and PY_COERCE_C_LOCALE never get set on Mac OS X. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 03:37:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Mar 2017 07:37:41 +0000 Subject: [issue29802] A possible null-pointer dereference in struct.s_unpack_internal() In-Reply-To: <1489379218.66.0.044857321803.issue29802@psf.upfronthosting.co.za> Message-ID: <1489390661.84.0.409222194795.issue29802@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka components: +Extension Modules nosy: +serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 06:03:04 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Mon, 13 Mar 2017 10:03:04 +0000 Subject: [issue3353] make built-in tokenizer available via Python C API In-Reply-To: <1216035196.11.0.15913194841.issue3353@psf.upfronthosting.co.za> Message-ID: <1489399384.97.0.692580751378.issue3353@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Could you submit a PR for this? I haven't seen any objections to this change, a PR will expose this to more people and a clear decision on whether this change is warranted can be finally made (I hope). ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 06:42:19 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 13 Mar 2017 10:42:19 +0000 Subject: [issue29715] Arparse improperly handles "-_" In-Reply-To: <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za> Message-ID: <1489401739.68.0.880454224122.issue29715@psf.upfronthosting.co.za> Martin Panter added the comment: Max, I?m not sure if you saw the double-dash (--) workaround. IMO that is the ?correct? way to do this for Unix command lines, and for the current version of ?argparse?. But I guess that may be too inconvenient for your Morse Code case. Perhaps you can write your own custom sys.argv parser, or find some other argument handling library out there that doesn?t follow the usual Unix conventions. I don?t really like the proposal from Issue 9334 (classifying CLI arguments based on registered options). It seems hard to predict and specify (too complex) for only a minor use case. Although it does fix part of the other problem with option arguments, it is not a general solution. Assuming ?-h? and ?--help? are registered by default, how would an invocation like ?prog.py -hi? be treated under the proposal (currently an error because -h does not accept an argument)? What about ?prog.py -help?? What about ?prog.py --h?, currently treated as an abbreviation of ?--help?? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 06:54:41 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 13 Mar 2017 10:54:41 +0000 Subject: [issue12284] argparse.ArgumentParser: usage example option In-Reply-To: <1307540382.34.0.477677451975.issue12284@psf.upfronthosting.co.za> Message-ID: <1489402481.75.0.0348590570139.issue12284@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> works for me stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 08:45:42 2017 From: report at bugs.python.org (Dustin J. Mitchell) Date: Mon, 13 Mar 2017 12:45:42 +0000 Subject: [issue3353] make built-in tokenizer available via Python C API In-Reply-To: <1216035196.11.0.15913194841.issue3353@psf.upfronthosting.co.za> Message-ID: <1489409142.46.0.927883165134.issue3353@psf.upfronthosting.co.za> Dustin J. Mitchell added the comment: If the patch still applies cleanly, I have no issues with you or anyone opening a PR. I picked this up several years ago at the PyCon sprints, and don't remember a thing about it, nor have I touched any other bit of the CPython source since then. So any merge conflicts would be very difficult for me to resolve. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 09:11:40 2017 From: report at bugs.python.org (Wolfgang Langner) Date: Mon, 13 Mar 2017 13:11:40 +0000 Subject: [issue29770] Executable help output (--help) at commandline is wrong for option -B In-Reply-To: <1489063792.65.0.00439171993212.issue29770@psf.upfronthosting.co.za> Message-ID: <1489410700.31.0.708133035749.issue29770@psf.upfronthosting.co.za> Wolfgang Langner added the comment: Thanks for fixing this so fast. Good work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 09:50:54 2017 From: report at bugs.python.org (Iryna) Date: Mon, 13 Mar 2017 13:50:54 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture Message-ID: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> New submission from Iryna: I am trying to build Python 3.6.1rc1 on Fedora, and have the following test failing on arm64 (aarch64) architecture: ====================================================================== FAIL: test_pass_by_value (ctypes.test.test_structures.StructureTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.1rc1/Lib/ctypes/test/test_structures.py", line 413, in test_pass_by_value self.assertEqual(s.first, 0xdeadbeef) AssertionError: 195948557 != 3735928559 ---------------------------------------------------------------------- The build log is attached. The test was added in this commit [1] as a fix for bpo-29565. Any idea what this can be related to? [1] https://github.com/python/cpython/commit/3cc5817cfaf5663645f4ee447eaed603d2ad290a ---------- components: Tests, ctypes files: Python3.6.1rc1_build_log.txt messages: 289539 nosy: ishcherb priority: normal severity: normal status: open title: test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture versions: Python 3.6 Added file: http://bugs.python.org/file46724/Python3.6.1rc1_build_log.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 11:09:05 2017 From: report at bugs.python.org (Ethan Furman) Date: Mon, 13 Mar 2017 15:09:05 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1489417745.14.0.39902634028.issue28856@psf.upfronthosting.co.za> Ethan Furman added the comment: I suspect it was a simple oversight, and should be added now. Since it's been missing for so long I think we should put it in 3.7, maybe put it in 3.6 (maybe not, since it has two point releases out now), but definitely not in 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 12:38:23 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 13 Mar 2017 16:38:23 +0000 Subject: [issue29688] Add support for Path.absolute() In-Reply-To: <1488389848.79.0.700814097868.issue29688@psf.upfronthosting.co.za> Message-ID: <1489423103.58.0.956218366785.issue29688@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 12:50:33 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 13 Mar 2017 16:50:33 +0000 Subject: [issue29787] Internal importlib frames visible when module imported by import_module throws exception In-Reply-To: <1489161057.85.0.765402774015.issue29787@psf.upfronthosting.co.za> Message-ID: <1489423833.83.0.830595875974.issue29787@psf.upfronthosting.co.za> Brett Cannon added the comment: That's because the frame-stripping trick is done through import.c which importlib.import_module() doesn't pass through. So thanks for the report, Ulrich, but it is working as expected and we won't be changing import_module() to pass through the C code to keep the C code to a minimum. ---------- nosy: +brett.cannon resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 13:13:57 2017 From: report at bugs.python.org (Iryna) Date: Mon, 13 Mar 2017 17:13:57 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1489425237.24.0.848520650452.issue29804@psf.upfronthosting.co.za> Changes by Iryna : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 13:16:13 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 13 Mar 2017 17:16:13 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1489425373.15.0.342199142417.issue28856@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: @xiang.zhang - I am the OP for this issue, so naturally I expect this to be fixed. I have a work-around in place for my own code, so I have no opinion on the particular versions. I guess the normal policy on bug fixes should apply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 13:39:32 2017 From: report at bugs.python.org (Tim Graham) Date: Mon, 13 Mar 2017 17:39:32 +0000 Subject: [issue16932] urlparse fails at parsing "www.python.org:80/" In-Reply-To: <1357903769.2.0.674766943444.issue16932@psf.upfronthosting.co.za> Message-ID: <1489426772.26.0.629483487918.issue16932@psf.upfronthosting.co.za> Changes by Tim Graham : ---------- pull_requests: +542 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 13:39:32 2017 From: report at bugs.python.org (Tim Graham) Date: Mon, 13 Mar 2017 17:39:32 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1489426772.38.0.305321897759.issue27657@psf.upfronthosting.co.za> Changes by Tim Graham : ---------- pull_requests: +543 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 13:39:32 2017 From: report at bugs.python.org (Tim Graham) Date: Mon, 13 Mar 2017 17:39:32 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1489426772.45.0.598527961727.issue754016@psf.upfronthosting.co.za> Changes by Tim Graham : ---------- pull_requests: +544 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 13:43:45 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 13 Mar 2017 17:43:45 +0000 Subject: [issue29540] Add compact=True flag to json.dump/dumps In-Reply-To: <1486951474.88.0.917635653579.issue29540@psf.upfronthosting.co.za> Message-ID: <1489427025.74.0.76650559598.issue29540@psf.upfronthosting.co.za> Brett Cannon added the comment: So new options sounds like a no-go, but what about the COMPACT attribute on the json module as per https://github.com/python/cpython/pull/72? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 13:51:20 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 13 Mar 2017 17:51:20 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1489427480.01.0.994558400361.issue29800@psf.upfronthosting.co.za> Josh Rosenberg added the comment: I feel like adding a type check to partial_repr might not be the correct fix here. If PyUnicode_FromFormat returned NULL and set an exception here, then the existing code would work as written (raising an exception, but not segfaulting). Alternatively, if the code in question used %S for the key instead of %U, it would also work as written (not raising an exception or segfaulting). It's extremely strange to have something accepted, then raise exceptions in the repr of all places, and adding extra special purpose code for that specific purpose seems odd, to say the least. I think I'd be in favor of using %S personally, since %U should only be used when you have absolute guarantees that the object is a Unicode object, which we can't give here. Sure, an invalid state passes without notice in the repr, but I'm not sure that bothers me so much; if they actually try to call the invalid partial they'll get the TypeError they deserve at a time when the type finally matters. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 13:58:31 2017 From: report at bugs.python.org (Joshua Shields) Date: Mon, 13 Mar 2017 17:58:31 +0000 Subject: [issue15564] cgi.FieldStorage should not call read_multi on files In-Reply-To: <1344245506.28.0.499641288303.issue15564@psf.upfronthosting.co.za> Message-ID: <1489427911.38.0.80483714492.issue15564@psf.upfronthosting.co.za> Joshua Shields added the comment: I ran into this issue as well. I think it is something cgi.py will need to handle correctly when this type of file is uploaded from a browser's file input. ---------- nosy: +jshields _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 14:46:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Mar 2017 18:46:13 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1489430773.45.0.693270841967.issue29800@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PyUnicode_FromFormat() crashes in debug build if the argument for %U is not a unicode string. I thought about using %S. This would correspond possible Python implementation (`'%s=%r' % (key, value)`). But in that case we should increase refcounts of key and value (and maybe even pto->kw) since custom __str__ of the key can remove the value from the dict and make the value variable the hanging reference. I would prefer never failing __repr__, but other core developers have other opinion. Currently partial.__repr__ raises an exception on deep recursion and when the repr of any argument raises an exception. Current Michael's patch LGTM, but if his want to suggest the solution with %S it would LGTM too. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 14:46:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Mar 2017 18:46:35 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1489430795.14.0.358021948969.issue29800@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 14:50:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Mar 2017 18:50:03 +0000 Subject: [issue29540] Add compact=True flag to json.dump/dumps In-Reply-To: <1486951474.88.0.917635653579.issue29540@psf.upfronthosting.co.za> Message-ID: <1489431003.31.0.852805411869.issue29540@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I expressed my opinion, but I am ready to change it if this proposal meets the support of other core developers after discussion on the mailing list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 15:04:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Mar 2017 19:04:58 +0000 Subject: [issue17560] problem using multiprocessing with really big objects? In-Reply-To: <1364399521.2.0.696890688109.issue17560@psf.upfronthosting.co.za> Message-ID: <1489431898.57.0.702253307343.issue17560@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Pickle currently handle byte strings and unicode strings larger than 4GB only with protocol 4. But multiprocessing currently uses the default protocol which currently equals 3. There was suggestions to change the default pickle protocol (issue23403), the pickle protocol for multiprocessing (issue26507) or customize the serialization method for multiprocessing (issue28053). There is also a patch that implements the support of byte strings and unicode strings larger than 4GB with all protocols (issue25370). Beside this I think that using some kind of shared memory is better way for transferring large data between subprocesses. ---------- nosy: +serhiy.storchaka versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 15:39:47 2017 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 13 Mar 2017 19:39:47 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1489433987.08.0.632956976492.issue754016@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 17:03:44 2017 From: report at bugs.python.org (Laurent Mazuel) Date: Mon, 13 Mar 2017 21:03:44 +0000 Subject: [issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different Message-ID: <1489439024.83.0.354569832809.issue29805@psf.upfronthosting.co.za> New submission from Laurent Mazuel: Trying to use Pathlib and Path.replace on Windows if drive are different leads to an issue: File "D:\myscript.py", line 184, in update client_generated_path.replace(destination_folder) File "c:\program files (x86)\python35-32\Lib\pathlib.py", line 1273, in replace self._accessor.replace(self, target) File "c:\program files (x86)\python35-32\Lib\pathlib.py", line 377, in wrapped return strfunc(str(pathobjA), str(pathobjB), *args) OSError: [WinError 17] The system cannot move the file to a different disk drive: 'C:\\MyFolder' -> 'D:\\MyFolderNewName' This is a known situation of os.rename, and workaround I found is to use shutil or to copy/delete manually in two steps (e.g. http://stackoverflow.com/questions/21116510/python-oserror-winerror-17-the-system-cannot-move-the-file-to-a-different-d) When using Pathlib, it's not that easy to workaround using shutil (even if thanks to Brett Cannon now shutil accepts Path in Py3.6, not everybody has Py3.6). At least this should be documented with a recommendation for that situation. I love Pathlib and it's too bad my code becomes complicated when it was so simple :( ---------- components: IO, Windows messages: 289549 nosy: Laurent.Mazuel, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Pathlib.replace cannot move file to a different drive on Windows if filename different versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 17:04:45 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 13 Mar 2017 21:04:45 +0000 Subject: [issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different In-Reply-To: <1489439024.83.0.354569832809.issue29805@psf.upfronthosting.co.za> Message-ID: <1489439085.08.0.585070100085.issue29805@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: +Library (Lib) -IO _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 17:04:51 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 13 Mar 2017 21:04:51 +0000 Subject: [issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different In-Reply-To: <1489439024.83.0.354569832809.issue29805@psf.upfronthosting.co.za> Message-ID: <1489439091.72.0.819093715075.issue29805@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 17:08:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Mar 2017 21:08:12 +0000 Subject: [issue27880] cPickle fails on large objects (still - 2011 and counting) In-Reply-To: <1472325384.28.0.119216785398.issue27880@psf.upfronthosting.co.za> Message-ID: <1489439292.0.0.372086698648.issue27880@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 17:11:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Mar 2017 21:11:26 +0000 Subject: [issue27880] cPickle fails on large objects (still - 2011 and counting) In-Reply-To: <1472325384.28.0.119216785398.issue27880@psf.upfronthosting.co.za> Message-ID: <1489439486.51.0.482148396051.issue27880@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 662 presumably fixes this issue. Could anyone please check that the test case is fixed? I have no enough memory for testing. ---------- assignee: -> serhiy.storchaka nosy: +alexandre.vassalotti, serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 17:23:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 13 Mar 2017 21:23:46 +0000 Subject: [issue29517] "Can't pickle local object" when uses functools.partial with method and args... In-Reply-To: <1486676485.08.0.362566272702.issue29517@psf.upfronthosting.co.za> Message-ID: <1489440226.14.0.607094187926.issue29517@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please provide your code as a text, not a picture. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 17:25:27 2017 From: report at bugs.python.org (Laurent Mazuel) Date: Mon, 13 Mar 2017 21:25:27 +0000 Subject: [issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different In-Reply-To: <1489439024.83.0.354569832809.issue29805@psf.upfronthosting.co.za> Message-ID: <1489440327.58.0.184284366241.issue29805@psf.upfronthosting.co.za> Laurent Mazuel added the comment: Just to confirm, I was able to workaround it with Py3.6: # client_generated_path.replace(destination_folder) shutil.move(client_generated_path, destination_folder) It is reasonable to think about adding a similar feature to pathlib if it doesn't support it and just special-case the drive-to-drive scenario for Windows ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 17:29:47 2017 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 13 Mar 2017 21:29:47 +0000 Subject: [issue29517] "Can't pickle local object" when uses functools.partial with method and args... In-Reply-To: <1486676485.08.0.362566272702.issue29517@psf.upfronthosting.co.za> Message-ID: <1489440587.87.0.431404071313.issue29517@psf.upfronthosting.co.za> Yury Selivanov added the comment: > AttributeError: Can't pickle local object 'WeakSet.__init__.._remove' Well, I don't think we can do something about it. Just re-pack your arguments from WeakSet to a regular set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 18:25:04 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 13 Mar 2017 22:25:04 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1489443904.2.0.352961199192.issue29800@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I'd also prefer %S instead of a hard-coded check. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 19:38:03 2017 From: report at bugs.python.org (paul j3) Date: Mon, 13 Mar 2017 23:38:03 +0000 Subject: [issue29715] Arparse improperly handles "-_" In-Reply-To: <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za> Message-ID: <1489448283.69.0.867567886821.issue29715@psf.upfronthosting.co.za> paul j3 added the comment: The change to `_parse_optional` that did go through is the ability to turn off abbreviations http://bugs.python.org/issue14910 Even that has had a few complaints, http://bugs.python.org/issue29777 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 20:07:41 2017 From: report at bugs.python.org (ppperry) Date: Tue, 14 Mar 2017 00:07:41 +0000 Subject: [issue19675] Pool dies with excessive workers, but does not cleanup In-Reply-To: <1384998739.89.0.441869255184.issue19675@psf.upfronthosting.co.za> Message-ID: <1489450061.53.0.770235166049.issue19675@psf.upfronthosting.co.za> ppperry added the comment: Can't you just mock the Process class to have a start method that always raises an error? ---------- nosy: +ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 21:34:28 2017 From: report at bugs.python.org (Tim Graham) Date: Tue, 14 Mar 2017 01:34:28 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1489455268.66.0.501514803579.issue27657@psf.upfronthosting.co.za> Tim Graham added the comment: Based on discussion in issue 16932, I agree that reverting the parsing decisions from issue 754016 (as Martin suggested in msg271719) seems appropriate. I created a pull request that does that. ---------- nosy: +Tim.Graham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 21:53:20 2017 From: report at bugs.python.org (Michael Seifert) Date: Tue, 14 Mar 2017 01:53:20 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1489456400.61.0.0190935758708.issue29800@psf.upfronthosting.co.za> Michael Seifert added the comment: Given that this my first contribution to CPython I'm not too sure about the etiquette. When do I know (or who decides) when an agreement on a fix is reached? I wouldn't mind retracting the pull request if someone else wants to fix it differently. I actually used the PyUnicode_Check on purpose because I always viewed the representation should be either unreadably (like objectxyz at 0xwhatever) or something that can should be copy&pasted-able. Returning something that will definetly throw an exception when copied seemed inappropriate. But the %S change definetly has it's attraction: shorter, also fixes the segfault and no need for type checking. Given Serhiy's answer it seems to me there could be another lurking problem because any %R or %S is potentially a problem within PyDict_Next - because this C-API-Function states that "The dictionary p should not be mutated during iteration. It is safe to modify the values of the keys as you iterate over the dictionary, but only so long as the set of keys does not change." But arbitary __str__ or __repr__ functions could do just that. I'm mostly an end-user so I'm not sure if I understand that right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 22:11:17 2017 From: report at bugs.python.org (Eryk Sun) Date: Tue, 14 Mar 2017 02:11:17 +0000 Subject: [issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different In-Reply-To: <1489439024.83.0.354569832809.issue29805@psf.upfronthosting.co.za> Message-ID: <1489457477.81.0.467733471693.issue29805@psf.upfronthosting.co.za> Eryk Sun added the comment: Moving a file across volumes isn't atomic. Getting an exception in this case can be useful. There could be a "strict" keyword-only parameter that defaults to False. If it's true, then replace() won't try to move the file. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 23:17:09 2017 From: report at bugs.python.org (DAVID ALEJANDRO Pineda) Date: Tue, 14 Mar 2017 03:17:09 +0000 Subject: [issue29517] "Can't pickle local object" when uses functools.partial with method and args... In-Reply-To: <1486676485.08.0.362566272702.issue29517@psf.upfronthosting.co.za> Message-ID: <1489461429.79.0.103738406896.issue29517@psf.upfronthosting.co.za> DAVID ALEJANDRO Pineda added the comment: Hello Again. The problem can be replicated in the same structure when call the 'functools.partial' feature I wrote a simple example. It uses the asyncio and multiprocessing structure. https://github.com/dpineiden/async_multiprocessing With this dependences: https://gitlab.com/pineiden/tasktools https://gitlab.com/pineiden/networktools In python 3.5.1 works fine even if in the mprocess file uncomment the 'functools.partial'. But when i use a larger version, like 3.6, fails with the 'weakref' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 23:18:20 2017 From: report at bugs.python.org (Anne Moroney) Date: Tue, 14 Mar 2017 03:18:20 +0000 Subject: [issue29806] Requesting version info with lowercase -v or -vv causes an import crash Message-ID: <1489461500.81.0.649560868679.issue29806@psf.upfronthosting.co.za> New submission from Anne Moroney: In trying to test the new feature in 3.6.0, $ python -VV # get more info than python -V or python --version I found several oddities. 1.On both Amazon Linux AMI Python 2.7.12 and also Anaconda Python 3.6.0, using lowercase v's causes a crash on some kind of import. 1a.AWS first lines are: [ec2-user at ip-172-31-2-101 ~]$ python -v # installing zipimport hook import zipimport # builtin # installed zipimport hook # /usr/lib64/python2.7/site.pyc matches /usr/lib64/python2.7/site.py import site # precompiled from /usr/lib64/python2.7/site.pyc 1b.Conda first lines are: (py36aws)me:tool-aws me$ python -v import _frozen_importlib # frozen import _imp # builtin import sys # builtin import '_warnings' # //etc 1c.In both cases, after lots of stuff, must quit python with quit() 2.Anaconda does not provide more information. Is that expected? (py36aws) $ python -VV Python 3.6.0 :: Continuum Analytics, Inc. (py36aws)$ python -V Python 3.6.0 :: Continuum Analytics, Inc. (py36aws)$ python --version Python 3.6.0 :: Continuum Analytics, Inc. ---------- assignee: docs at python components: Documentation messages: 289561 nosy: AnneTheAgile, docs at python priority: normal severity: normal status: open title: Requesting version info with lowercase -v or -vv causes an import crash type: crash versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 23:26:39 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 14 Mar 2017 03:26:39 +0000 Subject: [issue29806] Requesting version info with lowercase -v or -vv causes an import crash In-Reply-To: <1489461500.81.0.649560868679.issue29806@psf.upfronthosting.co.za> Message-ID: <1489461999.58.0.439470537885.issue29806@psf.upfronthosting.co.za> INADA Naoki added the comment: > 1.On both Amazon Linux AMI Python 2.7.12 and also Anaconda Python 3.6.0, using lowercase v's causes a crash on some kind of import. Lowercase -v is not version, it's "verbose". and -vv is "very verbose". So it's not crash, just a verbose message about importing. > 2.Anaconda does not provide more information. Is that expected? output of -V and -VV is implementation detail. No standard format is specified by Python language. PyPy has different output too. ---------- nosy: +inada.naoki resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 13 23:33:57 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 14 Mar 2017 03:33:57 +0000 Subject: [issue29806] Requesting version info with lowercase -v or -vv causes an import crash In-Reply-To: <1489461500.81.0.649560868679.issue29806@psf.upfronthosting.co.za> Message-ID: <1489462437.6.0.525267581433.issue29806@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- stage: -> resolved status: open -> closed type: crash -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 00:13:04 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 14 Mar 2017 04:13:04 +0000 Subject: [issue27880] cPickle fails on large objects (still - 2011 and counting) In-Reply-To: <1472325384.28.0.119216785398.issue27880@psf.upfronthosting.co.za> Message-ID: <1489464784.47.0.933766222536.issue27880@psf.upfronthosting.co.za> Xiang Zhang added the comment: >>> import cPickle [45575 refs] >>> cPickle.dumps('a' * (2 ** 31),-1) Traceback (most recent call last): File "", line 1, in OverflowError: cannot serialize a string larger than 2 GiB [45606 refs] >>> :-) ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 01:11:28 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 14 Mar 2017 05:11:28 +0000 Subject: [issue29540] Add compact=True flag to json.dump/dumps In-Reply-To: <1486951474.88.0.917635653579.issue29540@psf.upfronthosting.co.za> Message-ID: <1489468288.43.0.0172404533076.issue29540@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [Serhiy] > Personally I dislike any complication of json API. > Likely it is already the most complicated API in the stdlib. [Bob Ippolito] > the interface here is already a bit too complex > and the benefit is pretty minimal I concur with those sentiments and am going to mark this as closed. We already have a way to do it. That way may not be ideal but putting in an additional way is likely to result in a net increase in complexity. If some counter-consensus arises on one of the mailing lists, this tracker issue can be re-opened and the discussion can continue. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 01:29:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Mar 2017 05:29:08 +0000 Subject: [issue27880] cPickle fails on large objects (still - 2011 and counting) In-Reply-To: <1472325384.28.0.119216785398.issue27880@psf.upfronthosting.co.za> Message-ID: <1489469348.07.0.888769787675.issue27880@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Xiang! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 01:30:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Mar 2017 05:30:23 +0000 Subject: [issue27880] cPickle fails on large objects (still - 2011 and counting) In-Reply-To: <1472325384.28.0.119216785398.issue27880@psf.upfronthosting.co.za> Message-ID: <1489469423.46.0.996755038086.issue27880@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 01:55:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Mar 2017 05:55:40 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1489470940.31.0.657710212152.issue29800@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It would be nice if you provided the solution with %S. But if you don't do this, and nobody other provide other pull request, I'll merge the current solution. When the dictionary keys are changed during iteration PyDict_Next() can skip some key-value pairs or return some key-value pairs multiple times. It never raises an exception, crashes or hangs in infinite loop. This is appropriate. The problem is that after calling __str__ for the key, the borrowed reference to the value can become invalid, and __repr__ will be called for destroyed object. This can cause an undefined behavior, in particular a crash. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 02:04:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Mar 2017 06:04:26 +0000 Subject: [issue29517] "Can't pickle local object" when uses functools.partial with method and args... In-Reply-To: <1486676485.08.0.362566272702.issue29517@psf.upfronthosting.co.za> Message-ID: <1489471466.96.0.736192278679.issue29517@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If the example worked on old versions of Python, perhaps this is a regression. Either WeakSet was pickleable or it was not used in that asyncio/multiprocessing use. If this is a regression in the stdlib it should be fixed. ---------- nosy: +fdrake, giampaolo.rodola, haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 02:05:21 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 14 Mar 2017 06:05:21 +0000 Subject: [issue24622] tokenize.py: missing EXACT_TOKEN_TYPES In-Reply-To: <1436729377.89.0.451182448624.issue24622@psf.upfronthosting.co.za> Message-ID: <1489471521.39.0.669618382942.issue24622@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: We obviously missed this, at least for 3.5... any chance of having it for 3.7? ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 02:18:04 2017 From: report at bugs.python.org (Steve Carter) Date: Tue, 14 Mar 2017 06:18:04 +0000 Subject: [issue29807] ArgParse page in library reference rewrite Message-ID: <1489472284.38.0.40207115242.issue29807@psf.upfronthosting.co.za> New submission from Steve Carter: Originally raise as https://github.com/python/pythondotorg/issues/1059 Although it's a reference page, it is clouded by too many examples and too little reference material. Moreover, the examples are not real-world applications of argument parsing. I propose removing the "process some integers" example, replacing it with something more typically gnu style, e.g., myapp.py [--quiet] [--log-level _n_] [--title=STR] {get | put} [FSPEC [, FSPEC...]]. This shows the user how to to many of the common command-line tasks. [I'm tentatively offering to do this, but I haven't yet found the content I need to revise.] ---------- assignee: docs at python components: Documentation messages: 289569 nosy: docs at python, sweavo priority: normal severity: normal status: open title: ArgParse page in library reference rewrite versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 03:12:12 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 14 Mar 2017 07:12:12 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1489475532.58.0.184693441539.issue28856@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +546 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 03:22:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Mar 2017 07:22:02 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1489476122.42.0.702433814121.issue28856@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Following example copies the entire buffer object while copying only smart part is needed: m = memoryview(b'x'*10**6) b'%.100b' % m I don't know whether this is important use case that is worth an optimization. The workaround is using slicing rather than truncating in format: b'%b' % m[:100] Or in the case of general buffer object: b'%b' % memoryview(m).cast('B')[:100] But in that case it is not hard to add an explicit conversion to bytes. b'%b' % bytes(memoryview(m).cast('B')[:100]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 03:36:34 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 14 Mar 2017 07:36:34 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1489476994.97.0.671146812072.issue28856@psf.upfronthosting.co.za> Xiang Zhang added the comment: I committed the suboptimal patch. I close this issue now and if there is any enhancement solution, let's make it another issue. Thank you all. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 04:22:46 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 14 Mar 2017 08:22:46 +0000 Subject: [issue26602] argparse doc introduction is inappropriately targeted In-Reply-To: <1458562294.77.0.347454712136.issue26602@psf.upfronthosting.co.za> Message-ID: <1489479766.5.0.782036176889.issue26602@psf.upfronthosting.co.za> Martin Panter added the comment: The patch looks unfinished. I left some narrow nit-picky review comments, but I haven?t really thought about the problem from a high level. ---------- nosy: +martin.panter stage: -> patch review versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 04:27:27 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 14 Mar 2017 08:27:27 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1489480047.95.0.646833617824.issue28810@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- pull_requests: +547 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 05:01:29 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 14 Mar 2017 09:01:29 +0000 Subject: [issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs In-Reply-To: <1487007412.2.0.380189857134.issue29548@psf.upfronthosting.co.za> Message-ID: <1489482089.81.0.662049911935.issue29548@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- dependencies: -Document PyEval_Call* functions resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 05:36:41 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 14 Mar 2017 09:36:41 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails Message-ID: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> New submission from ???? ?????????: Syslog handler already able to ignore temporary errors while seding logs. So he knows that syslog server may be not reachable at the moment. But when we say about constructor, it fails with error. I have fixed that -- now it will ignore such errors, and try to re-connect on every logging as it was before. C's version does the same. ---------- components: Library (Lib) messages: 289573 nosy: mmarkk priority: normal severity: normal status: open title: SyslogHandler: should not raise exception in constructor if connection fails type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 05:44:54 2017 From: report at bugs.python.org (Ulrich Petri) Date: Tue, 14 Mar 2017 09:44:54 +0000 Subject: [issue29787] Internal importlib frames visible when module imported by import_module throws exception In-Reply-To: <1489161057.85.0.765402774015.issue29787@psf.upfronthosting.co.za> Message-ID: <1489484694.28.0.860688997425.issue29787@psf.upfronthosting.co.za> Ulrich Petri added the comment: Thanks for the fast response. However I disagree with the assertion that this is "working as expected". IMO the same arguments apply as in the original ticket (esp. Georg Brandls) http://bugs.python.org/issue15110#msg163258. It is unexpected, confusing (esp. to newer devs) and adds a lot of (unnecessary) noise to tracebacks. Also this basically demotes `import_module` to second rate league since it doesn't get to enjoy the niceties of "proper" import which is unfortunate since it's used heavily for example in django. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 06:03:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 10:03:57 +0000 Subject: [issue29517] "Can't pickle local object" when uses functools.partial with method and args... In-Reply-To: <1486676485.08.0.362566272702.issue29517@psf.upfronthosting.co.za> Message-ID: <1489485837.95.0.808010771166.issue29517@psf.upfronthosting.co.za> STINNER Victor added the comment: Can you write a short Python script producing the bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 06:09:56 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 14 Mar 2017 10:09:56 +0000 Subject: [issue29807] ArgParse page in library reference rewrite In-Reply-To: <1489472284.38.0.40207115242.issue29807@psf.upfronthosting.co.za> Message-ID: <1489486196.01.0.990527697431.issue29807@psf.upfronthosting.co.za> Martin Panter added the comment: Also see Issue 26602 and Issue 11176, each with patches. Perhaps you could help review and combine them. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 06:12:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Mar 2017 10:12:11 +0000 Subject: [issue29600] Returning an exception object from a coroutine triggers implicit exception chaining?!? In-Reply-To: <1487511889.54.0.248268466732.issue29600@psf.upfronthosting.co.za> Message-ID: <1489486331.39.0.569473640754.issue29600@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I am wondering how much of other uses of PyErr_SetObject() are affected by similar bugs? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 06:12:25 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 14 Mar 2017 10:12:25 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1489486345.63.0.521376252698.issue29808@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +548 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 06:35:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 10:35:05 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments In-Reply-To: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> Message-ID: <1489487705.97.0.0888359015972.issue29735@psf.upfronthosting.co.za> STINNER Victor added the comment: > If the underlying function doesn't support fast call, and both args and pto->args are not empty, patched partial_call() makes one unneeded copyings. The simple workaround is to revert changes using FASTCALL in partial_call(). But for best performances, it seems like we need two code paths depending if the function supports fastcall or not. I will try to write a patch for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 08:08:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 12:08:12 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments In-Reply-To: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> Message-ID: <1489493292.78.0.371045902683.issue29735@psf.upfronthosting.co.za> STINNER Victor added the comment: bench_fastcall_partial.py: more complete microbenchmark. I rewrote my patch: * I added _PyObject_HasFastCall(callable): return 1 if callable supports FASTCALL calling convention for positional arguments * I splitted partial_call() into 2 subfunctions: partial_fastcall() is specialized for FASTCALL, partial_call_impl() uses PyObject_Call() with a tuple for positional arguments The patch fixes the performance regression for VARARGS and optimize FASTCALL: haypo at smithers$ ./python -m perf compare_to ref.json patch.json --table +-----------------------------+---------+------------------------------+ | Benchmark | ref | patch | +=============================+=========+==============================+ | partial Python, 1+1 arg | 135 ns | 118 ns: 1.15x faster (-13%) | +-----------------------------+---------+------------------------------+ | partial Python, 2+0 arg | 114 ns | 91.4 ns: 1.25x faster (-20%) | +-----------------------------+---------+------------------------------+ | partial Python, 5+1 arg | 151 ns | 135 ns: 1.12x faster (-11%) | +-----------------------------+---------+------------------------------+ | partial Python, 5+5 arg | 192 ns | 168 ns: 1.15x faster (-13%) | +-----------------------------+---------+------------------------------+ | partial C VARARGS, 2+0 arg | 153 ns | 127 ns: 1.20x faster (-17%) | +-----------------------------+---------+------------------------------+ | partial C FASTCALL, 1+1 arg | 111 ns | 93.7 ns: 1.18x faster (-15%) | +-----------------------------+---------+------------------------------+ | partial C FASTCALL, 2+0 arg | 63.9 ns | 64.6 ns: 1.01x slower (+1%) | +-----------------------------+---------+------------------------------+ Not significant (1): partial C VARARGS, 1+1 arg ---------- Added file: http://bugs.python.org/file46725/bench_fastcall_partial.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 08:10:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 12:10:04 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments In-Reply-To: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> Message-ID: <1489493404.96.0.681818340369.issue29735@psf.upfronthosting.co.za> STINNER Victor added the comment: > What about C stack consumption? Is not this increase it? Yes, my optimization consumes more C stack: small_stack allocates 80 bytes on the stack (for 5 positional arguments). Is it an issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 09:06:04 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 14 Mar 2017 13:06:04 +0000 Subject: [issue29540] Add compact=True flag to json.dump/dumps In-Reply-To: <1486951474.88.0.917635653579.issue29540@psf.upfronthosting.co.za> Message-ID: <1489496764.3.0.984742037674.issue29540@psf.upfronthosting.co.za> R. David Murray added the comment: I don't see how adding a constant increases the complexity of the API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 09:25:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Mar 2017 13:25:02 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments In-Reply-To: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> Message-ID: <1489497902.83.0.993010297819.issue29735@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Nice results. You made a great work for decreasing C stack consumption. It would be sad to lose it without good reasons. Could you please compare two variants, with and without small stack? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 09:38:14 2017 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 14 Mar 2017 13:38:14 +0000 Subject: [issue29600] Returning an exception object from a coroutine triggers implicit exception chaining?!? In-Reply-To: <1487511889.54.0.248268466732.issue29600@psf.upfronthosting.co.za> Message-ID: <1489498694.18.0.92041879513.issue29600@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I am wondering how much of other uses of PyErr_SetObject() are affected by similar bugs? Only when we use an exception to carry a return value. AFAIK StopIteration is the only such case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 09:46:39 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 14 Mar 2017 13:46:39 +0000 Subject: [issue3353] make built-in tokenizer available via Python C API In-Reply-To: <1216035196.11.0.15913194841.issue3353@psf.upfronthosting.co.za> Message-ID: <1489499199.23.0.186334603128.issue3353@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Okay, I'll take a look at it over the next days and try and submit a PR after fixing any issues that might be present. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 09:52:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Mar 2017 13:52:27 +0000 Subject: [issue3353] make built-in tokenizer available via Python C API In-Reply-To: <1216035196.11.0.15913194841.issue3353@psf.upfronthosting.co.za> Message-ID: <1489499547.25.0.942096766523.issue3353@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Python tokenizer rewriting _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 09:53:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Mar 2017 13:53:15 +0000 Subject: [issue3353] make built-in tokenizer available via Python C API In-Reply-To: <1216035196.11.0.15913194841.issue3353@psf.upfronthosting.co.za> Message-ID: <1489499595.79.0.956326209357.issue3353@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please hold this until finishing issue25643. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 09:55:02 2017 From: report at bugs.python.org (Tim Graham) Date: Tue, 14 Mar 2017 13:55:02 +0000 Subject: [issue22891] code removal from urllib.parse.urlsplit() In-Reply-To: <1416220944.83.0.361625539874.issue22891@psf.upfronthosting.co.za> Message-ID: <1489499702.39.0.976652731722.issue22891@psf.upfronthosting.co.za> Tim Graham added the comment: I sent a pull request for this issue's dependency (issue 27657) and added a second commit there with this patch. A test added in the first commit demonstrates that removing this code no longer results in the behavior change described in msg238254. ---------- nosy: +Tim.Graham pull_requests: +549 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 09:59:44 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 14 Mar 2017 13:59:44 +0000 Subject: [issue3353] make built-in tokenizer available via Python C API In-Reply-To: <1216035196.11.0.15913194841.issue3353@psf.upfronthosting.co.za> Message-ID: <1489499984.34.0.203243235933.issue3353@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Thanks for linking the dependency, Serhiy :-) Is there anybody currently working on the other issue? Also, shouldn't both issues now get retagged to Python 3.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 10:17:33 2017 From: report at bugs.python.org (Wolfgang Maier) Date: Tue, 14 Mar 2017 14:17:33 +0000 Subject: [issue25478] Consider adding a normalize() method to collections.Counter() In-Reply-To: <1445826280.05.0.307309053044.issue25478@psf.upfronthosting.co.za> Message-ID: <1489501053.18.0.284412779435.issue25478@psf.upfronthosting.co.za> Wolfgang Maier added the comment: > >>> Counter(red=11, green=5, blue=4).normalize(100) # percentage > Counter(red=55, green=25, blue=20) I like this example, where the normalize method of a Counter returns a new Counter, but I think the new Counter should always only have integer counts. More specifically, it should be the closest approximation of the original Counter that is possible with integers adding up to the argument to the method or, statistically speaking, it should represent the expected number of observations of each outcome for a given sample size. ---------- nosy: +wolma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 10:23:19 2017 From: report at bugs.python.org (Iryna) Date: Tue, 14 Mar 2017 14:23:19 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1489501399.94.0.0176092430654.issue29804@psf.upfronthosting.co.za> Iryna added the comment: Hi Vinay, I have added you to the nosy list as you are the author of the fix for bpo-29565, and would like to ask you for insights or ideas on why the test would fail only on one architecture (arm64)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 10:24:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Mar 2017 14:24:49 +0000 Subject: [issue3353] make built-in tokenizer available via Python C API In-Reply-To: <1216035196.11.0.15913194841.issue3353@psf.upfronthosting.co.za> Message-ID: <1489501489.53.0.441384019194.issue3353@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I am working on the other issue (the recent patch is still not published). Sorry, but two issues modify the same code and are conflicting. Since I believe that this issue makes less semantic changes, I think it would be easier to rebase it after finishing issue25643 than do it in contrary order. ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 10:28:59 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 14 Mar 2017 14:28:59 +0000 Subject: [issue3353] make built-in tokenizer available via Python C API In-Reply-To: <1216035196.11.0.15913194841.issue3353@psf.upfronthosting.co.za> Message-ID: <1489501739.69.0.134505323122.issue3353@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: That makes sense to me, I'll wait around until the dependency is resolved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 10:29:12 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 14 Mar 2017 14:29:12 +0000 Subject: [issue25643] Python tokenizer rewriting In-Reply-To: <1447723653.14.0.424824913135.issue25643@psf.upfronthosting.co.za> Message-ID: <1489501752.8.0.274206514283.issue25643@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 10:29:49 2017 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 14 Mar 2017 14:29:49 +0000 Subject: [issue29809] TypeError in traceback.print_exc - unicode does not have the buffer interface Message-ID: <1489501789.51.0.676200983775.issue29809@psf.upfronthosting.co.za> New submission from Jason R. Coombs: I'm writing a routine that captures exceptions and logs them to a database. In doing so, I encountered a situation that when parsing a Unicode file that has an IndentationError (SyntaxError), print_exc will fail when it tries to render the unicode line. Here's a script that replicates the failure. # coding: utf-8 from __future__ import unicode_literals import io import sys import traceback PY3 = sys.version_info > (3,) print(sys.version) buffer = io.StringIO() if PY3 else io.BytesIO() try: args = str(''), 7, 2, ' // test' raise IndentationError('failed', args) except Exception: traceback.print_exc(file=buffer) And the output $ python2 test-unicode-tb.py 2.7.13 (default, Dec 24 2016, 21:20:02) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] Traceback (most recent call last): File "test-unicode-tb.py", line 19, in traceback.print_exc(file=buffer) File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/traceback.py", line 233, in print_exc print_exception(etype, value, tb, limit, file) File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/traceback.py", line 128, in print_exception _print(file, line, '') File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/traceback.py", line 13, in _print file.write(str+terminator) TypeError: 'unicode' does not have the buffer interface The same test runs without error on Python 3. It's surprising to me that I'm the first person to encounter this issue. Is it possible I'm abusing the tokenize module and a unicode value shouldn't be present in the args for the IndentationError? ---------- messages: 289592 nosy: jason.coombs priority: normal severity: normal status: open title: TypeError in traceback.print_exc - unicode does not have the buffer interface versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 10:42:42 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 14 Mar 2017 14:42:42 +0000 Subject: [issue29387] Tabs vs spaces FAQ out of date In-Reply-To: <1485734038.81.0.0566253928841.issue29387@psf.upfronthosting.co.za> Message-ID: <1489502562.64.0.749358441341.issue29387@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Shouldn't this issue get closed now that the PR was merged? ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 10:57:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Mar 2017 14:57:52 +0000 Subject: [issue25643] Python tokenizer rewriting In-Reply-To: <1447723653.14.0.424824913135.issue25643@psf.upfronthosting.co.za> Message-ID: <1489503472.82.0.813716002811.issue25643@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: -patch versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 11:02:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 15:02:03 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments In-Reply-To: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> Message-ID: <1489503723.16.0.367848226104.issue29735@psf.upfronthosting.co.za> STINNER Victor added the comment: I measured that my patch (pull request) increases the stack usage of 64 bytes per partial_call() call. I consider that it's accepted for a speedup between 1.12x faster and 1.25x faster. Attached partial_stack_usage.py requires testcapi_stack_pointer.patch of issue #28870. Original: f(): [1000 calls] 624.0 B per call f2(): [1000 calls] 624.0 B per call Patched: f(): [1000 calls] 688.0 B per call (+64 B) f2(): [1000 calls] 688.0 B per call (+64 B) ---------- Added file: http://bugs.python.org/file46726/partial_stack_usage.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 11:05:59 2017 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Mar 2017 15:05:59 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1489503959.18.0.393244669615.issue29804@psf.upfronthosting.co.za> Vinay Sajip added the comment: The test checks that a structure passed by value is indeed passed by value - something that is architecture-dependent, as calling conventions differ across architectures. If the test fails, this indicates that the structure isn't being passed by value - a pointer to the structure is probably passed, which is pass-by-reference rather than pass-by-value. This indicates that a change to ctypes or libffi is needed to fix this. See the changes made in Modules/_ctypes/libffi_msvc/ffi.c for bpo-29565 - probably, analogous changes need to be made to the corresponding code for arm64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 11:10:39 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 14 Mar 2017 15:10:39 +0000 Subject: [issue25478] Consider adding a normalize() method to collections.Counter() In-Reply-To: <1445826280.05.0.307309053044.issue25478@psf.upfronthosting.co.za> Message-ID: <1489504239.56.0.119011690628.issue25478@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: That seems horribly arbitrary to me, not to mention inviting another intdiv fiasco (from sanity import division:). If only Counter was committed to only working with integer values from start, it might be acceptable, but since Counter implementation was always careful not to preclude using Counter with nonint values, it wouldn't make sense. Also, there is an interesting inconsistency then, in the form of c = Counter(a=5,b=5).normalize(5) Presumably c.a and c.b would be equal integers, and their sum equal to 5. That is unfortunately not possible. :-o ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 11:24:21 2017 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 14 Mar 2017 15:24:21 +0000 Subject: [issue29809] TypeError in traceback.print_exc - unicode does not have the buffer interface In-Reply-To: <1489501789.51.0.676200983775.issue29809@psf.upfronthosting.co.za> Message-ID: <1489505061.7.0.583354572615.issue29809@psf.upfronthosting.co.za> Jason R. Coombs added the comment: A complimentary error will occur on Python 3 if a bytes member exists in the SyntaxError, though I suspect that would be an invalid usage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 11:36:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Mar 2017 15:36:23 +0000 Subject: [issue29809] TypeError in traceback.print_exc - unicode does not have the buffer interface In-Reply-To: <1489501789.51.0.676200983775.issue29809@psf.upfronthosting.co.za> Message-ID: <1489505783.54.0.0637201544397.issue29809@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: format_exception_only() produces a Unicode string for SyntaxError with Unicode source line. >>> traceback.format_exception_only(SyntaxError, SyntaxError('failed', ('', 7, 2, u' // test'))) [' File "", line 7\n', u' // test\n', ' ^\n', 'SyntaxError: failed\n'] But io.BytesIO() accepts only binary strings. The similar issue is caused by Unicode file name: >>> traceback.format_exception_only(SyntaxError, SyntaxError('failed', (u'', 7, 2, ' // test'))) [u' File "", line 7\n', ' // test\n', ' ^\n', 'SyntaxError: failed\n'] But Unicode error message doesn't produce Unicode output: >>> traceback.format_exception_only(SyntaxError, SyntaxError(u'failed', ('', 7, 2, ' // test'))) [' File "", line 7\n', ' // test\n', ' ^\n', 'SyntaxError: failed\n'] How you got a Unicode source line in SyntaxError? ---------- components: +Library (Lib), Unicode nosy: +ezio.melotti, haypo, serhiy.storchaka type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 11:41:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 15:41:46 +0000 Subject: [issue29809] TypeError in traceback.print_exc - unicode does not have the buffer interface In-Reply-To: <1489501789.51.0.676200983775.issue29809@psf.upfronthosting.co.za> Message-ID: <1489506106.17.0.938242362302.issue29809@psf.upfronthosting.co.za> STINNER Victor added the comment: sys.stderr.write() accepts Unicode (encoded to sys.stderr.encoding), whereas io.BytesIO.write() requires bytes: >>> import sys; sys.stderr.write(u'\xe9\n') ? >>> import io; io.BytesIO().write(u'\xe9\n') Traceback (most recent call last): File "", line 1, in TypeError: 'unicode' does not have the buffer interface You should write an helper function (class with a write method) encoding Unicode strings. > The same test runs without error on Python 3. Yeah, it's now time to upgrade to Python 3 ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 11:52:43 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 14 Mar 2017 15:52:43 +0000 Subject: [issue29592] abs_paths() in site.py is slow In-Reply-To: <1487348382.21.0.191353478088.issue29592@psf.upfronthosting.co.za> Message-ID: <1489506763.13.0.0774732035926.issue29592@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 12:17:46 2017 From: report at bugs.python.org (David Mertz) Date: Tue, 14 Mar 2017 16:17:46 +0000 Subject: [issue25478] Consider adding a normalize() method to collections.Counter() In-Reply-To: <1445826280.05.0.307309053044.issue25478@psf.upfronthosting.co.za> Message-ID: <1489508266.54.0.352672594197.issue25478@psf.upfronthosting.co.za> David Mertz added the comment: I definitely wouldn't want a mutator that "normalized" counts for the reason Antoine mentions. It would be a common error to normalize then continue meaningless counting. One could write a `Frequency` subclass easily enough. The essential feature in my mind would be to keep an attribute `Counter.total` around to perform the normalization. I'm +1 on adding that to `collections.Counter` itself. I'm not sure if this would be better as an attribute kept directly or as a property that called `sum(self.values())` when accessed. I believe that having `mycounter.total` would provide the right normalization in a clean API, and also expose easy access to other questions one would naturally ask (e.g. "How many observations were made?") ---------- nosy: +David Mertz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 12:17:49 2017 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 14 Mar 2017 16:17:49 +0000 Subject: [issue29810] Rename ssl.Purpose.{CLIENT,SERVER}_AUTH Message-ID: <1489508269.56.0.751351378955.issue29810@psf.upfronthosting.co.za> New submission from Alex Gaynor: The names are super misleading. First, they're written in a way that's the opposite of how people think about these things (CLIENT_AUTH -> server socket; SERVER_AUTH -> client socket). Second, they're misleading, you can have TLS which is *mutually* authenticated. Third, CLIENT_AUTH is very frequently used for a server socket where the client isn't authenticated (at the TLS layer) at all! A simple fix would be to add: Purpose.{CLIENT,SERVER}_SOCKET and alias the old names to those values. ---------- messages: 289601 nosy: alex priority: normal severity: normal status: open title: Rename ssl.Purpose.{CLIENT,SERVER}_AUTH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 12:17:55 2017 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 14 Mar 2017 16:17:55 +0000 Subject: [issue29810] Rename ssl.Purpose.{CLIENT,SERVER}_AUTH In-Reply-To: <1489508269.56.0.751351378955.issue29810@psf.upfronthosting.co.za> Message-ID: <1489508275.87.0.216669642076.issue29810@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +christian.heimes, dstufft, janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 12:22:18 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 14 Mar 2017 16:22:18 +0000 Subject: [issue29787] Internal importlib frames visible when module imported by import_module throws exception In-Reply-To: <1489161057.85.0.765402774015.issue29787@psf.upfronthosting.co.za> Message-ID: <1489508538.4.0.185748375483.issue29787@psf.upfronthosting.co.za> Brett Cannon added the comment: Yep, I agree it isn't as nice as syntactic import, but that can happen when you're not getting to use dedicated bytecode like syntactic import does. If you can come up with a patch that adds hardly any more C code -- say about 10 or 20 lines? -- I would consider reviewing the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 12:24:23 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 14 Mar 2017 16:24:23 +0000 Subject: [issue29540] Add compact=True flag to json.dump/dumps In-Reply-To: <1486951474.88.0.917635653579.issue29540@psf.upfronthosting.co.za> Message-ID: <1489508663.2.0.0816321190612.issue29540@psf.upfronthosting.co.za> Brett Cannon added the comment: I agree with David that I don't see how adding a constant to the module is really a complication of an API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 12:38:30 2017 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Mar 2017 16:38:30 +0000 Subject: [issue29810] Rename ssl.Purpose.{CLIENT,SERVER}_AUTH In-Reply-To: <1489508269.56.0.751351378955.issue29810@psf.upfronthosting.co.za> Message-ID: <1489509510.33.0.983719244145.issue29810@psf.upfronthosting.co.za> Christian Heimes added the comment: For 3.7 I'm planning to move to protocols instead of purpose oids (PROTOCOL_TLS_CLIENT, PROTOCOL_TLS_SERVER). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 12:40:50 2017 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 14 Mar 2017 16:40:50 +0000 Subject: [issue29810] Rename ssl.Purpose.{CLIENT,SERVER}_AUTH In-Reply-To: <1489508269.56.0.751351378955.issue29810@psf.upfronthosting.co.za> Message-ID: <1489509650.42.0.587561883118.issue29810@psf.upfronthosting.co.za> Alex Gaynor added the comment: Ah, so instead of PROTOCOL_SSLv23 using PROTOCOL_TLS_CLIENT and deprecating the Purpose bits entirely? That sounds good to me! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 12:48:30 2017 From: report at bugs.python.org (Christian Heimes) Date: Tue, 14 Mar 2017 16:48:30 +0000 Subject: [issue29810] Rename ssl.Purpose.{CLIENT,SERVER}_AUTH In-Reply-To: <1489508269.56.0.751351378955.issue29810@psf.upfronthosting.co.za> Message-ID: <1489510110.3.0.277271708945.issue29810@psf.upfronthosting.co.za> Christian Heimes added the comment: Yes, I'm planning a PEP to make the SSL module a bit more sane: 1) deprecate all protocols except for PROTOCOL_TLS_CLIENT / PROTOCOL_TLS_SERVER 2) deprecate purpose in favor of PROTOCOL_TLS_* 3) PROTOCOL_TLS_CLIENT defaults to CERT_REQUIRED, match_hostname=True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 12:48:50 2017 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 14 Mar 2017 16:48:50 +0000 Subject: [issue29810] Rename ssl.Purpose.{CLIENT,SERVER}_AUTH In-Reply-To: <1489508269.56.0.751351378955.issue29810@psf.upfronthosting.co.za> Message-ID: <1489510130.53.0.9659355626.issue29810@psf.upfronthosting.co.za> Alex Gaynor added the comment: Sounds good to me! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 13:06:54 2017 From: report at bugs.python.org (Ben Hoyt) Date: Tue, 14 Mar 2017 17:06:54 +0000 Subject: [issue29540] Add compact=True flag to json.dump/dumps In-Reply-To: <1489508663.2.0.0816321190612.issue29540@psf.upfronthosting.co.za> Message-ID: Ben Hoyt added the comment: Agreed. Seems much the same as other argument constants, like pickle.HIGHEST_PROTOCOL for the "protocol" argument. These are not changing the API, just adding a helper constant to avoid the magic values. -Ben On Tue, Mar 14, 2017 at 12:24 PM, Brett Cannon wrote: > > Brett Cannon added the comment: > > I agree with David that I don't see how adding a constant to the module is > really a complication of an API. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 13:09:13 2017 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Mar 2017 17:09:13 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1489511353.21.0.537138050981.issue29808@psf.upfronthosting.co.za> Vinay Sajip added the comment: Can you provide a short script which demonstrates exactly the problem you're trying to solve? ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 13:17:14 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 14 Mar 2017 17:17:14 +0000 Subject: [issue24622] tokenize.py: missing EXACT_TOKEN_TYPES In-Reply-To: <1436729377.89.0.451182448624.issue24622@psf.upfronthosting.co.za> Message-ID: <1489511834.92.0.166393408522.issue24622@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Stefan, do you have time to make a PR for this? ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 13:20:40 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 14 Mar 2017 17:20:40 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1489512040.5.0.474226893359.issue29808@psf.upfronthosting.co.za> ???? ????????? added the comment: Nothing special. Just try to create SysLogHandler when syslog server is down. Exception will be raised. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 13:22:46 2017 From: report at bugs.python.org (svelankar) Date: Tue, 14 Mar 2017 17:22:46 +0000 Subject: [issue29674] Use GCC __attribute__((alloc_size(x, y))) on PyMem_Malloc() functions In-Reply-To: <1488272050.61.0.409487721584.issue29674@psf.upfronthosting.co.za> Message-ID: <1489512166.3.0.12568716207.issue29674@psf.upfronthosting.co.za> svelankar added the comment: Ok. As a side note, while compiling python source using gcc 7 [gcc (GCC) 7.0.1 20170314 (experimental)], few places in the code with case fallthrough (must be intentional) triggered this warning - -Wimplicit-fallthrough=. We can either disable this warning altogether (downside being unintended fallthroughs will go unnoticed) OR pass some flag [https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/] to -Wimplicit-fallthrough=. so that it does a regex match on the comments defined [something like /* fall through code */] in that specific part of the code and suppresses the warning. The downside to this is that these comments might have to be inserted wherever they are missing and new code introduced in the future with intentional fallthroughs need to write those comments. Please let me know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 13:25:34 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 14 Mar 2017 17:25:34 +0000 Subject: [issue12458] Tracebacks should contain the first line of continuation lines In-Reply-To: <1309499207.17.0.676241559437.issue12458@psf.upfronthosting.co.za> Message-ID: <1489512334.39.0.315694621278.issue12458@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 13:26:10 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 14 Mar 2017 17:26:10 +0000 Subject: [issue29051] Improve error reporting involving f-strings (PEP 498) In-Reply-To: <1482494461.91.0.191852219403.issue29051@psf.upfronthosting.co.za> Message-ID: <1489512370.82.0.610966502198.issue29051@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 13:46:55 2017 From: report at bugs.python.org (Stefan Krah) Date: Tue, 14 Mar 2017 17:46:55 +0000 Subject: [issue24622] tokenize.py: missing EXACT_TOKEN_TYPES In-Reply-To: <1436729377.89.0.451182448624.issue24622@psf.upfronthosting.co.za> Message-ID: <1489513615.42.0.986203026995.issue24622@psf.upfronthosting.co.za> Stefan Krah added the comment: Not right now, but if anyone makes a PR I can click the merge button. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 13:52:45 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 14 Mar 2017 17:52:45 +0000 Subject: [issue29387] Tabs vs spaces FAQ out of date In-Reply-To: <1485734038.81.0.0566253928841.issue29387@psf.upfronthosting.co.za> Message-ID: <1489513965.82.0.721877386733.issue29387@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Just a question, does this need backport to 2.7? It's only been backported to 3.5 and 3.6. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 15:50:08 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 14 Mar 2017 19:50:08 +0000 Subject: [issue24622] tokenize.py: missing EXACT_TOKEN_TYPES In-Reply-To: <1436729377.89.0.451182448624.issue24622@psf.upfronthosting.co.za> Message-ID: <1489521008.91.0.0914200093393.issue24622@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- pull_requests: +550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 16:19:53 2017 From: report at bugs.python.org (Stefan Krah) Date: Tue, 14 Mar 2017 20:19:53 +0000 Subject: [issue24622] tokenize.py: missing EXACT_TOKEN_TYPES In-Reply-To: <1436729377.89.0.451182448624.issue24622@psf.upfronthosting.co.za> Message-ID: <1489522793.69.0.900153278684.issue24622@psf.upfronthosting.co.za> Stefan Krah added the comment: Thanks for the PR! -- Merged. ---------- assignee: -> skrah components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 16:21:57 2017 From: report at bugs.python.org (Stefan Krah) Date: Tue, 14 Mar 2017 20:21:57 +0000 Subject: [issue24622] tokenize.py: missing EXACT_TOKEN_TYPES In-Reply-To: <1436729377.89.0.451182448624.issue24622@psf.upfronthosting.co.za> Message-ID: <1489522917.66.0.117290593107.issue24622@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 16:32:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 20:32:15 +0000 Subject: [issue29674] Use GCC __attribute__((alloc_size(x, y))) on PyMem_Malloc() functions In-Reply-To: <1489512166.3.0.12568716207.issue29674@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Yeah, as for each GCC release, I expect new warnings. I noticed the implicit fall through in GCC 7. I know that it's used on purpose in CPython. ---------- title: Use GCC __attribute__((alloc_size(x,y))) on PyMem_Malloc() functions -> Use GCC __attribute__((alloc_size(x, y))) on PyMem_Malloc() functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 16:36:46 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 14 Mar 2017 20:36:46 +0000 Subject: [issue29339] Interactive: Move to same indentation level as previousline In-Reply-To: <1485039375.56.0.473197770315.issue29339@psf.upfronthosting.co.za> Message-ID: <1489523806.16.0.590750918316.issue29339@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- nosy: -Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 16:37:05 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 14 Mar 2017 20:37:05 +0000 Subject: [issue29387] Tabs vs spaces FAQ out of date In-Reply-To: <1485734038.81.0.0566253928841.issue29387@psf.upfronthosting.co.za> Message-ID: <1489523825.35.0.77583358235.issue29387@psf.upfronthosting.co.za> Martin Panter added the comment: The ?tabnanny? script was removed from Tools/scripts/ in 2.0: . So the 2.7 FAQ also has the wrong location. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 16:42:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 20:42:37 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments In-Reply-To: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> Message-ID: <1489524157.58.0.227115390843.issue29735@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 16:54:35 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 14 Mar 2017 20:54:35 +0000 Subject: [issue29387] Tabs vs spaces FAQ out of date In-Reply-To: <1485734038.81.0.0566253928841.issue29387@psf.upfronthosting.co.za> Message-ID: <1489524875.81.0.838628367209.issue29387@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks, Martin, and thanks Jim for the ping. I'll backport the change to 2.7 later today, and then this issue can be closed :) ---------- assignee: docs at python -> Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 17:01:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 21:01:38 +0000 Subject: [issue29676] C method is not profiled by lsprof In-Reply-To: <1488281664.18.0.494134456081.issue29676@psf.upfronthosting.co.za> Message-ID: <1489525298.47.0.292232315173.issue29676@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh wow, I didn't expect this issue with tracing when the commit 5566bbb8d563646d83e8172410fa0c085e8233b1 was merged: test_sys_settrace and test_lsprof passed. Would it be possible to add an unit test? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 17:33:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 21:33:18 +0000 Subject: [issue29507] Use FASTCALL in typeobject.c call_method() to avoid temporary tuple In-Reply-To: <1486599458.19.0.87442756928.issue29507@psf.upfronthosting.co.za> Message-ID: <1489527198.37.0.0373579448826.issue29507@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Use FASTCALL in call_method() to avoid temporary tuple -> Use FASTCALL in typeobject.c call_method() to avoid temporary tuple _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 17:36:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 21:36:22 +0000 Subject: [issue29811] Use FASTCALL in call.c callmethod() to avoid temporary tuple Message-ID: <1489527382.61.0.961347131551.issue29811@psf.upfronthosting.co.za> New submission from STINNER Victor: call_method() of typeobject.c has been optimized to avoid temporary method object and to avoid temporary tuple in the issue #29507. Optimizing callmethod() of call.c was already discussed on issue #29507 but no decision was taken. Since call.c code is more complex, I created a new issue. ---------- messages: 289620 nosy: haypo, inada.naoki priority: normal severity: normal status: open title: Use FASTCALL in call.c callmethod() to avoid temporary tuple type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 17:38:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 21:38:51 +0000 Subject: [issue29507] Use FASTCALL in typeobject.c call_method() to avoid temporary tuple In-Reply-To: <1486599458.19.0.87442756928.issue29507@psf.upfronthosting.co.za> Message-ID: <1489527531.36.0.187041915573.issue29507@psf.upfronthosting.co.za> STINNER Victor added the comment: call_method() of typeobject.c has been optimized by the commit 516b98161a0e88fde85145ead571e13394215f8c. I consider that the initial issue is now fixed. I created the issue #29811 to discuss optimizing callmethod() of call.c which is more complex. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 17:41:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 21:41:20 +0000 Subject: [issue29811] Avoid temporary method object in PyObject_CallMethod() and PyObject_CallMethodObjArgs() In-Reply-To: <1489527382.61.0.961347131551.issue29811@psf.upfronthosting.co.za> Message-ID: <1489527680.81.0.434312748929.issue29811@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Use FASTCALL in call.c callmethod() to avoid temporary tuple -> Avoid temporary method object in PyObject_CallMethod() and PyObject_CallMethodObjArgs() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 17:45:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 21:45:03 +0000 Subject: [issue29811] Avoid temporary method object in PyObject_CallMethod() and PyObject_CallMethodObjArgs() In-Reply-To: <1489527382.61.0.961347131551.issue29811@psf.upfronthosting.co.za> Message-ID: <1489527903.87.0.7002179561.issue29811@psf.upfronthosting.co.za> STINNER Victor added the comment: callmethod3.patch of #29507 implements proposed optimization, but only when there is no positional argument. The patch doesn't apply cleanly since the code evolved, including a major refactoring: new Objects/call.c file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 17:47:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 14 Mar 2017 21:47:16 +0000 Subject: [issue29026] time.time() documentation should mention UTC timezone In-Reply-To: <1482243889.09.0.538886851254.issue29026@psf.upfronthosting.co.za> Message-ID: <1489528036.3.0.253438733403.issue29026@psf.upfronthosting.co.za> STINNER Victor added the comment: Mariatta: "Hi, does this need backport to 2.7? I'm getting a lot of conflicts while trying to do that... Not sure how to proceed." I think it's ok to leave Python 2.7 doc unchanged. It's only a minor doc enhancement, the 2.7 doc is still correct. I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 18:05:22 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 14 Mar 2017 22:05:22 +0000 Subject: [issue29779] New environment variable PYTHONHISTORY In-Reply-To: <1489318971.89.0.0703868184894.issue29779@psf.upfronthosting.co.za> Message-ID: <20170314180519.3101fed7@subdivisions.wooz.org> Barry A. Warsaw added the comment: On Mar 12, 2017, at 11:42 AM, Chi Hsuan Yen wrote: >That's a great feature! Here's a question: what should be CPython's behavior >when PYTHONHISTORY is explicitly set to empty? Currently there's an error: > >$ PYTHONHISTORY= ./python >Python 3.7.0a0 (master:f6595983e08fe20cf06a2535d74d912c6dbb044f, Mar 12 2017, 19:22:29) >[GCC 6.3.1 20170306] on linux >Type "help", "copyright", "credits" or "license" for more information. >>>> >Error in atexit._run_exitfuncs: >FileNotFoundError: [Errno 2] No such file or directory Yeah, that's not good. I'll note that in the PR. (But also note that you have to unset PYTHONSTARTUP if you, like me, use that as the old school way of enabling history.) >Maybe it's better to just disable the history functionality in this case? It should use the default, but it shouldn't cause an error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 18:09:04 2017 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 14 Mar 2017 22:09:04 +0000 Subject: [issue29809] TypeError in traceback.print_exc - unicode does not have the buffer interface In-Reply-To: <1489501789.51.0.676200983775.issue29809@psf.upfronthosting.co.za> Message-ID: <1489529344.48.0.319276177646.issue29809@psf.upfronthosting.co.za> Jason R. Coombs added the comment: > How you got a Unicode source line in SyntaxError? Good question. Took me a while to replicate the exact conditions, but here's an example: #coding: utf-8 from __future__ import unicode_literals import tokenize import io code = """ // // """ buf = io.StringIO(code) try: list(tokenize.generate_tokens(buf.readline)) except Exception as exc: print(exc.args) It outputs: ('unindent does not match any outer indentation level', ('', 3, 2, u' //\n')) > Yeah, it's now time to upgrade to Python 3 ;-) Love to. Currently, we're blocked in that our code relies on SimpleParse, which doesn't support Python 3. > You should write an helper function (class with a write method) encoding Unicode strings. Good idea. I was pondering what I might use as a workaround and your suggestion sounds suitable. I'll report back how well that works. ---------- type: behavior -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 18:35:11 2017 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 14 Mar 2017 22:35:11 +0000 Subject: [issue29809] TypeError in traceback.print_exc - unicode does not have the buffer interface In-Reply-To: <1489501789.51.0.676200983775.issue29809@psf.upfronthosting.co.za> Message-ID: <1489530911.03.0.0755090295846.issue29809@psf.upfronthosting.co.za> Jason R. Coombs added the comment: As a workaround, I wrapped BytesIO thus and it works for our needs. class LenientIO(io.BytesIO): """ A version of BytesIO that can accept unicode or bytes. See http://bugs.python.org/issue29809 """ def write(self, value): if isinstance(value, six.text_type): value = value.encode('utf-8') super(LenientIO, self).write(value) I'll recommend we close as wontfix, given the limited impact, unless it's demonstrated elsewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 18:35:24 2017 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 14 Mar 2017 22:35:24 +0000 Subject: [issue29809] TypeError in traceback.print_exc - unicode does not have the buffer interface In-Reply-To: <1489501789.51.0.676200983775.issue29809@psf.upfronthosting.co.za> Message-ID: <1489530924.6.0.228066040768.issue29809@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 19:02:18 2017 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 14 Mar 2017 23:02:18 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1489532538.14.0.0807730958691.issue29808@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Nothing special. Just try to create SysLogHandler when syslog server is down. Which specific syslog configuration? UDP listener, Unix socket listener, or both? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 19:03:41 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 14 Mar 2017 23:03:41 +0000 Subject: [issue29812] test for token.py, and consistency tests for tokenize.py Message-ID: <1489532621.9.0.449448187774.issue29812@psf.upfronthosting.co.za> New submission from R. David Murray: http://bugs.python.org/issue24622 made reminded me that a while back we added tests for the keyword module that includes a test that if you run it, you get the result that is checked in. The same thing could be done for the token.py module. And then we could add a cross-check test that tokenize.py has all the symbols defined as well. ---------- components: Tests keywords: easy messages: 289628 nosy: r.david.murray priority: normal severity: normal stage: needs patch status: open title: test for token.py, and consistency tests for tokenize.py type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 19:13:54 2017 From: report at bugs.python.org (12345 67890) Date: Tue, 14 Mar 2017 23:13:54 +0000 Subject: [issue29339] Interactive: Move to same indentation level as previousline In-Reply-To: <1485039375.56.0.473197770315.issue29339@psf.upfronthosting.co.za> Message-ID: <1489533234.83.0.242794104985.issue29339@psf.upfronthosting.co.za> 12345 67890 added the comment: Folks, I have decided that I no longer have the time to resolve this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 19:14:24 2017 From: report at bugs.python.org (12345 67890) Date: Tue, 14 Mar 2017 23:14:24 +0000 Subject: [issue29339] Interactive: Move to same indentation level as previousline In-Reply-To: <1485039375.56.0.473197770315.issue29339@psf.upfronthosting.co.za> Message-ID: <1489533264.79.0.746447606772.issue29339@psf.upfronthosting.co.za> Changes by 12345 67890 : ---------- nosy: -12345 67890 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 19:15:35 2017 From: report at bugs.python.org (Oren Milman) Date: Tue, 14 Mar 2017 23:15:35 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489533335.02.0.428746487362.issue15988@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +551 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 20:36:50 2017 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 15 Mar 2017 00:36:50 +0000 Subject: [issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different In-Reply-To: <1489439024.83.0.354569832809.issue29805@psf.upfronthosting.co.za> Message-ID: <1489538210.06.0.846735998495.issue29805@psf.upfronthosting.co.za> Eric V. Smith added the comment: I agree this needs to be different from replace(), due to not being atomic. That makes it an enhancement, so I'm removing 3.5. I'm +1 on Path supporting something like shutil.move(). ---------- nosy: +eric.smith type: -> enhancement versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 21:04:48 2017 From: report at bugs.python.org (Martin Panter) Date: Wed, 15 Mar 2017 01:04:48 +0000 Subject: [issue29809] TypeError in traceback.print_exc - unicode does not have the buffer interface In-Reply-To: <1489501789.51.0.676200983775.issue29809@psf.upfronthosting.co.za> Message-ID: <1489539888.64.0.873635373317.issue29809@psf.upfronthosting.co.za> Martin Panter added the comment: FWIW I tend to use cStringIO.StringIO as a Python 2 replacement for io.StringIO to avoid this str vs unicode problem. But that only accepts ASCII, so won't help you if you really need the UTF-8 encoding step. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 21:36:42 2017 From: report at bugs.python.org (svelankar) Date: Wed, 15 Mar 2017 01:36:42 +0000 Subject: [issue29674] Use GCC __attribute__((alloc_size(x, y))) on PyMem_Malloc() functions In-Reply-To: <1488272050.61.0.409487721584.issue29674@psf.upfronthosting.co.za> Message-ID: <1489541802.32.0.177098314338.issue29674@psf.upfronthosting.co.za> Changes by svelankar : ---------- pull_requests: +552 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 22:40:50 2017 From: report at bugs.python.org (Michael Seifert) Date: Wed, 15 Mar 2017 02:40:50 +0000 Subject: [issue29813] PyTuple_GetSlice documentation incorrect Message-ID: <1489545650.77.0.905284505898.issue29813@psf.upfronthosting.co.za> New submission from Michael Seifert: The PyTuple_GetSlice documentation says it "Take a slice of the tuple pointed to by p from low to high and return it as a new tuple." [0] However in case the start is <= 0 and the stop is >= tuplesize it doesn't return the promised "new tuple", it just returns the tuplepointer after incrementing it's refcount [1]. The behaviour is fine (it gave me a bit of a headache though), however could a note/warning/sentence be included in the docs mentioning that special case? [0] https://docs.python.org/3/c-api/tuple.html#c.PyTuple_GetSlice [1] https://github.com/python/cpython/blob/master/Objects/tupleobject.c#L414 ---------- assignee: docs at python components: Documentation messages: 289632 nosy: MSeifert, docs at python priority: normal severity: normal status: open title: PyTuple_GetSlice documentation incorrect type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 22:41:35 2017 From: report at bugs.python.org (Michael Seifert) Date: Wed, 15 Mar 2017 02:41:35 +0000 Subject: [issue29813] PyTuple_GetSlice does not always return a new tuple In-Reply-To: <1489545650.77.0.905284505898.issue29813@psf.upfronthosting.co.za> Message-ID: <1489545695.51.0.471445920839.issue29813@psf.upfronthosting.co.za> Changes by Michael Seifert : ---------- title: PyTuple_GetSlice documentation incorrect -> PyTuple_GetSlice does not always return a new tuple _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 22:49:49 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 15 Mar 2017 02:49:49 +0000 Subject: [issue29676] C method is not profiled by lsprof In-Reply-To: <1488281664.18.0.494134456081.issue29676@psf.upfronthosting.co.za> Message-ID: <1489546189.63.0.452048761294.issue29676@psf.upfronthosting.co.za> Xiang Zhang added the comment: Actually the current test produces some noises, but it doesn't fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 23:03:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 15 Mar 2017 03:03:39 +0000 Subject: [issue29339] Interactive: Move to same indentation level as previousline In-Reply-To: <1485039375.56.0.473197770315.issue29339@psf.upfronthosting.co.za> Message-ID: <1489547019.7.0.392782231034.issue29339@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am inclined to close this. Any objection? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 23:35:45 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Wed, 15 Mar 2017 03:35:45 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1489548945.03.0.258648800653.issue29808@psf.upfronthosting.co.za> ???? ????????? added the comment: Syslog, listening on local machine via UNIX socket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 23:36:38 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 15 Mar 2017 03:36:38 +0000 Subject: [issue29813] PyTuple_GetSlice does not always return a new tuple In-Reply-To: <1489545650.77.0.905284505898.issue29813@psf.upfronthosting.co.za> Message-ID: <1489548998.89.0.386887146872.issue29813@psf.upfronthosting.co.za> Xiang Zhang added the comment: I think the description is fine. :-( What leads to your headache? ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 14 23:43:57 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 15 Mar 2017 03:43:57 +0000 Subject: [issue25478] Consider adding a normalize() method to collections.Counter() In-Reply-To: <1445826280.05.0.307309053044.issue25478@psf.upfronthosting.co.za> Message-ID: <1489549437.87.0.946901067504.issue25478@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The idea is that the method would return a new counter instance and leave the existing instance untouched. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 00:08:48 2017 From: report at bugs.python.org (Michael Seifert) Date: Wed, 15 Mar 2017 04:08:48 +0000 Subject: [issue29813] PyTuple_GetSlice does not always return a new tuple In-Reply-To: <1489545650.77.0.905284505898.issue29813@psf.upfronthosting.co.za> Message-ID: <1489550928.4.0.895924885104.issue29813@psf.upfronthosting.co.za> Michael Seifert added the comment: > What leads to your headache? That depending on the arguments to "PyTuple_GetSlice" I get "SystemError: ..\Objects\tupleobject.c:156: bad argument to internal function" when using PyTuple_SetItem on the (supposedly) new tuple. Maybe I just misunderstood the word "new" in the documentation. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 00:17:32 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 15 Mar 2017 04:17:32 +0000 Subject: [issue29813] PyTuple_GetSlice does not always return a new tuple In-Reply-To: <1489545650.77.0.905284505898.issue29813@psf.upfronthosting.co.za> Message-ID: <1489551452.67.0.293522905465.issue29813@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 00:25:20 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 15 Mar 2017 04:25:20 +0000 Subject: [issue29813] PyTuple_GetSlice does not always return a new tuple In-Reply-To: <1489545650.77.0.905284505898.issue29813@psf.upfronthosting.co.za> Message-ID: <1489551920.87.0.159891195927.issue29813@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think the docs are fine as-is. Whether an identical tuple is new or not is an implementation detail. IMO, the docs would create more confusion by trying to over-explain, "slicing of tuples always returns a new tuple when the result tuple is distinct from the original; however, in the case where the result tuple is not distinct, the implementation is at liberty to return the original tuple instead of a new tuple. Since tuples are immutable, this should make no difference at all to the user." ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 00:39:11 2017 From: report at bugs.python.org (David Mertz) Date: Wed, 15 Mar 2017 04:39:11 +0000 Subject: [issue25478] Consider adding a normalize() method to collections.Counter() In-Reply-To: <1445826280.05.0.307309053044.issue25478@psf.upfronthosting.co.za> Message-ID: <1489552751.94.0.48858539885.issue25478@psf.upfronthosting.co.za> David Mertz added the comment: Raymond wrote: > The idea is that the method would return a new counter instance > and leave the existing instance untouched. Your own first example suggested: c /= sum(c.values()) That would suggest an inplace modification. But even if it's not that, but creating a new object, that doesn't make much difference to the end user who has rebound the name `c`. Likewise, I think users would be somewhat tempted by: c = c.scale_by(1.0/c.total) # My property/attribute suggestion This would present the same attractive nuisance. If the interface was the slightly less friendly: freqs = {k:v/c.total for k, v in c.items()} I think there would be far less temptation to rebind the same name unintentionally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 01:04:03 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 15 Mar 2017 05:04:03 +0000 Subject: [issue29521] Minor warning messages when compiling documentation In-Reply-To: <1486714459.11.0.428886237265.issue29521@psf.upfronthosting.co.za> Message-ID: <1489554243.86.0.55819592642.issue29521@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +553 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 02:22:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 06:22:36 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1489558956.24.0.417367997094.issue29800@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you create PRs for 3.6 and 3.5 Michael? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 02:26:24 2017 From: report at bugs.python.org (Mateusz Bysiek) Date: Wed, 15 Mar 2017 06:26:24 +0000 Subject: [issue29814] parsing f-strings -- opening brace of expression gets duplicated when preceeded by backslash Message-ID: <1489559184.67.0.191870108589.issue29814@psf.upfronthosting.co.za> New submission from Mateusz Bysiek: with Python 3.6.0 and the following script: ``` #!/usr/bin/env python3.6 import ast code1 = '''"\\{x}"''' code2 = '''f"\\{x}"''' tree1 = ast.parse(code1, mode='eval') print(ast.dump(tree1)) tree2 = ast.parse(code2, mode='eval') print(ast.dump(tree2)) ``` I get the following output: ``` Expression(body=Str(s='\\{x}')) Expression(body=JoinedStr(values=[Str(s='\\{'), FormattedValue(value=Name(id='x', ctx=Load()), conversion=-1, format_spec=None)])) ``` Therefore, the normal string is `'\\{x}'`. But the f-string has two parts: `'\\{'` and an expression `Name(id='x', ctx=Load())`. Where does the `{` in the string part of f-string come from? I can't believe this is the intended behavior... Or, is it? When I escape the backslash once like above, what gets parsed is actually unescaped backslash. So this might just boil down to inconsistency in parsing `\{` in normal vs. f-strings. I originally discovered this in typed_ast https://github.com/python/typed_ast/issues/34 but the behaviour of ast is identical and since developers of typed_ast aim at compatibility with ast, I bring this issue here. ---------- components: Library (Lib) messages: 289642 nosy: mbdevpl priority: normal severity: normal status: open title: parsing f-strings -- opening brace of expression gets duplicated when preceeded by backslash type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 02:33:45 2017 From: report at bugs.python.org (Mateusz Bysiek) Date: Wed, 15 Mar 2017 06:33:45 +0000 Subject: [issue29051] Improve error reporting involving f-strings (PEP 498) In-Reply-To: <1482494461.91.0.191852219403.issue29051@psf.upfronthosting.co.za> Message-ID: <1489559625.9.0.6602396827.issue29051@psf.upfronthosting.co.za> Changes by Mateusz Bysiek : ---------- nosy: +mbdevpl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 02:40:24 2017 From: report at bugs.python.org (Mateusz Bysiek) Date: Wed, 15 Mar 2017 06:40:24 +0000 Subject: [issue24119] Carry comments with the AST In-Reply-To: <1430666470.75.0.339272692521.issue24119@psf.upfronthosting.co.za> Message-ID: <1489560024.01.0.490386464363.issue24119@psf.upfronthosting.co.za> Mateusz Bysiek added the comment: For some time now, there's an alternate ast implementation https://github.com/python/typed_ast that carries PEP 484 type comments with the AST as attributes of certain nodes. Their approach is described here: https://github.com/python/typed_ast/blob/master/typed_ast/ast3.py#L5 If type comments become mainstream in Python, could this approach maybe be adopted as official Python AST at some point? ---------- nosy: +mbdevpl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 02:42:54 2017 From: report at bugs.python.org (Mateusz Bysiek) Date: Wed, 15 Mar 2017 06:42:54 +0000 Subject: [issue29471] AST: add an attribute to FunctionDef to distinguish functions from generators and coroutines In-Reply-To: <1486458539.58.0.744778606798.issue29471@psf.upfronthosting.co.za> Message-ID: <1489560174.86.0.730213678157.issue29471@psf.upfronthosting.co.za> Changes by Mateusz Bysiek : ---------- nosy: +mbdevpl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 02:45:24 2017 From: report at bugs.python.org (Mateusz Bysiek) Date: Wed, 15 Mar 2017 06:45:24 +0000 Subject: [issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer In-Reply-To: <1300164402.79.0.766591131661.issue11549@psf.upfronthosting.co.za> Message-ID: <1489560324.75.0.939947605522.issue11549@psf.upfronthosting.co.za> Changes by Mateusz Bysiek : ---------- nosy: +mbdevpl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 02:45:50 2017 From: report at bugs.python.org (Mateusz Bysiek) Date: Wed, 15 Mar 2017 06:45:50 +0000 Subject: [issue10399] AST Optimization: inlining of function calls In-Reply-To: <1289593012.28.0.71054855235.issue10399@psf.upfronthosting.co.za> Message-ID: <1489560350.53.0.130324607434.issue10399@psf.upfronthosting.co.za> Changes by Mateusz Bysiek : ---------- nosy: +mbdevpl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 02:46:47 2017 From: report at bugs.python.org (Mateusz Bysiek) Date: Wed, 15 Mar 2017 06:46:47 +0000 Subject: [issue28964] AST literal_eval exceptions provide no information about line number In-Reply-To: <1481665664.26.0.256194535172.issue28964@psf.upfronthosting.co.za> Message-ID: <1489560407.06.0.186237141753.issue28964@psf.upfronthosting.co.za> Changes by Mateusz Bysiek : ---------- nosy: +mbdevpl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 02:49:57 2017 From: report at bugs.python.org (Mateusz Bysiek) Date: Wed, 15 Mar 2017 06:49:57 +0000 Subject: [issue29715] Argparse improperly handles "-_" In-Reply-To: <1488575235.56.0.838313390775.issue29715@psf.upfronthosting.co.za> Message-ID: <1489560597.88.0.758458569518.issue29715@psf.upfronthosting.co.za> Changes by Mateusz Bysiek : ---------- title: Arparse improperly handles "-_" -> Argparse improperly handles "-_" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 03:03:30 2017 From: report at bugs.python.org (Michael Seifert) Date: Wed, 15 Mar 2017 07:03:30 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1489561410.61.0.884415531342.issue29800@psf.upfronthosting.co.za> Changes by Michael Seifert : ---------- pull_requests: +554 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 03:03:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 07:03:43 +0000 Subject: [issue29814] parsing f-strings -- opening brace of expression gets duplicated when preceeded by backslash In-Reply-To: <1489559184.67.0.191870108589.issue29814@psf.upfronthosting.co.za> Message-ID: <1489561423.43.0.50911087914.issue29814@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a duplicate of issue29104. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Left bracket remains in format string result when '\' preceeds it _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 03:09:36 2017 From: report at bugs.python.org (Michael Seifert) Date: Wed, 15 Mar 2017 07:09:36 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1489561776.07.0.0624592194784.issue29800@psf.upfronthosting.co.za> Changes by Michael Seifert : ---------- pull_requests: +555 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 03:19:59 2017 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 15 Mar 2017 07:19:59 +0000 Subject: [issue29104] Left bracket remains in format string result when '\' preceeds it In-Reply-To: <1483012585.51.0.342717701316.issue29104@psf.upfronthosting.co.za> Message-ID: <1489562399.84.0.376274663126.issue29104@psf.upfronthosting.co.za> Eric V. Smith added the comment: Serhiy: I plan to find time in the next week or so to look at this. Sorry for the delay. Plus, the new workflow isn't helping me out: I need to get up to speed on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 03:44:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 07:44:40 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1489563880.16.0.283120012521.issue29800@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Michael! ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 03:56:40 2017 From: report at bugs.python.org (Marcos Thomaz) Date: Wed, 15 Mar 2017 07:56:40 +0000 Subject: [issue29815] Fail at divide a negative integer number for a positive integer number Message-ID: <1489564600.52.0.574999326638.issue29815@psf.upfronthosting.co.za> New submission from Marcos Thomaz: At divide a negative integer number for a positive integer number, the result is wrong. For example, in operation: a, b, c = -7, 2, 7 d = divmod(a, b) print a//b, a%b, c[0], c // b, c%b The values printed are -4 1 3 1 ---------- components: Interpreter Core messages: 289647 nosy: marcosthomazs priority: normal severity: normal status: open title: Fail at divide a negative integer number for a positive integer number type: crash versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 04:16:52 2017 From: report at bugs.python.org (Martin Panter) Date: Wed, 15 Mar 2017 08:16:52 +0000 Subject: [issue29815] Fail at divide a negative integer number for a positive integer number In-Reply-To: <1489564600.52.0.574999326638.issue29815@psf.upfronthosting.co.za> Message-ID: <1489565812.84.0.6260692496.issue29815@psf.upfronthosting.co.za> Martin Panter added the comment: If you ignore the c[0] argument, the rest looks fine to me. See the documentation at and . The double-slash operator is called ?floor division?. If you are expecting some other rounding, see . ---------- nosy: +martin.panter resolution: -> not a bug stage: -> resolved status: open -> closed type: crash -> behavior versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 04:54:59 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 15 Mar 2017 08:54:59 +0000 Subject: [issue28647] python --help: -u is misdocumented as binary mode In-Reply-To: <1478687165.61.0.754522524524.issue28647@psf.upfronthosting.co.za> Message-ID: <1489568099.43.0.816964906728.issue28647@psf.upfronthosting.co.za> Nick Coghlan added the comment: I just ran into this discrepancy working on the test cases for PEP 538 - +1 for Gareth's suggested approach of just aligning the `--help` output with the man page. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 04:55:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 08:55:17 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift Message-ID: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Currently the value of right operand of the right shift operator is limited by C Py_ssize_t type. >>> 1 >> 10**100 Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C ssize_t >>> (-1) >> 10**100 Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C ssize_t >>> 1 >> -10**100 Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C ssize_t >>> (-1) >> -10**100 Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C ssize_t But this is artificial limitation. Right shift can be extended to support arbitrary integers. `x >> very_large_value` should be 0 for non-negative x and -1 for negative x. `x >> negative_value` should raise ValueError. >>> 1 >> 10 0 >>> (-1) >> 10 -1 >>> 1 >> -10 Traceback (most recent call last): File "", line 1, in ValueError: negative shift count >>> (-1) >> -10 Traceback (most recent call last): File "", line 1, in ValueError: negative shift count ---------- components: Interpreter Core messages: 289650 nosy: Oren Milman, mark.dickinson, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Get rid of C limitation for shift count in right shift type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 04:57:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Mar 2017 08:57:40 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1489568260.34.0.630959666504.issue29816@psf.upfronthosting.co.za> STINNER Victor added the comment: If we change something, I suggest to be consistent with lshift. I expect a memory error on "1 << (1 << 1024)" (no unlimited loop before a global system collapse please ;-)) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 05:00:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Mar 2017 09:00:29 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1489568429.25.0.566784800414.issue29816@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI I saw recently that the C limitation of len() was reported in the "owasp-pysec" project: https://github.com/ebranca/owasp-pysec/wiki/Overflow-in-len-function I don't understand what such "deliberate" limitation was reported in a hardened CPython project? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 05:06:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 09:06:15 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489568775.1.0.138676585283.issue15988@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Get rid of C limitation for shift count in right shift, can't set big int-like objects to items in array 'Q', 'L' and 'I' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 05:07:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 09:07:17 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489568837.27.0.277848155097.issue15988@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I just have started reviewing the PR and it looks great! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 05:19:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 09:19:13 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1489569553.43.0.979807612604.issue29816@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > If we change something, I suggest to be consistent with lshift. I expect a memory error on "1 << (1 << 1024)" (no unlimited loop before a global system collapse please ;-)) I agree that left shift should raise an ValueError rather than OverflowError for large negative shifts. But is hard to handle large positive shifts. `1 << count` consumes `count*2/15` bytes of memory. There is a gap between the maximal value of bits represented as Py_ssize_t (PY_SSIZE_T_MAX) and the number of bits of maximal Python int (PY_SSIZE_T_MAX*15/2). _PyLong_NumBits() starves from the same issue. I think an OverflowError is appropriate here for denoting the platform and implementation limitation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 05:39:44 2017 From: report at bugs.python.org (Marcos Thomaz) Date: Wed, 15 Mar 2017 09:39:44 +0000 Subject: [issue29815] Fail at divide a negative integer number for a positive integer number In-Reply-To: <1489564600.52.0.574999326638.issue29815@psf.upfronthosting.co.za> Message-ID: <1489570784.47.0.266570898153.issue29815@psf.upfronthosting.co.za> Marcos Thomaz added the comment: I'm sorry, but was a typing error. Try this operations: a, b, c = 7, -7, 2 print "1:", a // c, a % c print "2:", b // c, b % c the result is: 1: 3 1 2: -4 1 The division is the same, except by the signal (variable b is negative, but both, variables "a" and "b" are integers). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 05:47:04 2017 From: report at bugs.python.org (Marcos Thomaz) Date: Wed, 15 Mar 2017 09:47:04 +0000 Subject: [issue29815] Fail at divide a negative integer number for a positive integer number In-Reply-To: <1489564600.52.0.574999326638.issue29815@psf.upfronthosting.co.za> Message-ID: <1489571224.26.0.287657956445.issue29815@psf.upfronthosting.co.za> Marcos Thomaz added the comment: Try this operations, in interactive environment: >> 7 // 2 3 >> -7 // 2 -4 ---------- resolution: not a bug -> status: closed -> open versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 05:47:30 2017 From: report at bugs.python.org (Jan) Date: Wed, 15 Mar 2017 09:47:30 +0000 Subject: [issue29817] File IO read, write, read causes garbage data write. Message-ID: <1489571250.73.0.412338383823.issue29817@psf.upfronthosting.co.za> New submission from Jan: In Python 2.7.12 when reading, writing and subsequently reading again from a file, python seems to write garbage. For example when running this in python IDLE: import os testPath = r"myTestFile.txt" ## Make sure the file exists and its empty with open(testPath,"w") as tFile: tFile.write("") print "Our Test File: ", os.path.abspath(testPath ) with open(testPath, "r+") as tFile: ## First we read the file data = tFile.read() ## Now we write some data tFile.write('Some Data') ## Now we read the file again tFile.read() When now looking at the file the data is the following: Some Data @ sb d Z d d l m Z d d d ? ? YZ e d k r^ d d l m Z e d d d d e ?n d S( s9 Implement Idle Shell history mechanism with History ... As mentioned in the comments on stack overflow ( see link ) this might be a buffer overrun but I am not sure. Also I guess this could be used as a security vulnerability... http://stackoverflow.com/questions/40373457/python-r-read-write-read-writes-garbage-to-a-file?noredirect=1#comment72580538_40373457 ---------- components: IO, Interpreter Core, Windows messages: 289657 nosy: jan, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: File IO read, write, read causes garbage data write. type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 05:48:09 2017 From: report at bugs.python.org (Jan) Date: Wed, 15 Mar 2017 09:48:09 +0000 Subject: [issue29817] File IO r+ read, write, read causes garbage data write. In-Reply-To: <1489571250.73.0.412338383823.issue29817@psf.upfronthosting.co.za> Message-ID: <1489571289.22.0.281455580103.issue29817@psf.upfronthosting.co.za> Changes by Jan : ---------- title: File IO read, write, read causes garbage data write. -> File IO r+ read, write, read causes garbage data write. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 05:50:53 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 15 Mar 2017 09:50:53 +0000 Subject: [issue29812] test for token.py, and consistency tests for tokenize.py In-Reply-To: <1489532621.9.0.449448187774.issue29812@psf.upfronthosting.co.za> Message-ID: <1489571453.66.0.43049769895.issue29812@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 05:52:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 09:52:04 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1489571524.62.0.305240236761.issue29816@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This may be a part of this issue or a separate issue: bytes(-1) raises a ValueError, but bytes(-10**100) raises an OverflowError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 05:54:17 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 15 Mar 2017 09:54:17 +0000 Subject: [issue29725] sqlite3.Cursor doesn't properly document "arraysize" In-Reply-To: <1488732449.69.0.822466282685.issue29725@psf.upfronthosting.co.za> Message-ID: <1489571657.16.0.781149576843.issue29725@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +easy nosy: +berker.peksag stage: -> needs patch type: -> enhancement versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 05:55:41 2017 From: report at bugs.python.org (Marcos Thomaz) Date: Wed, 15 Mar 2017 09:55:41 +0000 Subject: [issue29815] Fail at divide a negative integer number for a positive integer number In-Reply-To: <1489564600.52.0.574999326638.issue29815@psf.upfronthosting.co.za> Message-ID: <1489571741.12.0.988864778033.issue29815@psf.upfronthosting.co.za> Marcos Thomaz added the comment: Note that mathematic expression is wrong. -7 divided by 2 is -3, not -4 ---------- resolution: -> rejected type: behavior -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 06:03:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Mar 2017 10:03:27 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1489572207.58.0.0701001006655.issue29816@psf.upfronthosting.co.za> STINNER Victor added the comment: > I think an OverflowError is appropriate here for denoting the platform and implementation limitation. It's common that integer overflow on memory allocation in C code raises a MemoryError, not an OverflowError. >>> "x" * (2**60) Traceback (most recent call last): File "", line 1, in MemoryError I suggest to raise a MemoryError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 06:11:17 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 15 Mar 2017 10:11:17 +0000 Subject: [issue18716] Deprecate the formatter module In-Reply-To: <1376334968.93.0.863346638514.issue18716@psf.upfronthosting.co.za> Message-ID: <1489572677.17.0.179207527869.issue18716@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Just bumped into this. Is the removal for this module waiting for the end of Python 2.7 support as PEP 4 states for modules in Py2 and Py3? The first message calls for a removal in 3.6 so, I'm either missing some additional conversations on this or this might of just have been forgotten. ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 06:17:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 10:17:07 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1489573027.61.0.273042968522.issue29816@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is not MemoryError. On 32-bit platform `1 << (sys.maxsize + 1)` raises an OverflowError, but `1 << sys.maxsize << 1` can be calculated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 06:38:12 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 15 Mar 2017 10:38:12 +0000 Subject: [issue15290] setAttribute() can fail In-Reply-To: <1341703964.25.0.272780923096.issue15290@psf.upfronthosting.co.za> Message-ID: <1489574292.4.0.324079573097.issue15290@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: not a bug -> duplicate stage: patch review -> resolved superseder: -> xml.dom.minidom.Element.cloneNode fails with AttributeError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 06:38:34 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 15 Mar 2017 10:38:34 +0000 Subject: [issue4851] xml.dom.minidom.Element.cloneNode fails with AttributeError In-Reply-To: <1231192810.66.0.263343969898.issue4851@psf.upfronthosting.co.za> Message-ID: <1489574314.17.0.162636671845.issue4851@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for your detective work, Craig. MvL is correct that those classes should be created via a Document object. I'm marking issue 15290 as a duplicate of this. Note that we can reopen this if you'd like to propose a documentation patch or PR to make the current docs clearer. Thanks! ---------- nosy: +berker.peksag resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 06:39:06 2017 From: report at bugs.python.org (Valentin LAB) Date: Wed, 15 Mar 2017 10:39:06 +0000 Subject: [issue19264] subprocess.Popen doesn't support unicode on Windows In-Reply-To: <1381815796.03.0.914223470735.issue19264@psf.upfronthosting.co.za> Message-ID: <1489574346.66.0.918390988707.issue19264@psf.upfronthosting.co.za> Valentin LAB added the comment: For eventual other people wanting a workaround, this is the code I used to leverage ``ctypes`` and redo what last python 3 code is doing. Any comment are welcome, this is my first go at ``ctypes``. I didn't extensively tested the code... so use at your own risk. The Gist might evolve if some people find issues: https://gist.github.com/vaab/2ad7051fc193167f15f85ef573e54eb9 Tests/Usecases are simple: use ``subprocess.Popen(..)`` to simply issue a ``git commit -am "?"``. And display the changelog. You can also call another python script, that would then need this other recipe (this time to get ``sys.argv`` correctly encoded on windows): http://code.activestate.com/recipes/572200/ Hope that helps. ---------- nosy: +Valentin LAB _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 06:39:48 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 15 Mar 2017 10:39:48 +0000 Subject: [issue29815] Fail at divide a negative integer number for a positive integer number In-Reply-To: <1489564600.52.0.574999326638.issue29815@psf.upfronthosting.co.za> Message-ID: <1489574388.86.0.574609366091.issue29815@psf.upfronthosting.co.za> Eryk Sun added the comment: > -7 divided by 2 is -3, not -4 Integer division in Python is floor division, and it's self-consistent with the implementation of the modulo operation such that the following identity is satisfied: (a % n) == a - n * (a // n). For example: (-7 % 2) == -7 - 2 * (-7 // 2) 1 == -7 - 2 * (-4) == -7 + 8 This behavior is consistent with mathematical analysis languages such as MATLAB, Mathematica, Mathcad, and R. It's also consistent with Ruby, Perl, and Tcl. However, it's different from C, C++, C#, Java, PHP and many other languages. See the following Wikipedia article: https://en.wikipedia.org/wiki/Modulo_operation Please do not change the status and resolution of this issue again. This is not a bug. ---------- nosy: +eryksun resolution: rejected -> not a bug status: open -> closed type: crash -> behavior versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 06:49:37 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 15 Mar 2017 10:49:37 +0000 Subject: [issue29655] Certain errors during IMPORT_STAR can leak a reference In-Reply-To: <1488058013.56.0.788869646449.issue29655@psf.upfronthosting.co.za> Message-ID: <1489574977.39.0.0981475093649.issue29655@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 07:03:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 11:03:06 +0000 Subject: [issue29196] Remove old-deprecated plistlib features In-Reply-To: <1483807940.54.0.471253591392.issue29196@psf.upfronthosting.co.za> Message-ID: <1489575786.87.0.331803347761.issue29196@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: These classes was deprecated in 2.4. In 2.6 the plistlib module was moved from plat-mac to the general stdlib library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 07:14:23 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 15 Mar 2017 11:14:23 +0000 Subject: [issue29726] test_xmlrpc raises DeprecationWarnings In-Reply-To: <1488734154.48.0.272131402942.issue29726@psf.upfronthosting.co.za> Message-ID: <1489576463.65.0.408512585613.issue29726@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks, Dillon! I went ahead and backported PR 481 to 3.5 and 3.6 branches. ---------- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 07:27:40 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 15 Mar 2017 11:27:40 +0000 Subject: [issue29818] Py_SetStandardStreamEncoding leads to a memory error in debug mode Message-ID: <1489577259.98.0.691600629889.issue29818@psf.upfronthosting.co.za> New submission from Nick Coghlan: For PEP 538, setting PYTHONIOENCODING turned out to have undesirable side effects on Python 2 instances in subprocesses, since Python 2 has no 'surrogateescape' error handler. So I switched to using the "Py_SetStandardStreamEncoding" API defined in http://bugs.python.org/issue16129 instead, but this turns out to have problematic interactions with the dynamic memory allocator management, so it fails with a fatal exception in debug mode. An example of the error can be seen here: https://travis-ci.org/python/cpython/jobs/211293576 The problem appears to be that between the allocation of the memory with `_PyMem_RawStrdup` in `Py_SetStandardStreamEncoding` and the release of that memory in `initstdio`, the active memory manager has changed (at least in a debug build), so the deallocation as part of the interpreter startup fails. That interpretation is based on this comment in Programs/python.c: ``` /* Force again malloc() allocator to release memory blocks allocated before Py_Main() */ (void)_PyMem_SetupAllocators("malloc"); ``` The allocations in Py_SetStandardStreamEncoding happen before the call to Py_Main/Py_Initialize, but the deallocation happens in Py_Initialize. The "fix" I applied to the PEP branch was to make the default allocator conditional in Programs/python.c as well: ``` #ifdef Py_DEBUG (void)_PyMem_SetupAllocators("malloc_debug"); # else (void)_PyMem_SetupAllocators("malloc"); # endif ``` While that works (at least in the absence of a PYTHONMALLOC setting) it seems fragile. It would be nicer if there was a way for Py_SetStandardStreamEncoding to indicate which allocator should be used for the deallocation. ---------- messages: 289668 nosy: haypo, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Py_SetStandardStreamEncoding leads to a memory error in debug mode type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 07:28:01 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 15 Mar 2017 11:28:01 +0000 Subject: [issue29818] Py_SetStandardStreamEncoding leads to a memory error in debug mode In-Reply-To: <1489577259.98.0.691600629889.issue29818@psf.upfronthosting.co.za> Message-ID: <1489577281.8.0.590856444132.issue29818@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 08:29:12 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 15 Mar 2017 12:29:12 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1489580952.2.0.863934999312.issue29804@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Since this newly added assertion [0] fails for aarch64 shouldn't this be considered a regression? And taking into account the timeframe, a release blocker for 3.6.1? ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 08:29:54 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 15 Mar 2017 12:29:54 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1489580994.6.0.530939535227.issue29804@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: [0] https://github.com/python/cpython/commit/a86339b83fbd0932e0529a3c91935e997a234582#diff-39e8978a35ab16f78e60027c61b810f7R413 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 08:52:09 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 15 Mar 2017 12:52:09 +0000 Subject: [issue28230] tarfile does not support pathlib In-Reply-To: <1476104684.24.0.949542495586.issue28230@psf.upfronthosting.co.za> Message-ID: <1489582329.46.0.0731773338812.issue28230@psf.upfronthosting.co.za> Berker Peksag added the comment: PR 512 has been merged and backported to 3.6 branch. I think this can be closed now. Thanks, Ethan and Serhiy! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 09:00:47 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 15 Mar 2017 13:00:47 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1489582847.92.0.848559199077.issue28261@psf.upfronthosting.co.za> Oren Milman added the comment: Raymond? any suggestions for how to make the code less ugly? or do you have in mind a different approach for solving this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 09:06:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 13:06:57 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1489583217.91.0.463534341568.issue28261@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suggest to withdraw changes in itertoolsmodule.c and avoid using "dunder" names like __setstate__ and __new__ in error messages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 09:32:35 2017 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 15 Mar 2017 13:32:35 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1489584755.23.0.175563077567.issue29804@psf.upfronthosting.co.za> Vinay Sajip added the comment: I don't think it's a regression. It's catching an error that was there, but wasn't tested for before. If it should be a release blocker - that should not be for any reversion of the change to the test, but for implementing the pass-by-value functionality correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 09:33:29 2017 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 15 Mar 2017 13:33:29 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1489584809.25.0.554371069676.issue29804@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 09:39:51 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 15 Mar 2017 13:39:51 +0000 Subject: [issue29817] File IO r+ read, write, read causes garbage data write. In-Reply-To: <1489571250.73.0.412338383823.issue29817@psf.upfronthosting.co.za> Message-ID: <1489585191.62.0.756098415284.issue29817@psf.upfronthosting.co.za> Eryk Sun added the comment: This is a bug in the C runtime's handling of "r+" mode with buffering. The CRT FILE stream's internal _cnt field, from the POV of the write() call, is the number of bytes that can be written to the internal buffer before it's full. The default buffer size is 4096 bytes. Thus after writing "Some Data", _cnt is at 4096 - 9 == 4087 bytes. On the other hand, from the POV of the subsequent read() call, this means there are 4087 bytes in the buffer available to be read. If you change your code to keep the result, you'll see that it is indeed 4087 bytes. After the read, _cnt is at 0 and the stream's internal _ptr and _base pointers indicate a full buffer, which gets flushed to disk when the file is closed. If you change your code to print os.path.getsize(testPath) after the file is closed, then you should see that the size is 4096 bytes -- exactly one buffer. If you open the file with buffering=512, then this changes to 503 bytes read and creates a 512 byte file. Can and should Python do anything to work around this problem in the CRT? Or should this issue simply be closed as 3rd party? I'm inclined to close it. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 10:32:25 2017 From: report at bugs.python.org (Paul Moore) Date: Wed, 15 Mar 2017 14:32:25 +0000 Subject: [issue29817] File IO r+ read, write, read causes garbage data write. In-Reply-To: <1489571250.73.0.412338383823.issue29817@psf.upfronthosting.co.za> Message-ID: <1489588345.08.0.725284839897.issue29817@psf.upfronthosting.co.za> Paul Moore added the comment: Also, this is a Python 2 only issue. The problem doesn't happen in Python 3.6 (at least in my quick experiment). I'm not 100% sure if this is because the internal implementation of IO changed in 3.x, or if it's just because we're now using a newer CRT which has fixed the issue. I agree that there's no point in Python trying to work around this behaviour. ---------- resolution: -> third party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 10:32:50 2017 From: report at bugs.python.org (Paul Moore) Date: Wed, 15 Mar 2017 14:32:50 +0000 Subject: [issue29817] File IO r+ read, write, read causes garbage data write. In-Reply-To: <1489571250.73.0.412338383823.issue29817@psf.upfronthosting.co.za> Message-ID: <1489588370.56.0.796041189579.issue29817@psf.upfronthosting.co.za> Changes by Paul Moore : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 11:11:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 15:11:06 +0000 Subject: [issue29819] Avoid raising OverflowError in truncate() if possible Message-ID: <1489590666.79.0.55108836997.issue29819@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: os.truncate(), os.ftruncate() and truncate() methods of file-like objects raise OverflowError when the argument is out of ranger of certain C type. It would be better to extend the behavior of small integers to large integers. ValueError is raised for negative integers and it should be raised for negative integers out of range. Values larger than the current size should be ignored in BytesIO.truncate() and StringIO.truncate(). BytesIO.truncate() and StringIO.truncate() should never raise OverflowError. Since the behavior of underlying OS functions is OS and FS depended, OverflowError can be raised for large integers in os.truncate(), os.ftruncate() and FileIO.truncate(). ---------- components: IO, Library (Lib) messages: 289677 nosy: benjamin.peterson, serhiy.storchaka, stutzbach priority: normal severity: normal stage: needs patch status: open title: Avoid raising OverflowError in truncate() if possible type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 11:12:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 15:12:27 +0000 Subject: [issue29819] Avoid raising OverflowError in truncate() if possible In-Reply-To: <1489590666.79.0.55108836997.issue29819@psf.upfronthosting.co.za> Message-ID: <1489590747.93.0.13312986462.issue29819@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +Oren Milman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 11:12:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Mar 2017 15:12:46 +0000 Subject: [issue29819] Avoid raising OverflowError in truncate() if possible In-Reply-To: <1489590666.79.0.55108836997.issue29819@psf.upfronthosting.co.za> Message-ID: <1489590766.63.0.985950008836.issue29819@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 11:29:20 2017 From: report at bugs.python.org (Marco Buttu) Date: Wed, 15 Mar 2017 15:29:20 +0000 Subject: [issue29820] Broken link to "GUI Programming with Python: QT Edition" book Message-ID: <1489591760.97.0.349566849467.issue29820@psf.upfronthosting.co.za> New submission from Marco Buttu: In [*] the link to "GUI Programming with Python: QT Edition by Boudewijn Rempt", does not work. I did not find an official web page for this book, but it is really outdated (2002), so maybe we can take only the reference to the Mark Summerfield's book, about PyQt4. Let me know, so in case I will open a PR. [*] https://docs.python.org/3/library/othergui.html ---------- assignee: docs at python components: Documentation messages: 289678 nosy: docs at python, marco.buttu priority: normal severity: normal status: open title: Broken link to "GUI Programming with Python: QT Edition" book versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 12:00:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 16:00:20 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489593620.85.0.600346022633.issue15988@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think that raising OverflowError exceptions should be avoided if this is possible. If some function requires non-negative integer and raises ValueError for small negative integers and OverflowError for large negative integers, it is desirable to make it raising ValueError for all negative integers. If some function truncates integer arguments to specified limit it shouldn't raise OverflowError for large positive integers, but truncate them to that limit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 12:29:50 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 15 Mar 2017 16:29:50 +0000 Subject: [issue29820] Broken link to "GUI Programming with Python: QT Edition" book In-Reply-To: <1489591760.97.0.349566849467.issue29820@psf.upfronthosting.co.za> Message-ID: <1489595390.92.0.606841304795.issue29820@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Maybe instead of referencing to the books, we add reference to the wiki https://wiki.python.org/moin/PyQt ---------- nosy: +Mariatta versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 12:35:14 2017 From: report at bugs.python.org (Oliver Etchebarne (drmad)) Date: Wed, 15 Mar 2017 16:35:14 +0000 Subject: [issue29821] importing module shutil executes file 'copy.py' Message-ID: <1489595714.25.0.323545213804.issue29821@psf.upfronthosting.co.za> New submission from Oliver Etchebarne (drmad): I didn't research this issue further. Create a file 'test.py', and write only 'import shutil'. Then create a file 'copy.py' in the same directory, and write something inside, like 'print ("OH NO")'. When you run test.py, 'copy.py' is executed, and prints the string. Tested with python 3.5 and 3.6. Works as expected (test.py doing nothing) in python 2.7 ---------- messages: 289681 nosy: Oliver Etchebarne (drmad) priority: normal severity: normal status: open title: importing module shutil executes file 'copy.py' type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 13:06:09 2017 From: report at bugs.python.org (Nate Soares) Date: Wed, 15 Mar 2017 17:06:09 +0000 Subject: [issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__ Message-ID: <1489597569.75.0.0334116955024.issue29822@psf.upfronthosting.co.za> New submission from Nate Soares: Here's an example test that fails: def test_isabstract_during_init_subclass(self): from abc import ABCMeta, abstractmethod isabstract_checks = [] class AbstractChecker(metaclass=ABCMeta): def __init_subclass__(cls): abstract_checks.append(inspect.isabstract(cls)) class AbstractClassExample(AbstractChecker): @abstractmethod def foo(self): pass class ClassExample(AbstractClassExample): def foo(self): pass self.assertEqual(isabstract_checks, [True, False]) To run the test, you'll need to be on a version of python where bpo-29581 is fixed (e.g., a cpython branch with https://github.com/python/cpython/pull/527 merged) in order for __init_subclass__ to work with ABCMeta at all in the first place. I have a simple patch to inspect.isabstract that fixes this, and will make a PR shortly. ---------- messages: 289682 nosy: So8res priority: normal severity: normal status: open title: inspect.isabstract does not work on abstract base classes during __init_subclass__ versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 13:25:38 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 15 Mar 2017 17:25:38 +0000 Subject: [issue25478] Consider adding a normalize() method to collections.Counter() In-Reply-To: <1445826280.05.0.307309053044.issue25478@psf.upfronthosting.co.za> Message-ID: <1489598738.56.0.0947296751662.issue25478@psf.upfronthosting.co.za> Steven D'Aprano added the comment: It seems to me that the basic Counter class should be left as-is, and if there are specialized methods used for statistics (such as normalize) it should go into a subclass in the statistics module. The statistics module already uses Counter internally to calculate the mode. It makes some sense to me for statistics to have a FrequencyTable (and CumulativeFrequencyTable?) class built on top of Counter. I don't think it makes sense to overload the collections.Counter type with these sorts of specialised methods. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 14:03:34 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 15 Mar 2017 18:03:34 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489601014.36.0.793648254664.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: now that you opened #29816 and #29819, should I remove from the PR changes in the following functions, and related tests? - _io_BytesIO_truncate_impl - _io_StringIO_truncate_impl - long_rshift - long_lshift ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 14:21:40 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 15 Mar 2017 18:21:40 +0000 Subject: [issue24119] Carry comments with the AST In-Reply-To: <1430666470.75.0.339272692521.issue24119@psf.upfronthosting.co.za> Message-ID: <1489602100.47.0.897426158656.issue24119@psf.upfronthosting.co.za> Brett Cannon added the comment: The type annotation is already in the AST so there's nothing to carry over from typed_ast (we only care about the latest Python version while typed_ast tries to be version-agnostic). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 14:22:46 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 15 Mar 2017 18:22:46 +0000 Subject: [issue18716] Deprecate the formatter module In-Reply-To: <1376334968.93.0.863346638514.issue18716@psf.upfronthosting.co.za> Message-ID: <1489602166.64.0.104844032397.issue18716@psf.upfronthosting.co.za> Brett Cannon added the comment: Yes, the code won't be deleted until we're in a post-2.7 world. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 14:50:05 2017 From: report at bugs.python.org (Nate Soares) Date: Wed, 15 Mar 2017 18:50:05 +0000 Subject: [issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__ In-Reply-To: <1489597569.75.0.0334116955024.issue29822@psf.upfronthosting.co.za> Message-ID: <1489603805.36.0.0101073699116.issue29822@psf.upfronthosting.co.za> Changes by Nate Soares : ---------- pull_requests: +556 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 15:02:01 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 15 Mar 2017 19:02:01 +0000 Subject: [issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different In-Reply-To: <1489439024.83.0.354569832809.issue29805@psf.upfronthosting.co.za> Message-ID: <1489604521.52.0.60899523533.issue29805@psf.upfronthosting.co.za> Brett Cannon added the comment: I also support the idea of getting something like shutil.move() into pathlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 15:05:42 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 15 Mar 2017 19:05:42 +0000 Subject: [issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different In-Reply-To: <1489439024.83.0.354569832809.issue29805@psf.upfronthosting.co.za> Message-ID: <1489604742.8.0.388845592303.issue29805@psf.upfronthosting.co.za> Brett Cannon added the comment: I should also mention that rename() (https://docs.python.org/3/library/pathlib.html#pathlib.Path.rename) and replace() (https://docs.python.org/3/library/pathlib.html#pathlib.Path.replace) already do exist, so it might be best to add a keyword-only flag to one of those for this use-case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 15:07:39 2017 From: report at bugs.python.org (Ryan Gonzalez) Date: Wed, 15 Mar 2017 19:07:39 +0000 Subject: [issue29104] Left bracket remains in format string result when '\' preceeds it In-Reply-To: <1483012585.51.0.342717701316.issue29104@psf.upfronthosting.co.za> Message-ID: <1489604859.67.0.922774572162.issue29104@psf.upfronthosting.co.za> Ryan Gonzalez added the comment: Serhiy: if you want, you can give me your email and I'll submit a PR for you. If you want to do it yourself, just: Download hub: https://hub.github.com/ git clone python/cpython cpython-git cd cpython-git git fork curl https://raw.githubusercontent.com/mozilla/moz-git-tools/master/hg-patch-to-git-patch > hg-patch-to-git-patch curl https://bugs.python.org/file46127/fstring_backslash_2.patch | python2 hg-patch-to-git-patch > fstring.patch git checkout -b fstring-fix git apply fstring.patch git commit -am 'bpo-29104: Commit message here' git push -u MY_GITHUB_USERNAME fstring-fix git pull-request ---------- nosy: +refi64 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 15:09:29 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 15 Mar 2017 19:09:29 +0000 Subject: [issue29104] Left bracket remains in format string result when '\' preceeds it In-Reply-To: <1483012585.51.0.342717701316.issue29104@psf.upfronthosting.co.za> Message-ID: <1489604969.42.0.0100923836826.issue29104@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: A PR has been submitted, Ryan. See https://github.com/python/cpython/pull/490 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 16:25:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 20:25:42 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1489609542.83.0.107026668186.issue29816@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +557 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 16:27:21 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 15 Mar 2017 20:27:21 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489609641.47.0.519228925309.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: also, IMHO, we should open an issue named 'raise ValueError instead of OverflowError when a negative int is invalid', and leave for that new issue some the changes (which you commented about in the PR). I didn't want to open it without your approval. here is what I thought should be the contents of the issue (feel free to edit my draft as you wish and open the issue yourself, if you think we should open it): In various C functions, a negative int argument is invalid. in most of these functions, ValueError is raised for a negative int, or at least for a small negative int (i.e. a negative int that fits in some signed integer C type). as Serhiy mentioned in http://bugs.python.org/issue15988#msg289679 and in code review comments in https://github.com/python/cpython/pull/668, it might be that a ValueError should always be raised in such functions, upon receiving a negative int (even upon receiving a big negative int, such as (-1 << 1000)). the following functions were identified as relevant only while working on #15988, so there are probably (a lot?) more relevant functions. functions where OverflowError is raised only for big negative ints: - Objects/bytesobject.c - bytes_new - Objects/bytearrayobject.c - bytearray_init - functions that would be fixed as part of #29819? * Modules/_io/stringio.c - _io_StringIO_truncate_impl * Modules/_io/bytesio.c - _io_BytesIO_truncate_impl functions where OverflowError is raised for any negative int (so a change would probably break some users code): - Objects/longobject.c: * PyLong_AsUnsignedLong * PyLong_AsSize_t - Modules/_ctypes/_ctypes.c - PyCArrayType_new Note: while patching these functions, one should also make sure that the patched functions produce consistent error messages, as explained in #15988 (in which it was decided to leave these functions (which currently produce inconsistent error messages) to this issue.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 16:30:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 20:30:52 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1489609852.82.0.992225989323.issue29816@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Unfortunately it is hard to totally avoid OverflowError in right shift. Righ shift of huge positive value can get non-zero result even if shift count is larger than PY_SSIZE_T_MAX. PR 680 just decreases the opportunity of getting a OverflowError. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 16:39:32 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 20:39:32 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489610372.3.0.749087192219.issue15988@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I agree. It would be better to remove from the PR changes that can be covered by issue29816, issue29819 and other changes that changes visible behavior and open one or several new issues for them. Maybe one meta-issue and few concrete issues? Such methods as read() also shouldn't raise OverflowError for negative argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 16:42:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Mar 2017 20:42:09 +0000 Subject: [issue29104] Left bracket remains in format string result when '\' preceeds it In-Reply-To: <1483012585.51.0.342717701316.issue29104@psf.upfronthosting.co.za> Message-ID: <1489610529.84.0.13191750856.issue29104@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Ryan. I already created a PR, but I think your recipe can be helpful for me in future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 16:45:07 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 15 Mar 2017 20:45:07 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489610707.22.0.523918356417.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: I am sorry, but my 2nd term starts on Monday, so I am short on time, and feel like I would be lucky to even finish working on PR 668. because of that, and because you obviously have a much better understanding of this issue than me, I would be happy if you could open the new issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 16:50:37 2017 From: report at bugs.python.org (Nathan Jensen) Date: Wed, 15 Mar 2017 20:50:37 +0000 Subject: [issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize In-Reply-To: <1467035358.55.0.678180807375.issue27400@psf.upfronthosting.co.za> Message-ID: <1489611037.14.0.186097186638.issue27400@psf.upfronthosting.co.za> Changes by Nathan Jensen : ---------- nosy: +Nathan Jensen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 16:50:48 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 15 Mar 2017 20:50:48 +0000 Subject: [issue29821] importing module shutil executes file 'copy.py' In-Reply-To: <1489595714.25.0.323545213804.issue29821@psf.upfronthosting.co.za> Message-ID: <1489611048.95.0.991283238666.issue29821@psf.upfronthosting.co.za> Ammar Askar added the comment: I was only able to recreate this under 3.4 and 3.3, and both of them are under "security" status on https://docs.python.org/devguide/#status-of-python-branches Should this be marked as won't fix? ---------- nosy: +ammar2 versions: +Python 3.3, Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 17:00:49 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 15 Mar 2017 21:00:49 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1489611649.75.0.738847690278.issue29816@psf.upfronthosting.co.za> Oren Milman added the comment: i played a little with a patch earlier today, but stopped because I am short on time. anyway, just in case my code is not totally rubbish, I attach my patch draft, which should avoid OverflowError also for big positive ints. (of course, I don't suggest to use my code instead of PR 680. I just put it here in case it might be useful for someone.) (on my Windows 10, it passed some manual tests by me, and the test module (except for test_venv, which fails also without the patch)) ---------- keywords: +patch Added file: http://bugs.python.org/file46727/patchDraft1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 17:06:17 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 15 Mar 2017 21:06:17 +0000 Subject: [issue29821] importing module shutil executes file 'copy.py' In-Reply-To: <1489595714.25.0.323545213804.issue29821@psf.upfronthosting.co.za> Message-ID: <1489611977.57.0.639697835706.issue29821@psf.upfronthosting.co.za> Ammar Askar added the comment: As per discussion with haypo on irc, this is not a bug since essentially you've made a file which shadows the following stdlib module https://docs.python.org/3/library/copy.html When shutil goes to import the copy module, your copy module is given higher priority in the import machinery which is why your code gets executed. You can read up more about this here: http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#the-name-shadowing-trap ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 17:08:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Mar 2017 21:08:42 +0000 Subject: [issue29821] importing module shutil executes file 'copy.py' In-Reply-To: <1489595714.25.0.323545213804.issue29821@psf.upfronthosting.co.za> Message-ID: <1489612122.33.0.149541621689.issue29821@psf.upfronthosting.co.za> STINNER Victor added the comment: Run "python3 -I script.py" to not insert '' (current directory) at the first position of sys.path. https://docs.python.org/dev/using/cmdline.html#cmdoption-I ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 19:41:18 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 15 Mar 2017 23:41:18 +0000 Subject: [issue29821] importing module shutil executes file 'copy.py' In-Reply-To: <1489595714.25.0.323545213804.issue29821@psf.upfronthosting.co.za> Message-ID: <1489621278.57.0.345789297955.issue29821@psf.upfronthosting.co.za> Eryk Sun added the comment: > Run "python3 -I script.py" to not insert '' (current directory) > at the first position of sys.path. That should be "script directory", not "current directory". We only add the current directory to sys.path in interactive mode, and for -c and -m. Adding the current directory to sys.path when running a script would be silly and cause endless grief. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 20:38:26 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 16 Mar 2017 00:38:26 +0000 Subject: [issue29639] test suite intentionally avoids referring to localhost, destroying abstraction away from IPv6 vs IPv4 In-Reply-To: <1487900097.24.0.236303974594.issue29639@psf.upfronthosting.co.za> Message-ID: <1489624706.65.0.571479867749.issue29639@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 22:19:29 2017 From: report at bugs.python.org (Ammar Askar) Date: Thu, 16 Mar 2017 02:19:29 +0000 Subject: [issue29812] test for token.py, and consistency tests for tokenize.py In-Reply-To: <1489532621.9.0.449448187774.issue29812@psf.upfronthosting.co.za> Message-ID: <1489630769.37.0.548696421947.issue29812@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- pull_requests: +558 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 22:19:46 2017 From: report at bugs.python.org (Ammar Askar) Date: Thu, 16 Mar 2017 02:19:46 +0000 Subject: [issue29812] test for token.py, and consistency tests for tokenize.py In-Reply-To: <1489532621.9.0.449448187774.issue29812@psf.upfronthosting.co.za> Message-ID: <1489630786.46.0.30072834307.issue29812@psf.upfronthosting.co.za> Ammar Askar added the comment: This is my first real substantial testing change so I'd appreciate all feedback. The way I did the cross-check doesn't actually rely on any of the information from the test_keyword style regeneration test. I think this approach is a lot simpler, and will prevent mistakes like the one seen in http://bugs.python.org/issue24622 ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 22:53:00 2017 From: report at bugs.python.org (Michael Seifert) Date: Thu, 16 Mar 2017 02:53:00 +0000 Subject: [issue29813] PyTuple_GetSlice does not always return a new tuple In-Reply-To: <1489545650.77.0.905284505898.issue29813@psf.upfronthosting.co.za> Message-ID: <1489632780.64.0.304653728779.issue29813@psf.upfronthosting.co.za> Michael Seifert added the comment: I rather thought about something along the lines of: "Take a slice of the tuple pointed to by *p* from *low* to *high* and return it as a tuple. Whether the returned tuple is new or not is an implementation detail (and may depend on the value of the arguments)." Because from the point of the C-API tuples aren't immutable, at least not if they are new (refcount 1). Thank you both for your feedback. I'll leave it closed as "not a bug", I got the point about over-explaining. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 23:17:31 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 16 Mar 2017 03:17:31 +0000 Subject: [issue29812] test for token.py, and consistency tests for tokenize.py In-Reply-To: <1489532621.9.0.449448187774.issue29812@psf.upfronthosting.co.za> Message-ID: <1489634251.65.0.307787999697.issue29812@psf.upfronthosting.co.za> R. David Murray added the comment: The cross check test itself doesn't depend on a regeneration, but it does depend on the information in token.h. Meanwhile the validity of *that* is checked by regeneration in your test_token tests. This is exactly what I had in mind :). So, I haven't done a full review, but the quick glance I took looked good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 23:53:24 2017 From: report at bugs.python.org (Aleksey Bilogur) Date: Thu, 16 Mar 2017 03:53:24 +0000 Subject: [issue29823] ython guesses XSL mimetype when passed an XML file Message-ID: <1489636404.8.0.316801040698.issue29823@psf.upfronthosting.co.za> New submission from Aleksey Bilogur: Copied over from an unanswered StackOverflow thread (http://stackoverflow.com/questions/42542433/why-does-python-mimetype-guess-xsl-when-passed-an-xml-file): When passed a file with a mimetype application/xml, the Python std lib mimetypes.guess_extension method guesses an .xsl extension. This is actually hard-coded in. This seems wrong to me. But what do I know? ---------- components: Library (Lib) messages: 289705 nosy: Aleksey Bilogur priority: normal severity: normal status: open title: ython guesses XSL mimetype when passed an XML file versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 15 23:53:49 2017 From: report at bugs.python.org (Aleksey Bilogur) Date: Thu, 16 Mar 2017 03:53:49 +0000 Subject: [issue29823] mimetypes guesses XSL mimetype when passed an XML file In-Reply-To: <1489636404.8.0.316801040698.issue29823@psf.upfronthosting.co.za> Message-ID: <1489636429.29.0.0121258292734.issue29823@psf.upfronthosting.co.za> Changes by Aleksey Bilogur : ---------- title: ython guesses XSL mimetype when passed an XML file -> mimetypes guesses XSL mimetype when passed an XML file _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 00:25:15 2017 From: report at bugs.python.org (Martin Panter) Date: Thu, 16 Mar 2017 04:25:15 +0000 Subject: [issue29823] mimetypes guesses XSL mimetype when passed an XML file In-Reply-To: <1489636404.8.0.316801040698.issue29823@psf.upfronthosting.co.za> Message-ID: <1489638315.13.0.659786528856.issue29823@psf.upfronthosting.co.za> Martin Panter added the comment: Perhaps a duplicate of Issue 1043134? ---------- nosy: +martin.panter superseder: -> Add preferred extensions for MIME types versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 01:48:55 2017 From: report at bugs.python.org (Chi Hsuan Yen) Date: Thu, 16 Mar 2017 05:48:55 +0000 Subject: [issue28491] Remove bundled libffi for OSX In-Reply-To: <1476988827.6.0.878520006506.issue28491@psf.upfronthosting.co.za> Message-ID: <1489643335.57.0.426742912695.issue28491@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Update: my pull request at https://github.com/libffi/libffi/pull/288 is merged. Future libffi releases don't need pkg-config anymore. However, I guess the system copy won't be updated in near future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 04:03:29 2017 From: report at bugs.python.org (Suphannee) Date: Thu, 16 Mar 2017 08:03:29 +0000 Subject: [issue29824] Hostname validation in SSL match_hostname() Message-ID: <1489651409.35.0.325138165365.issue29824@psf.upfronthosting.co.za> New submission from Suphannee: 1. Allowing attempting to match invalid hostname According to domain name specification in RFC 1035, only alphanumeric, dot and hyphen are valid characters in domain name. We observe that the function match_hostname() in Lib/ssl.py allows other special characters (e.g., '=', '&') in hostname when attempting to match with certificate commonName (CN)/subjectAltName DNS. An example would be matching hostname "example.a=.com" with certificate CN/DNS "example.a=.com" or CN/DNS "*.a=.example.com". Ensuring that CN/DNS with invalid characters are rejected, will make the library more robust against attacks that utilize such characters. 2. Matching wildcard in public suffix As noted in section 7.2 of RFC 6125, some wildcard location specifications are not clear. We found that the function allows wildcard over public suffix in certificate as well as allows attempting to match in hostname verification, e.g., matches hostname "google.com" and "example.com" with certificate CN/DNS "*.com". This is not an RFC violation, but we might benefit from implementing the check, for example "*.one_label" is restricted. A better option will be having a list of all TLD's and check against it. Thanks. ---------- assignee: christian.heimes components: SSL messages: 289708 nosy: christian.heimes, ssivakorn priority: normal severity: normal status: open title: Hostname validation in SSL match_hostname() type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 04:23:23 2017 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Mar 2017 08:23:23 +0000 Subject: [issue29824] Hostname validation in SSL match_hostname() In-Reply-To: <1489651409.35.0.325138165365.issue29824@psf.upfronthosting.co.za> Message-ID: <1489652603.51.0.300019540072.issue29824@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't see 1) as a problem. You won't be able to resolve these names in DNS, would you? Regarding 2). Yes, it would be beneficial to have more elaborate checks to protect against wildcard attacks like *.com. However Python is not a browser. It's really hard to do it right and even harder to keep the rule set up to date. Some TLDs like .uk have sublevel namespaces, e.g. co.uk. *.co.uk is also invalid. The problem is going to shift anyway. For Python 3.7 I'm going to deprecate support for OpenSSL < 1.0.2 and use OpenSSL's hostname verification code instead of ssl.match_hostname(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 04:23:41 2017 From: report at bugs.python.org (Christian Heimes) Date: Thu, 16 Mar 2017 08:23:41 +0000 Subject: [issue29824] Hostname validation in SSL match_hostname() In-Reply-To: <1489651409.35.0.325138165365.issue29824@psf.upfronthosting.co.za> Message-ID: <1489652621.05.0.626019090303.issue29824@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +alex, dstufft, janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 04:47:57 2017 From: report at bugs.python.org (LCatro) Date: Thu, 16 Mar 2017 08:47:57 +0000 Subject: [issue29825] PyFunction_New() not validate code object Message-ID: <1489654077.04.0.544465484801.issue29825@psf.upfronthosting.co.za> New submission from LCatro: PyFunction_New() not validate code object ,so we can make a string object to fake code object This is Python ByteCode : LOAD_CONST 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\x41\x41\x41\x41' MAKE_FUNCTION 0 in source code ,we can see that string object trace to variant v TARGET(MAKE_FUNCTION) { v = POP(); /* code object */ <= now it is a string object x = PyFunction_New(v, f->f_globals); <= using in there and than ,we making a string object will taking into PyFunction_New() PyFunction_New(PyObject *code, PyObject *globals) { PyFunctionObject *op = PyObject_GC_New(PyFunctionObject, &PyFunction_Type); static PyObject *__name__ = 0; if (op != NULL) { <= there just check new alloc object point but not checking the argument code's python type (actually it is TYPE_CODE) .. PyObject *doc; PyObject *consts; PyObject *module; op->func_weakreflist = NULL; Py_INCREF(code); op->func_code = code; Py_INCREF(globals); op->func_globals = globals; op->func_name = ((PyCodeObject *)code)->co_name; Py_INCREF(op->func_name); <= it will make an arbitrary address inc by one .. Opcode MAKE_CLOSURE similar too .. TARGET(MAKE_CLOSURE) { v = POP(); /* code object */ x = PyFunction_New(v, f->f_globals); poc and crash detail in update file ---------- components: Interpreter Core files: inc_by_one.rar messages: 289710 nosy: imso666 priority: normal severity: normal status: open title: PyFunction_New() not validate code object type: security versions: Python 2.7 Added file: http://bugs.python.org/file46728/inc_by_one.rar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 05:35:22 2017 From: report at bugs.python.org (Marco Viscito) Date: Thu, 16 Mar 2017 09:35:22 +0000 Subject: [issue29826] " don't work on Mac Message-ID: <1489656922.89.0.360252821771.issue29826@psf.upfronthosting.co.za> New submission from Marco Viscito: When typing the ' key or the " key on the IDLE Python application for macOS, the application. I think it might have something to do with that beta version of Tcl/Tk (8.5.9) as Python says it is 'unstable'. ---------- files: Screen Shot 2017-03-16 at 09.34.26.png messages: 289711 nosy: Marco Viscito priority: normal severity: normal status: open title: " don't work on Mac type: crash versions: Python 3.6 Added file: http://bugs.python.org/file46729/Screen Shot 2017-03-16 at 09.34.26.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 09:09:47 2017 From: report at bugs.python.org (Michael Haubenwallner) Date: Thu, 16 Mar 2017 13:09:47 +0000 Subject: [issue19521] Parallel build race condition on AIX since python-2.7 In-Reply-To: <1383840294.95.0.0890053719997.issue19521@psf.upfronthosting.co.za> Message-ID: <1489669787.03.0.23079875581.issue19521@psf.upfronthosting.co.za> Changes by Michael Haubenwallner : ---------- pull_requests: +560 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 09:15:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Mar 2017 13:15:22 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1489670122.97.0.367755579914.issue29636@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not particularly interested in this feature. Adding two or three options looks excessive. Python is a programming language and it is easy to write a simple script for your needs. Much easier than implement the general command line interface that supports all options of programming API. ---------- nosy: +bob.ippolito, ezio.melotti, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 09:35:01 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 16 Mar 2017 13:35:01 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1489671301.91.0.238210705641.issue29636@psf.upfronthosting.co.za> R. David Murray added the comment: Easier, but if we do it in the tool, then it is done for everyone and they don't *each* have to spend that "less time" writing their own script. And --indent and --compact are both useful for debugging/hand testing, since it allows you to generate the input your code is expecting, and input your code might not be expecting. On the other hand, I'm not contributing much these days, so I'm not in a good position to be suggesting additions to the support burden :(. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 10:00:32 2017 From: report at bugs.python.org (Daniel Himmelstein) Date: Thu, 16 Mar 2017 14:00:32 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1489672832.64.0.86041502355.issue29636@psf.upfronthosting.co.za> Daniel Himmelstein added the comment: @serhiy.storchaka I totally understand the desire to keep json.tool simple. However, given the description of json.tool in the documentation (below), I think an indentation option is within scope: > The json.tool module provides a simple command line interface to validate and pretty-print JSON objects. Indentation/newlines are a fundamental aspect of "pretty-printing". Right now I rarely use json.tool, since indent=4 is too extreme from a visual and file size perspective. Instead I prefer `indent=2` (or even `indent=1`) and I now have to: 1. create a python script to set my desired input 2. make sure every environment has access to this python script (the real annoyance) Currently, json.tool has a --sort-keys argument, which I think is great. --sort-keys is also an essential feature from my perspective (bpo-21650). So in short, I think json.tool is close to being a really useful utility but falls a bit short without an indentation option. Given that json.tool exists, I think it makes sense to take steps to make sure it's actually relevant as a json reformatter. Given this motivation, I'm not opposed to adding --compact, if we're confident it will be forward compatible with the json.dump API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 10:07:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Mar 2017 14:07:04 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1489673224.05.0.783898786941.issue29636@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It's not just the support burden. It is also a burden of learning and remembering new API. The support burden itself is not tiny too. It includes careful designing, writing the implementation and test (the more options you have the more combinations you need to test), increasing running time of tests (CLI tests are slow!), and you need to return to that after adding every new feature for testing compatibility with them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 10:10:29 2017 From: report at bugs.python.org (Daniel Birnstiel) Date: Thu, 16 Mar 2017 14:10:29 +0000 Subject: [issue6721] Locks in the standard library should be sanitized on fork In-Reply-To: <1250550378.97.0.072881968798.issue6721@psf.upfronthosting.co.za> Message-ID: <1489673429.7.0.526642276916.issue6721@psf.upfronthosting.co.za> Daniel Birnstiel added the comment: Currently using Python 3.6.0 (default, Mar 4 2017, 12:32:34) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > So, somehow the print() statement is blocking, which I have /no/ idea how to go about debugging. I assume there's a lock /in/ the print statement function call, and I'm probably going to look into wrapping both the print() call and the multiprocessing.Process() call execution in a single, shared multiprocessing lock, but that > seems like a very patchwork solution to something that should just work. I am currently having a similar issue where I get a deadlock to a stdout.flush call (which I assume is called when printing). Flush internally appears to acquire a lock which is getting stuck in the subprocess. This is the backtrace I was able to obtain through lldb, showing the waiting for a lock after the flush-call: * thread #1: tid = 0x77c27d, 0x00007fffe33c9c86 libsystem_kernel.dylib`__psynch_cvwait + 10, stop reason = signal SIGSTOP frame #0: 0x00007fffe33c9c86 libsystem_kernel.dylib`__psynch_cvwait + 10 frame #1: 0x00007fffe34b396a libsystem_pthread.dylib`_pthread_cond_wait + 712 frame #2: 0x00000001021ecad8 Python`PyThread_acquire_lock_timed + 256 frame #3: 0x000000010221cc2f Python`_enter_buffered_busy + 169 frame #4: 0x000000010221ed36 Python`_io_BufferedWriter_write + 203 frame #5: 0x000000010215448b Python`_PyCFunction_FastCallDict + 529 frame #6: 0x000000010211b3f0 Python`_PyObject_FastCallDict + 237 frame #7: 0x000000010211be9e Python`PyObject_CallMethodObjArgs + 240 frame #8: 0x000000010222171a Python`_textiowrapper_writeflush + 150 * frame #9: 0x00000001022224a8 Python`_io_TextIOWrapper_flush + 239 Is there any update on this issue or any solution to avoid deadlocking without wrapping every fork/print/logging call with a multiprocessing (or billiard in my case) lock? ---------- nosy: +Birne94 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 10:27:55 2017 From: report at bugs.python.org (Marko Mavrinac) Date: Thu, 16 Mar 2017 14:27:55 +0000 Subject: [issue29827] os.path.exists() returns False for certain file name Message-ID: <1489674475.28.0.107711560644.issue29827@psf.upfronthosting.co.za> New submission from Marko Mavrinac: I have two files in two different folders, both on desktop. If I try using os.path.exists() on both of them, it returns True for one file and False for the other file. After renaming file that I got False from, I get returned True and when I rename it back, it returns False again. File name causing the problem is "testni.wav", I assume it's anything starting with "test", but I'm sure you guys will know better. Thank you Detailed description with screenshots can be seen here: http://stackoverflow.com/questions/42834408/os-path-exists-returning-false-for-one-and-true-for-another-file-both-files-e ---------- components: Windows messages: 289717 nosy: Marko Mavrinac, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: os.path.exists() returns False for certain file name type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 10:57:03 2017 From: report at bugs.python.org (Marko Mavrinac) Date: Thu, 16 Mar 2017 14:57:03 +0000 Subject: [issue29827] os.path.exists() returns False for certain file name In-Reply-To: <1489674475.28.0.107711560644.issue29827@psf.upfronthosting.co.za> Message-ID: <1489676223.05.0.727703465275.issue29827@psf.upfronthosting.co.za> Marko Mavrinac added the comment: I am sorry, I didn't realize \t affected how the path was recognized. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 11:04:59 2017 From: report at bugs.python.org (Eryk Sun) Date: Thu, 16 Mar 2017 15:04:59 +0000 Subject: [issue29827] os.path.exists() returns False for certain file name In-Reply-To: <1489674475.28.0.107711560644.issue29827@psf.upfronthosting.co.za> Message-ID: <1489676699.23.0.290247419123.issue29827@psf.upfronthosting.co.za> Eryk Sun added the comment: In a string literal, '\t' represents a tab character (ordinal 9). Windows filenames cannot contain control characters [1], i.e. ordinals 1-31. For path literals I recommend using forward slashes and normalizing via os.path.normpath, e.g. filepath = os.path.normpath('C:/Users/mavri/Desktop/proba/testni.wav'). FYI, the way exists() is written handles any OSError as False: def exists(path): try: os.stat(path) except OSError: return False return True In your case, stat() fails with ERROR_INVALID_NAME (123): >>> os.stat('\testni.wav') Traceback (most recent call last): File "", line 1, in OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '\testni.wav' [1]: https://msdn.microsoft.com/en-us/library/aa365247#naming_conventions ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 12:21:50 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 16 Mar 2017 16:21:50 +0000 Subject: [issue29826] " don't work on Mac under IDLE In-Reply-To: <1489656922.89.0.360252821771.issue29826@psf.upfronthosting.co.za> Message-ID: <1489681310.11.0.46351034364.issue29826@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy title: " don't work on Mac -> " don't work on Mac under IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 12:39:13 2017 From: report at bugs.python.org (Marco Buttu) Date: Thu, 16 Mar 2017 16:39:13 +0000 Subject: [issue29820] Broken link to "GUI Programming with Python: QT Edition" book In-Reply-To: <1489591760.97.0.349566849467.issue29820@psf.upfronthosting.co.za> Message-ID: <1489682353.71.0.975327800363.issue29820@psf.upfronthosting.co.za> Marco Buttu added the comment: Hi Mariatta, all the other seealso entries (PyGObject, PySide, ...) have references to some specific books and tutorials. No one has a reference to the wiki, maybe because there is already a reference to it (at the end of the page). IMHO we can keep the PyQt description consistent with the other GUIs descriptions, and we can fix the broken URL just removing the reference to the outdated book. What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 12:45:39 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 16 Mar 2017 16:45:39 +0000 Subject: [issue29828] Allow registering after-fork initializers in multiprocessing Message-ID: <1489682739.34.0.223711216906.issue29828@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Currently, multiprocessing has hard-coded logic to re-seed the Python random generator (in the random module) whenever a process is forked. This is present in two places: `Popen._launch` in `popen_fork.py` and `serve_one` in `forkserver.py` (for the "fork" and "forkserver" spawn methods, respectively). However, other libraries would like to benefit from this mechanism. For example, Numpy has its own random number generator that would also benefit from re-seeding after fork(). Currently, this is solvable using multiprocessing.Pool which has an `initializer` argument. However, concurrent.futures' ProcessPool does not offer such facility; nor do other ways of launching child processes, such as (simply) instantiating a new Process object. Therefore, I'd like to propose adding a new top-level function in multiprocessing (and also a new Context method) to register a new initializer function for use after fork(). That way, each library can add its own initializers if desired, freeing users from the burden of doing so in their applications. ---------- components: Library (Lib) messages: 289721 nosy: davin, pitrou, sbt priority: normal severity: normal stage: needs patch status: open title: Allow registering after-fork initializers in multiprocessing type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 12:46:23 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 16 Mar 2017 16:46:23 +0000 Subject: [issue29828] Allow registering after-fork initializers in multiprocessing In-Reply-To: <1489682739.34.0.223711216906.issue29828@psf.upfronthosting.co.za> Message-ID: <1489682783.72.0.3408354146.issue29828@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 12:58:21 2017 From: report at bugs.python.org (Steve Barnes) Date: Thu, 16 Mar 2017 16:58:21 +0000 Subject: [issue29829] Documentation lacks clear warning of subprocess issue with pythonw Message-ID: <1489683501.47.0.952186876903.issue29829@psf.upfronthosting.co.za> New submission from Steve Barnes: When running under pythonw, or pyinstaller with the -w flag, modules that use subprocess calls such as popen, run, etc. will crash if the default `stdout=None, stderr=None` behaviour is used rather than PIPE. This is an obscure problem which is very hard to debug yet there is no warning in the documentation on this. I would like to suggest adding a :warning:`stdout=None, stderr=None` must not be used in any of the calls in this module when running under pythonw due to the lack of sys.stdout & sys.stderr in that case. Please use `stdout=PIPE, stderr=PIPE` instead. A patch against the default branch would be: diff -r 4243df51fe43 Doc/library/subprocess.rst --- a/Doc/library/subprocess.rst Fri Feb 10 14:19:36 2017 +0100 +++ b/Doc/library/subprocess.rst Thu Mar 16 16:56:24 2017 +0000 @@ -33,6 +33,13 @@ function for all use cases it can handle. For more advanced use cases, the underlying :class:`Popen` interface can be used directly. +.. warning:: Do not use default parameters on Windows with pythonw. + + As pythonw deletes `sys.stdout` & `sys.stderr` the use of the default + parameters, `stdout=None, stderr=None,`, which defaults to being + `stdout=sys.stdout, stderr=sys.stderr,` may cause unexpected crashes + it is recommended to use `stdout=PIPE, stderr=PIPE,` instead. + The :func:`run` function was added in Python 3.5; if you need to retain compatibility with older versions, see the :ref:`call-function-trio` section. ---------- assignee: docs at python components: Documentation messages: 289722 nosy: Steve Barnes, docs at python priority: normal severity: normal status: open title: Documentation lacks clear warning of subprocess issue with pythonw type: behavior versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 13:13:56 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 16 Mar 2017 17:13:56 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1489684436.69.0.584343280165.issue29640@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: In order to reproduce: Apply the python.patch from bz1268226_reproducer2.tar.gz Compile python Run the reproduce4.py from bz1268226_reproducer2.tar.gz As indicated by the reproducer, the status returned by os.wait() for the child is 139. I will refine a bit the patch and work on a PR. ---------- Added file: http://bugs.python.org/file46730/python.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 13:36:25 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 16 Mar 2017 17:36:25 +0000 Subject: [issue29820] Broken link to "GUI Programming with Python: QT Edition" book In-Reply-To: <1489591760.97.0.349566849467.issue29820@psf.upfronthosting.co.za> Message-ID: <1489685785.51.0.294680334262.issue29820@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks, Marco. That sounds good. Let's just remove the reference to the books from both PyQt and wxPython. ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 14:21:20 2017 From: report at bugs.python.org (Bob Ippolito) Date: Thu, 16 Mar 2017 18:21:20 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1489688480.13.0.82291460542.issue29636@psf.upfronthosting.co.za> Bob Ippolito added the comment: Probably the best thing we could do here is to mirror the options available in similar tools, such as jq: https://stedolan.github.io/jq/manual/#Invokingjq The relevant options here would be: --indent --tab --compact-output --sort-keys The default indent in jq is 2, which I tend to prefer these days, but maybe 4 is still appropriate given PEP 8: $ echo '[{}, {"a": "b"}, 2, 3, 4]' | jq [ {}, { "a": "b" }, 2, 3, 4 ] This is how jq interprets --compact-output: $ echo '[{}, {"a": "b"}, 2, 3, 4]' | jq --compact-output [{},{"a":"b"},2,3,4] I do not think that it's worth having the command-line tool cater to people that want to indent in other ways (e.g. using a string that isn't all spaces or a single tab). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 14:24:33 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 16 Mar 2017 18:24:33 +0000 Subject: [issue29828] Allow registering after-fork initializers in multiprocessing In-Reply-To: <1489682739.34.0.223711216906.issue29828@psf.upfronthosting.co.za> Message-ID: <1489688673.37.0.510882444469.issue29828@psf.upfronthosting.co.za> Yury Selivanov added the comment: Maybe a better way would be to proceed with http://bugs.python.org/issue16500? ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 14:30:12 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 16 Mar 2017 18:30:12 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1489689012.02.0.852154115459.issue28261@psf.upfronthosting.co.za> Oren Milman added the comment: as Serhiy pointed out in PR 668, here are some more functions that produce the same kind of wrong error messages: - Modules/timemodule.c - gettmarg() - Modules/socketmodule.c: * getsockaddrarg() * socket_getnameinfo() ISTM that searching for 'PyTuple_Check(' might be a good way to find more such functions, as they sometimes raise an error in case a type other than tuple was received (and after that, PyArg_ParseTuple is called). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 15:01:00 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 16 Mar 2017 19:01:00 +0000 Subject: [issue29828] Allow registering after-fork initializers in multiprocessing In-Reply-To: <1489682739.34.0.223711216906.issue29828@psf.upfronthosting.co.za> Message-ID: <1489690860.56.0.063919497429.issue29828@psf.upfronthosting.co.za> Antoine Pitrou added the comment: That issue seems to have stalled as it seems to have focussed on low-level APIs, and also because it is proposing a new module with the API question that entails. Another possible stance is that os.fork() should be left as-is, as a low-level primitive, and this functionality should be provided by the higher-level multiprocessing module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 15:03:36 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 16 Mar 2017 19:03:36 +0000 Subject: [issue29829] Documentation lacks clear warning of subprocess issue with pythonw In-Reply-To: <1489683501.47.0.952186876903.issue29829@psf.upfronthosting.co.za> Message-ID: <1489691016.06.0.908655850578.issue29829@psf.upfronthosting.co.za> R. David Murray added the comment: A warning is not appropriate (we reserve those for things that are security related, pretty much). A sentence might be, though. For example, we could change the initial discussion of the run function to say: This does not capture stdout or stderr by default. To do so, pass PIPE for the stdout and/or stderr arguments. You *must* do this if you run your python program with pythonw on windows, since pythonw closes the standard streams. Here I'm adding the windows sentence to the existing "This does not capture" sentence. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 16:50:18 2017 From: report at bugs.python.org (Davin Potts) Date: Thu, 16 Mar 2017 20:50:18 +0000 Subject: [issue29828] Allow registering after-fork initializers in multiprocessing In-Reply-To: <1489682739.34.0.223711216906.issue29828@psf.upfronthosting.co.za> Message-ID: <1489697418.62.0.938069230832.issue29828@psf.upfronthosting.co.za> Davin Potts added the comment: Having a read through issue16500 and issue6721, I worry that this could again become bogged down with similar concerns. With the specific example of NumPy, I am not sure I would want its random number generator to be reseeded with each forked process. There are many situations where I very much need to preserve the original seed and/or current PRNG state. I do not yet see a clear, motivating use case even after reading those two older issues. I worry that if it were added it would (almost?) never get used either because the need is rare or because developers will more often think of how this can be solved in their own target functions when they first start up. The suggestion of a top-level function and Context method make good sense to me as a place to offer such a thing but is there a clearer use case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 16:53:15 2017 From: report at bugs.python.org (Marco Buttu) Date: Thu, 16 Mar 2017 20:53:15 +0000 Subject: [issue29820] Broken link to "GUI Programming with Python: QT Edition" book In-Reply-To: <1489591760.97.0.349566849467.issue29820@psf.upfronthosting.co.za> Message-ID: <1489697595.67.0.532727249203.issue29820@psf.upfronthosting.co.za> Changes by Marco Buttu : ---------- pull_requests: +561 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 16:55:04 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 16 Mar 2017 20:55:04 +0000 Subject: [issue29828] Allow registering after-fork initializers in multiprocessing In-Reply-To: <1489682739.34.0.223711216906.issue29828@psf.upfronthosting.co.za> Message-ID: <1489697704.56.0.302447447282.issue29828@psf.upfronthosting.co.za> Nathaniel Smith added the comment: I think ideally on numpy's end we would reseed iff the RNG was unseeded. Now that I think about it I'm a little surprised that we haven't had more complaints about this, so I guess it's not a super urgent issue, but that would be an improvement over the status quo, I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 16:59:56 2017 From: report at bugs.python.org (Alan Evangelista) Date: Thu, 16 Mar 2017 20:59:56 +0000 Subject: [issue29777] argparse arguments in main parser hide an argument in subparser In-Reply-To: <1489091740.64.0.424181036659.issue29777@psf.upfronthosting.co.za> Message-ID: <1489697996.34.0.892691862027.issue29777@psf.upfronthosting.co.za> Alan Evangelista added the comment: PA> In http://bugs.python.org/issue14910#msg204678 I suggest a subclassing patch that might work with Py2. This solves my particular case. I do not use any argument with action='count', so the regression introduced by the new option does not affect me. Thanks! PA> The patch is big enough that I hesitate to add it to Py2. I see 2 solutions: - keep this issue opened until the bug with short options is fixed and we are more confident in fixing this in Py2 - close the issue with "won't fix" resolution and add the known issue to argparse documentation in Python 2.6 doc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 17:00:38 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 16 Mar 2017 21:00:38 +0000 Subject: [issue29828] Allow registering after-fork initializers in multiprocessing In-Reply-To: <1489682739.34.0.223711216906.issue29828@psf.upfronthosting.co.za> Message-ID: <1489698037.99.0.972646319995.issue29828@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The use case is quite clear here. The specific need to re-seed the Numpy PRNG has already come up in two different projects I work on: Numba and Dask. I wouldn't be surprised if other libraries have similar needs. If you want a reproducible RNG sequence, you should actually use a specific, explicit seed (and possibly instantiate a dedicated random state instead of using the default one). When not using an explicit seed, people expect different random numbers regardless of whether a function is executed in one or several processes. Note that multiprocessing *already* re-seeds the stdlib PRNG after fork, so re-seeding the Numpy PRNG is consistent with current behaviour. About it being rarely used: the aim is not use by application developers but by library authors; e.g. Numpy itself could register the re-seeding callback, which would free users from doing it themselves. It doesn't have to be used a lot to be useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 17:00:50 2017 From: report at bugs.python.org (Alan Evangelista) Date: Thu, 16 Mar 2017 21:00:50 +0000 Subject: [issue29777] argparse arguments in main parser hide an argument in subparser In-Reply-To: <1489091740.64.0.424181036659.issue29777@psf.upfronthosting.co.za> Message-ID: <1489698050.52.0.795679921907.issue29777@psf.upfronthosting.co.za> Alan Evangelista added the comment: s/Python 2.6/Python 2/ in last comment ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 17:37:44 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 16 Mar 2017 21:37:44 +0000 Subject: [issue29828] Allow registering after-fork initializers in multiprocessing In-Reply-To: <1489682739.34.0.223711216906.issue29828@psf.upfronthosting.co.za> Message-ID: <1489700264.61.0.383798507315.issue29828@psf.upfronthosting.co.za> Yury Selivanov added the comment: BTW, why can't you use `pthread_atfork` in numpy? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 18:33:58 2017 From: report at bugs.python.org (Ned Deily) Date: Thu, 16 Mar 2017 22:33:58 +0000 Subject: [issue29826] " don't work on Mac under IDLE In-Reply-To: <1489656922.89.0.360252821771.issue29826@psf.upfronthosting.co.za> Message-ID: <1489703638.38.0.811797759424.issue29826@psf.upfronthosting.co.za> Ned Deily added the comment: Yes, this is a symptom of using the default Apple-supplied macOS Tcl/Tk. See https://www.python.org/download/mac/tcltk/ for more information as the warning in IDLE suggests. If you are using Python 3.6.0 downloaded from python.org, the simple solution is to install the latest Tcl/Tk 8.5.x (not 8.6.x) from ActiveState assuming your use is compatible with the ActiveTcl license. ---------- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 18:35:12 2017 From: report at bugs.python.org (Manuel Jacob) Date: Thu, 16 Mar 2017 22:35:12 +0000 Subject: [issue29830] pyexpat.errors doesn't have __spec__ and __loader__ set Message-ID: <1489703712.88.0.588940526219.issue29830@psf.upfronthosting.co.za> New submission from Manuel Jacob: The same applies to pyexpat.model. It seems like pyexpat is the only builtin module which has submodules (errors, model). Normally, as I understand it, the module gets imported given a spec and the import machinery ensures that this spec ends up in the __spec__ attribute of the module. But in this case only pyexpat gets imported by importlib. The submodules are added when initializing the module. Also, importlib's BuiltinImporter assumes that a builtin module is never a package. Is this reasonable in this case? ---------- messages: 289737 nosy: mjacob priority: normal severity: normal status: open title: pyexpat.errors doesn't have __spec__ and __loader__ set _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 19:49:57 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 16 Mar 2017 23:49:57 +0000 Subject: [issue29826] " don't work on Mac under IDLE In-Reply-To: <1489656922.89.0.360252821771.issue29826@psf.upfronthosting.co.za> Message-ID: <1489708197.78.0.701557637297.issue29826@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Marco, did you see this message? (r"WARNING: The version of Tcl/Tk ({0}) in use may" r" be unstable.\n" r"Visit http://www.python.org/download/mac/tcltk/" r" for current information.".format(patchlevel)) Or is it somehow lost? Ned, the version check for this message is only done for Cocoa. Is this restriction correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 20:00:35 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 17 Mar 2017 00:00:35 +0000 Subject: [issue29826] " don't work on Mac under IDLE In-Reply-To: <1489656922.89.0.360252821771.issue29826@psf.upfronthosting.co.za> Message-ID: <1489708835.96.0.617255226166.issue29826@psf.upfronthosting.co.za> Ned Deily added the comment: > Is this restriction correct? Yes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 21:43:15 2017 From: report at bugs.python.org (quanyechavshuo) Date: Fri, 17 Mar 2017 01:43:15 +0000 Subject: [issue29831] os.path.exists seems can not recgnize "~" Message-ID: <1489714995.82.0.360951614677.issue29831@psf.upfronthosting.co.za> New submission from quanyechavshuo: os.system is ok to recgnize "~",but os.path.exists can not recgnize "~". eg: #1.py: import os os.system("ls -al ~/.zshrc") python3 1.py output: -rw-r--r-- 1 root wheel 5391 3 14 18:12 /var/root/.zshrc #2.py: import os a=os.path.exists("~/.zshrc") print(a) python3 2.py output: False ---------- messages: 289740 nosy: quanyechavshuo priority: normal severity: normal status: open title: os.path.exists seems can not recgnize "~" type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 21:51:59 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 17 Mar 2017 01:51:59 +0000 Subject: [issue29831] os.path.exists seems can not recgnize "~" In-Reply-To: <1489714995.82.0.360951614677.issue29831@psf.upfronthosting.co.za> Message-ID: <1489715519.76.0.714440355962.issue29831@psf.upfronthosting.co.za> Josh Rosenberg added the comment: That's because os.system is executing the command in a shell (which expands ~). Without shell support, ~ doesn't mean anything unless used with the APIs that specifically support it (e.g. os.path.expanduser). You wanted os.path.exists(os.path.expanduser('~/.zshrc')) This is not a bug. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 21:57:10 2017 From: report at bugs.python.org (Martin Panter) Date: Fri, 17 Mar 2017 01:57:10 +0000 Subject: [issue29831] os.path.exists seems can not recgnize "~" In-Reply-To: <1489714995.82.0.360951614677.issue29831@psf.upfronthosting.co.za> Message-ID: <1489715830.95.0.254740503843.issue29831@psf.upfronthosting.co.za> Martin Panter added the comment: I agree with Josh. This is how it is supposed to work. os.system calls the shell (e.g. Bash) rather than running the "ls" program directly. Unix shells translate "~" to the home directory (as well as translating a lot of other stuff, e.g. spaces to separate CLI arguments). But if you pass "~" to os.path.exists (or most other functions), that goes directly to the operating system and looks for a directory literally called "~". If you created a directory with that name, it should return True then. ---------- nosy: +martin.panter resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 22:51:43 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 17 Mar 2017 02:51:43 +0000 Subject: [issue29820] Broken link to "GUI Programming with Python: QT Edition" book In-Reply-To: <1489591760.97.0.349566849467.issue29820@psf.upfronthosting.co.za> Message-ID: <1489719103.17.0.421028375902.issue29820@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +562 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 22:51:58 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 17 Mar 2017 02:51:58 +0000 Subject: [issue29820] Broken link to "GUI Programming with Python: QT Edition" book In-Reply-To: <1489591760.97.0.349566849467.issue29820@psf.upfronthosting.co.za> Message-ID: <1489719118.02.0.679507459961.issue29820@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +563 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 22:59:08 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 17 Mar 2017 02:59:08 +0000 Subject: [issue29820] Broken link to "GUI Programming with Python: QT Edition" book In-Reply-To: <1489591760.97.0.349566849467.issue29820@psf.upfronthosting.co.za> Message-ID: <1489719548.6.0.233552448953.issue29820@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks Marco :) I merged your PR, and backported to 3.5 and 3.6. There are some merge conflict with the 2.7 branch, so I decided not to bother with it. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 16 23:26:42 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 17 Mar 2017 03:26:42 +0000 Subject: [issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad In-Reply-To: <1476176180.11.0.398413685253.issue28415@psf.upfronthosting.co.za> Message-ID: <1489721202.99.0.366015530146.issue28415@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 00:00:36 2017 From: report at bugs.python.org (Eryk Sun) Date: Fri, 17 Mar 2017 04:00:36 +0000 Subject: [issue29829] Documentation lacks clear warning of subprocess issue with pythonw In-Reply-To: <1489683501.47.0.952186876903.issue29829@psf.upfronthosting.co.za> Message-ID: <1489723236.95.0.727081599792.issue29829@psf.upfronthosting.co.za> Eryk Sun added the comment: An exception (not a crash) is possible if a standard handle is invalid and a Popen call tries to replace one or two of the other standard handles (e.g. stdin is invalid and you pass the argument stdout=PIPE). Note that subprocess uses the standard handles directly, so this problem is unrelated to Python's sys.std* streams. IMO, the presence of an invalid handle in the standard handles should not cause Popen to fail. This is an old problem, and it should have been addressed a long time ago by substituting a handle for \\.\NUL. In Windows 8+ this isn't particular to running pythonw.exe. In older versions such as Windows 7, if you start pythonw.exe from a console application, then the parent's standard handle values are copied to the pythonw.exe child. But these handles are invalid because pythonw.exe doesn't automatically attach to its parent's console. (You have to manually call AttachConsole(-1) or AllocConsole(), but that's complicated because you may need to reset the CRT's standard file descriptors and FILE streams and Pythons sys.std* streams.) Note that pythonw.exe doesn't delete or close the standard streams. They're normally set to None because, in the default case, the Windows standard handles aren't valid in pythonw.exe, and thus the CRT maps its standard file descriptors (0, 1, and 2) to INVALID_HANDLE_VALUE (i.e. -1 cast as a pointer). For example: C:\Temp>pyw -2 -c "import msvcrt; open('test.txt', 'w').write(str(msvcrt.get_osfhandle(1)))" C:\Temp>type test.txt 18446744073709551614 You can override this by starting pythonw.exe with explicit standard handles. For example, the following redirects stderr (2) to stdout (1) and redirects stdout to a pipe: C:\>set "script=import sys; print(sys.executable); print(sys.stdout); print(sys.stderr)" C:\>2>&1 pyw -2 -c "%script%" | more C:\Program Files\Python27\pythonw.exe ', mode 'w' at 0x00000000021FB0C0> ', mode 'w' at 0x00000000021FB150> C:\>2>&1 pyw -3 -c "%script%" | more C:\Program Files\Python36\pythonw.exe <_io.TextIOWrapper name='' mode='w' encoding='cp1252'> <_io.TextIOWrapper name='' mode='w' encoding='cp1252'> ---------- components: +Windows nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 02:43:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 06:43:17 +0000 Subject: [issue29832] Don't refer to getsockaddrarg in error messages Message-ID: <1489732997.44.0.201686346308.issue29832@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: getsockaddrarg() is an internal C function in the socket module implementation used in a number of socket methods (bind(), connect(), connect_ex(), sendto(), sendmsg()) for creating C structure sock_addr_t from Python tuple. Error messages raised when pass incorrect socket address argument to these function contain the name "getsockaddrarg" despite the fact that it is not directly exposed at Python level, nor the name of standard C function. >>> import socket >>> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>> s.bind(42) Traceback (most recent call last): File "", line 1, in TypeError: getsockaddrarg: AF_INET address must be tuple, not int >>> s.bind(()) Traceback (most recent call last): File "", line 1, in TypeError: getsockaddrarg() takes exactly 2 arguments (0 given) I think that error messages shouldn't refer to non-existing function "getsockaddrarg()". This issue is a part of more general issue28261. ---------- components: Extension Modules messages: 289745 nosy: Oren Milman, serhiy.storchaka priority: normal severity: normal status: open title: Don't refer to getsockaddrarg in error messages type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 02:43:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 06:43:50 +0000 Subject: [issue29832] Don't refer to getsockaddrarg in error messages In-Reply-To: <1489732997.44.0.201686346308.issue29832@psf.upfronthosting.co.za> Message-ID: <1489733030.79.0.860008906134.issue29832@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +564 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 03:00:29 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Fri, 17 Mar 2017 07:00:29 +0000 Subject: [issue29825] PyFunction_New() not validate code object In-Reply-To: <1489654077.04.0.544465484801.issue29825@psf.upfronthosting.co.za> Message-ID: <1489734029.99.0.454351450403.issue29825@psf.upfronthosting.co.za> Jelle Zijlstra added the comment: I don't think this is a bug; it is known and expected that you can do all kinds of bad things by writing bytecode manually. (You can already make Python write to random memory by giving it LOAD_FAST or STORE_FAST opcodes with incorrect offsets.) This doesn't seem to be clearly documented though; the documentation just says that bytecode can change between releases. ---------- nosy: +Jelle Zijlstra _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 04:31:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 08:31:01 +0000 Subject: [issue29833] Avoid raising OverflowError if possible Message-ID: <1489739461.89.0.615647789001.issue29833@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: OverflowError usually is caused by platform limitations. It is raised on the fence between Python and C when convert Python integer to C integer type. On other platform the same input can be accepted or cause raising ValueError if the value is out of range. I think we should avoid raising OverflowError if possible. If the function accepts only non-negative integers, it should raise the same ValueError, IndexError or OverflowError for -10**100 as for -1. If the function bounds integer value to the range from 0 to 100, it should do this also for integers that don't fit in C integer type. If large argument means allocating an amount of memory that exceeds the address space, it should raise MemoryError rather than OverflowError. This principle is already supported in the part of the interpreter. For example: >>> 'abc'[:10**100] 'abc' >>> 'abc'[-10**100:] 'abc' >>> bytes([10**100]) Traceback (most recent call last): File "", line 1, in ValueError: bytes must be in range(0, 256) >>> round(1.2, 10**100) 1.2 >>> round(1.2, -10**100) 0.0 >>> math.factorial(-10**100) Traceback (most recent call last): File "", line 1, in ValueError: factorial() not defined for negative values This is a meta-issue. Concrete changes will be made in sub-issues. ---------- components: Interpreter Core messages: 289747 nosy: Oren Milman, haypo, mark.dickinson, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Avoid raising OverflowError if possible type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 04:36:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 08:36:16 +0000 Subject: [issue29833] Avoid raising OverflowError if possible In-Reply-To: <1489739461.89.0.615647789001.issue29833@psf.upfronthosting.co.za> Message-ID: <1489739776.48.0.99470747887.issue29833@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Avoid raising OverflowError in truncate() if possible, Get rid of C limitation for shift count in right shift, bool of large range raises OverflowError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 04:44:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 08:44:59 +0000 Subject: [issue29834] Raise ValueError rather of OverflowError in PyLong_AsUnsignedLong() Message-ID: <1489740299.73.0.174810615045.issue29834@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: OverflowError is raised when Python integer doesn't fit in C integer type due to platform limitations. Different platforms have different limits. But in PyLong_AsUnsignedLong() only the upper limit is platform-depended. Negative integers always are not accepted. PyLong_AsUnsignedLong() is used for values that can be only non-negative. I think that ValueError is more appropriate in this case than OverflowError. ---------- components: Interpreter Core messages: 289748 nosy: Oren Milman, serhiy.storchaka priority: normal severity: normal status: open title: Raise ValueError rather of OverflowError in PyLong_AsUnsignedLong() type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 04:45:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 08:45:21 +0000 Subject: [issue29833] Avoid raising OverflowError if possible In-Reply-To: <1489739461.89.0.615647789001.issue29833@psf.upfronthosting.co.za> Message-ID: <1489740321.35.0.112405443105.issue29833@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Raise ValueError rather of OverflowError in PyLong_AsUnsignedLong() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 04:55:12 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Mar 2017 08:55:12 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1489740912.02.0.553025463389.issue16355@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +565 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 04:56:17 2017 From: report at bugs.python.org (LCatro) Date: Fri, 17 Mar 2017 08:56:17 +0000 Subject: [issue29825] PyFunction_New() not validate code object In-Reply-To: <1489654077.04.0.544465484801.issue29825@psf.upfronthosting.co.za> Message-ID: <1489740977.51.0.776525241921.issue29825@psf.upfronthosting.co.za> LCatro added the comment: actually ,LOAD_CONST is taking an correct offset .I make a Python opcode compiler ,LOAD_CONST 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\x41\x41\x41\x41' will conver to LOAD_CONST 1 .look back the poc ,it mean : LOAD_CONST 1 => Load a string object from co->consts to python stack MAKE_FUNCTION 0 => first ,python core will pop a object from python stack ,and than using this object to create a function so set a breakpoint at TARGET(MAKE_FUNCTION) v = POP(); /* code object */ <= now it is a string object x = PyFunction_New(v, f->f_globals); PyFunction_New(PyObject *code, PyObject *globals) <= now argument code is a string object not code object op->func_name = ((PyCodeObject *)code)->co_name; <= look there Py_INCREF(op->func_name) conver to assembly : 1e07e24e 8b4834 mov ecx,dword ptr [eax+34h] ... 1e07e254 ff01 inc dword ptr [ecx] it mean ,if control data struct's offset 0x34 and it will conduct an arbitrarily address to inc Python string object's struct like this : |Python_Type|String_Length|String_Data| breakpoint at 0x1e07e24e ,look eax .. 0:000> dd eax 0204d2e0 00000003 1e1d81f8 00000024 c7554b90 0204d2f0 00000001 43434343 43434343 43434343 0204d300 43434343 43434343 43434343 43434343 0204d310 43434343 41414141 68746100 00275f5f 0204d320 0204e408 0204d3e0 fffffffd ffffffff 0204d330 00000001 1e1dbb00 01fda968 01fe28a0 0204d340 0204b590 00000000 1e1d9824 01fb1760 0204d350 00000000 00000000 01feb2c0 01ff9930 so [eax+34h] point to 0x41414141 ,inc dword ptr [ecx] => inc dword ptr [0x41414141] i trigger this need compiler opcode to .pyc ,actually we can still trigger in .py ,this is poc : import marshal code=b'\x63\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x40\x00\x00\x00\x73\x0A\x00\x00\x00\x64\x01\x00\x84\x00\x00\x64\x00\x00\x53\x28\x02\x00\x00\x00\x4E\x73\x24\x00\x00\x00\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x43\x41\x41\x41\x41\x28\x00\x00\x00\x00\x28\x00\x00\x00\x00\x28\x00\x00\x00\x00\x28\x00\x00\x00\x00\x74\x00\x00\x00\x00\x73\x08\x00\x00\x00\x3C\x6D\x6F\x64\x75\x6C\x65\x3E\x01\x00\x00\x00\x74\x02\x00\x00\x00\x00\x01' poc=marshal.loads(code) exec(poc) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 05:16:32 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 09:16:32 +0000 Subject: [issue29825] PyFunction_New() not validate code object In-Reply-To: <1489654077.04.0.544465484801.issue29825@psf.upfronthosting.co.za> Message-ID: <1489742192.82.0.294674528322.issue29825@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a deliberate decision. In general, it is very difficult to verify the bytecode for correctness (whatever correctness criterion has been chosen). Any check takes time and this will slow down the execution in the normal case. This is not considered security issue since passing untrusted bytecode is not safe in any case. ---------- nosy: +serhiy.storchaka resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 05:36:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 09:36:10 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1489743370.42.0.369895815659.issue29816@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Oren, but your code doesn't work when PY_SSIZE_T_MAX < b < PY_SSIZE_T_MAX * PyLong_SHIFT and a > 2 ** b. When you drop wordshift and left only loshift_d you should drop lower wordshift digits in a. The code for left shift would be even more complex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 05:46:30 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 17 Mar 2017 09:46:30 +0000 Subject: [issue29834] Raise ValueError rather of OverflowError in PyLong_AsUnsignedLong() In-Reply-To: <1489740299.73.0.174810615045.issue29834@psf.upfronthosting.co.za> Message-ID: <1489743990.79.0.645658399139.issue29834@psf.upfronthosting.co.za> Oren Milman added the comment: note that there are functions that rely on the fact that PyLong_AsUnsignedLong currently raises OverflowError for both cases. such functions would probably use PyErr_ExceptionMatches(PyExc_OverflowError) or something like PyErr_GivenExceptionMatches(err, PyExc_OverflowError) _Py_Uid_Converter() (in Modules/posixmodule.c) is an example, but ISTM there aren't many such functions. however, this is only in cpython's C code. I don't know how many functions in cpython's python code rely on this. also, maybe there is a lot of user code that rely on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 06:33:43 2017 From: report at bugs.python.org (Marco Buttu) Date: Fri, 17 Mar 2017 10:33:43 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1489746823.91.0.798755334102.issue16355@psf.upfronthosting.co.za> Changes by Marco Buttu : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 07:14:02 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Mar 2017 11:14:02 +0000 Subject: [issue7283] test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet In-Reply-To: <1257640034.65.0.139323856655.issue7283@psf.upfronthosting.co.za> Message-ID: <1489749242.69.0.514674879027.issue7283@psf.upfronthosting.co.za> Berker Peksag added the comment: I just saw a similar failure on AppVeyor: ====================================================================== FAIL: test_s_option (test.test_site.HelperFunctionsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_site.py", line 173, in test_s_option self.assertIn(usersite, sys.path) AssertionError: 'C:\\Users\\appveyor\\AppData\\Roaming\\Python\\Python36\\site-packages' not found in ['', 'C:\\projects\\cpython\\PCbuild\\win32\\python36.zip', 'C:\\projects\\cpython\\DLLs', 'C:\\projects\\cpython\\lib', 'C:\\projects\\cpython\\PCbuild\\win32', 'C:\\projects\\cpython', 'C:\\projects\\cpython\\lib\\site-packages'] https://ci.appveyor.com/project/python/cpython/build/3.6.1rc1+.474#L3230 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 07:21:16 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 17 Mar 2017 11:21:16 +0000 Subject: [issue28699] Imap from ThreadPool behaves unexpectedly In-Reply-To: <1479234139.82.0.483433491582.issue28699@psf.upfronthosting.co.za> Message-ID: <1489749676.09.0.277817149452.issue28699@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 07:23:08 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 17 Mar 2017 11:23:08 +0000 Subject: [issue28699] Imap from ThreadPool behaves unexpectedly In-Reply-To: <1479234139.82.0.483433491582.issue28699@psf.upfronthosting.co.za> Message-ID: <1489749788.64.0.324892766577.issue28699@psf.upfronthosting.co.za> Xiang Zhang added the comment: Davin, I propose a PR to solve this problem based on your patch. Hope you are willing to review and let's finish this. ;-) ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 07:24:26 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Mar 2017 11:24:26 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1489749866.25.0.758604607605.issue16355@psf.upfronthosting.co.za> Berker Peksag added the comment: Please don't close an issue while there are still open backport PRs on GitHub. ---------- resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 07:37:53 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Mar 2017 11:37:53 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1489750673.12.0.193525149172.issue16355@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +567 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 08:01:35 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Mar 2017 12:01:35 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1489752095.15.0.305379353687.issue16355@psf.upfronthosting.co.za> Berker Peksag added the comment: Now all PRs have been merged: * master: https://github.com/python/cpython/commit/3f2155ffe683080f2a1b28408fa48d43ba92f943 * 3.6: https://github.com/python/cpython/commit/948171bf999cf8b3e12048851041d2e04ae3a78c * 3.5: https://github.com/python/cpython/commit/41b4a2189f29daae008e57f799a30890643d191f Thanks for the patches, Vajrasky and Marco! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 08:08:00 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 17 Mar 2017 12:08:00 +0000 Subject: [issue29835] py_blake2*_new_impl produces inconsistent error messages, and raises OverflowError where ValueError might be better Message-ID: <1489752480.08.0.482670845607.issue29835@psf.upfronthosting.co.za> New submission from Oren Milman: 1. currently, py_blake2s_new_impl and py_blake2b_new_impl might produce inconsistent error messages (note that the first one happens on platforms where sizeof(long) > 4): >>> hashlib.blake2b(leaf_size=1 << 32) Traceback (most recent call last): File "", line 1, in OverflowError: leaf_size is too large >>> hashlib.blake2b(leaf_size=1 << 1000) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C unsigned long >>> hashlib.blake2b(depth=256) Traceback (most recent call last): File "", line 1, in ValueError: depth must be between 1 and 255 >>> hashlib.blake2b(depth=256 << 1000) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C long there are similar inconsistent error messages when the function receives big and small out of range values for other arguments, too. 2. it might be better to raise a ValueError in the following cases: >>> hashlib.blake2b(leaf_size=-1) Traceback (most recent call last): File "", line 1, in OverflowError: can't convert negative value to unsigned int >>> hashlib.blake2b(depth=-1 << 1000) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C long and maybe also in this case? >>> hashlib.blake2b(depth=1 << 1000) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C long this might be considered as a sub-issue of #29833. note that solving the issue for leaf_size might be easier after #29834 is resolved, as one could add something like the following to the if block of (leaf_size == (unsigned long) -1 && PyErr_Occurred()): err = PyErr_Occurred(); if (PyErr_GivenExceptionMatches(err, PyExc_OverflowError) || PyErr_GivenExceptionMatches(err, PyExc_ValueError)) { PyErr_SetString(err, "leaf_size must be between 0 and 2**32-1"); } however, depth and other arguments are parsed by py_blake*_new, which is generated by the argument clinic, so ISTM that solving the issue for them might be harder. (this issue was created while working on #15988, as can be seen in the code review comments of PR 668.) ---------- messages: 289757 nosy: Oren Milman, serhiy.storchaka priority: normal severity: normal status: open title: py_blake2*_new_impl produces inconsistent error messages, and raises OverflowError where ValueError might be better type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 08:08:14 2017 From: report at bugs.python.org (John Jones) Date: Fri, 17 Mar 2017 12:08:14 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1489752494.41.0.227548700007.issue20104@psf.upfronthosting.co.za> John Jones added the comment: To prevent subprocess/os.fork() doubling my memory after loading a large numpy array into memory, I now have to start my script with 650 calls to subprocess.Popen(), which just sit their waiting for some stdin to start doing something. This doesn't happen until after the numpy array is loaded, else I quickly run out of memory. I think this sort of situation results in more unnecessary complexity compared to using posix_spawn, in spite of the concerns about using posix_spawn. Perhaps subprocess.Popen just needs a "posix_spawn=True" parameter? ---------- nosy: +John Jones _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 09:06:59 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 17 Mar 2017 13:06:59 +0000 Subject: [issue29835] py_blake2*_new_impl produces inconsistent error messages, and raises OverflowError where ValueError might be better In-Reply-To: <1489752480.08.0.482670845607.issue29835@psf.upfronthosting.co.za> Message-ID: <1489756019.33.0.526369812111.issue29835@psf.upfronthosting.co.za> Xiang Zhang added the comment: I don't catch up with the progress but just FYI, the documentation of OverflowError states this situation: https://docs.python.org/3/library/exceptions.html#OverflowError. (I wanted to raise similar issues before ;-) ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 09:17:24 2017 From: report at bugs.python.org (Christian Heimes) Date: Fri, 17 Mar 2017 13:17:24 +0000 Subject: [issue29835] py_blake2*_new_impl produces inconsistent error messages, and raises OverflowError where ValueError might be better In-Reply-To: <1489752480.08.0.482670845607.issue29835@psf.upfronthosting.co.za> Message-ID: <1489756644.26.0.659866254648.issue29835@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 11:27:08 2017 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 17 Mar 2017 15:27:08 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1489764428.66.0.769340766889.issue29808@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 11:35:26 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Fri, 17 Mar 2017 15:35:26 +0000 Subject: [issue29836] Remove nturl2path from test_sundry and amend its docstring Message-ID: <1489764926.92.0.485440810457.issue29836@psf.upfronthosting.co.za> New submission from Jim Fasarakis-Hilliard: After discussion on [1] this PR removes nturl2path from test_sundry and ammends its docstring to include a note on how it is an implementation detail and tested elsewhere. ---------- messages: 289760 nosy: Jim Fasarakis-Hilliard priority: normal severity: normal status: open title: Remove nturl2path from test_sundry and amend its docstring _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 11:36:35 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Fri, 17 Mar 2017 15:36:35 +0000 Subject: [issue29836] Remove nturl2path from test_sundry and amend its docstring In-Reply-To: <1489764926.92.0.485440810457.issue29836@psf.upfronthosting.co.za> Message-ID: <1489764995.52.0.698296012514.issue29836@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Whoops: [1]: https://mail.python.org/mailman/private/core-mentorship/2017-March/003832.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 11:36:52 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 17 Mar 2017 15:36:52 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1489765012.64.0.378915326961.issue29808@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Does this need backport into 3.5 and 3.6? ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 11:36:54 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Fri, 17 Mar 2017 15:36:54 +0000 Subject: [issue29836] Remove nturl2path from test_sundry and amend its docstring In-Reply-To: <1489764926.92.0.485440810457.issue29836@psf.upfronthosting.co.za> Message-ID: <1489765014.84.0.172473944227.issue29836@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- pull_requests: +568 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 11:40:22 2017 From: report at bugs.python.org (justin) Date: Fri, 17 Mar 2017 15:40:22 +0000 Subject: [issue29837] python3 pycopg2 import issue on solaris 10 Message-ID: <1489765222.46.0.96777133455.issue29837@psf.upfronthosting.co.za> New submission from justin: Hi, I have installed psycopg2 through pip3, but when I tried to import it, I got the following error. what could be the problem? help> psycopg2 problem in psycopg2 - ImportError: ld.so.1: python3.3: fatal: relocation error: file /opt/csw/lib/python3.3/site-packages/psycopg2/_psycopg.so: symbol timeradd: referenced symbol not found ------------------------ thanks justin ---------- components: Build messages: 289763 nosy: juwang priority: normal severity: normal status: open title: python3 pycopg2 import issue on solaris 10 type: compile error versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 11:43:33 2017 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 17 Mar 2017 15:43:33 +0000 Subject: [issue29837] python3 pycopg2 import issue on solaris 10 In-Reply-To: <1489765222.46.0.96777133455.issue29837@psf.upfronthosting.co.za> Message-ID: <1489765413.25.0.187343419738.issue29837@psf.upfronthosting.co.za> Eric V. Smith added the comment: This would be an issue for pscyopg2 support, not the Python bug tracker. You're probably using an unsupported combination of psycopg2 and postgres libraries. ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 11:45:43 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 17 Mar 2017 15:45:43 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1489765543.93.0.54337871697.issue29808@psf.upfronthosting.co.za> ???? ????????? added the comment: Yes, I want this simple patch to be back-ported. We use Python 3.5 in our projects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 11:48:23 2017 From: report at bugs.python.org (Michael Felt) Date: Fri, 17 Mar 2017 15:48:23 +0000 Subject: [issue29545] Python behavioral difference between Linux and AIX In-Reply-To: Message-ID: <1489765703.32.0.327258751254.issue29545@psf.upfronthosting.co.za> Michael Felt added the comment: Curious. First pass: using python2.7.12 also hanged as program, on the close() second pass: interactive - do the read first, then the close - seems to work: root at x064:[/data/prj/python/issues/29545]cat hello.py #!/usr/bin/env python import errno import os import pty from subprocess import Popen, STDOUT master_fd, slave_fd = pty.openpty() proc = Popen(['./hello'],stdout=slave_fd, close_fds=True) os.close(slave_fd) data = os.read(master_fd, 512) print('got ' + repr(data)) root at x064:[/data/prj/python/issues/29545]python Python 2.7.12 (default, Sep 29 2016, 12:02:17) [C] on aix5 Type "help", "copyright", "credits" or "license" for more information. >>> import errno import os import pty from subprocess import Popen, STDOUT >>> >>> >>> >>> >>> master_fd, slave_fd = pty.openpty() >>> master_fd 3 >>> slave_fd 4 >>> proc = Popen(['./hello'],stdout=slave_fd, close_fds=True) >>> data = os.read(master_fd, 512) >>> datat 'hello world\r\n' >>> os.close(slave_fd) >>> print (got ' File "", line 1 print (got ' ^ SyntaxError: EOL while scanning string literal >>> print('got ' + repr(data)) got 'hello world\r\n' >>> quit() pass 3: swap the close() and the read() and the program works fine. "hello.py" 11 lines, 265 characters root at x064:[/data/prj/python/issues/29545]cat hello.py #!/usr/bin/env python import errno import os import pty from subprocess import Popen, STDOUT master_fd, slave_fd = pty.openpty() proc = Popen(['./hello'],stdout=slave_fd, close_fds=True) data = os.read(master_fd, 512) os.close(slave_fd) print('got ' + repr(data)) root at x064:[/data/prj/python/issues/29545]./hello.py got 'hello world\r\n' root at x064:[/data/prj/python/issues/29545] ---------- nosy: +aixtools at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 12:06:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 16:06:38 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1489766798.46.0.593961406297.issue29816@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated PR. Now OverflowError is never raised if the result is representable. Mark, could you please make a review? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 12:21:50 2017 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 17 Mar 2017 16:21:50 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1489767709.99.0.433212781506.issue29808@psf.upfronthosting.co.za> Vinay Sajip added the comment: Sorry, I was a bit too hasty closing the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 12:31:43 2017 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 17 Mar 2017 16:31:43 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1489768303.47.0.340401083023.issue29808@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- pull_requests: +569 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 12:33:16 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 17 Mar 2017 16:33:16 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1489768396.01.0.115175742368.issue20104@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I think someone wanting this will need to put forward a patch adding it to be reviewed and mulled over. As Alex mentioned in msg22571 - https://github.com/dreid/posix_spawn/ exists as does the code Danek pointed at in the next comment. try those. I suggest someone who actively cares about a limited available process address space environment contribute this. (ie: not your typical 64-bit system) fork()+exec() does not cause significant memory allocation, only a brief ~doubling of mapped address space, with backing pages being the originals just marked copy on write, but never written to by the child. The exec undoes that mapping. It is technically possible to cause the copy on writes to happen if you immediately write to a large amount of memory in the parent process after the fork has happened before the exec has, but that seems like a rare timing problem that could even be worked around by monitoring the forked child to see that the exec has occurred before continuing. ---------- versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 12:34:33 2017 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 17 Mar 2017 16:34:33 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1489768473.16.0.399915909595.issue29808@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- pull_requests: +570 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 13:15:36 2017 From: report at bugs.python.org (Kostis Anagnostopoulos) Date: Fri, 17 Mar 2017 17:15:36 +0000 Subject: [issue29757] The loop in utility `socket.create_connection()` swallows previous errors In-Reply-To: <1488984317.87.0.296010902983.issue29757@psf.upfronthosting.co.za> Message-ID: <1489770936.74.0.0159554444939.issue29757@psf.upfronthosting.co.za> Kostis Anagnostopoulos added the comment: > When the list of errors is passed as a second argument to the exception, how is it rendered? This is how my latest ec887c0c3 looks on Linux: >>> import socket >>> socket.create_connection(('localhost', 12345)) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/socket.py", line 714, in create_connection raise error("no connection possible due to %d errors" % nerr, errors) OSError: [Errno no connection possible due to 2 errors] [ConnectionRefusedError(111, 'Connection refused'), ConnectionRefusedError(111, 'Connection refused')] And this is on Windows: >>> socket.create_connection(('localhost', 12345), 1) Traceback (most recent call last): File "D:\Apps\WinPython-64bit-3.5.3.0Qt5\python-3.5.3.amd64\lib\site-packages\IPython\core\interactiveshell.py", line 2881, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in socket.create_connection(('localhost', 12345), 1) File "D:\Apps\WinPython-64bit-3.5.3.0Qt5\python-3.5.3.amd64\lib\socket.py", line 714, in create_connection raise error("no connection possible due to %d errors" % nerr, errors) OSError: [Errno no connection possible due to 2 errors] [timeout('timed out',), timeout('timed out',)] > Would it make sense to concatenate all error messages: But then the user will not receive a list of errors to inspect, but just a big string. The biggest problem in my latest ec887c0c3 is that I'm abusing the 1st arg to OSError() constructor, instead of being an `errno` it is a string. But I got that from the existing code.[1] And still, this PR is not yer finished because there is no feedback on any intermediate errors in the case of success. As suggested on the OP, this may happen (in my order of preference): 1. with a new argument for the user to provide the list to collect the errors (changes the API backward-compatiblly); 2. with logging logs; 3. with warnings; 4. do nothing. I prefer logging over warnings because they are more configurable. [1] https://github.com/python/cpython/blob/master/Lib/socket.py#L724 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 13:27:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 17:27:35 +0000 Subject: [issue28876] bool of large range raises OverflowError In-Reply-To: <1480930662.45.0.497603219066.issue28876@psf.upfronthosting.co.za> Message-ID: <1489771655.7.0.381324606055.issue28876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Akira, could you open a pull request on GitHub? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 13:49:11 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 17 Mar 2017 17:49:11 +0000 Subject: [issue29830] pyexpat.errors doesn't have __spec__ and __loader__ set In-Reply-To: <1489703712.88.0.588940526219.issue29830@psf.upfronthosting.co.za> Message-ID: <1489772951.5.0.135802958003.issue29830@psf.upfronthosting.co.za> Brett Cannon added the comment: The BuiltinImporter's assumption is reasonable because there are no built-ins that are packages. :) In pyexpat's case it's an extension module, not a built-in. As for the expat issue, a patch that backfills the missing info would probably be reviewed. ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 14:03:30 2017 From: report at bugs.python.org (Manuel Jacob) Date: Fri, 17 Mar 2017 18:03:30 +0000 Subject: [issue29830] pyexpat.errors doesn't have __spec__ and __loader__ set In-Reply-To: <1489703712.88.0.588940526219.issue29830@psf.upfronthosting.co.za> Message-ID: <1489773810.33.0.635311957707.issue29830@psf.upfronthosting.co.za> Manuel Jacob added the comment: You're of course right that pyexpat is an extension module and not a builtin module. I was confused because on PyPy it's a builtin module. But the same question applies for ExtensionFileLoader.is_package(). It returns False in the case of pyexpat. This function looks a bit strange to me anyway. It assumes the definition of what a package is for pure Python modules and applies it to extension modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 14:17:05 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 17 Mar 2017 18:17:05 +0000 Subject: [issue29836] Remove nturl2path from test_sundry and amend its docstring In-Reply-To: <1489764926.92.0.485440810457.issue29836@psf.upfronthosting.co.za> Message-ID: <1489774625.53.0.742920410277.issue29836@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 14:49:37 2017 From: report at bugs.python.org (John Jones) Date: Fri, 17 Mar 2017 18:49:37 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1388600000.81.0.911230526926.issue20104@psf.upfronthosting.co.za> Message-ID: <1489776577.7.0.530513240047.issue20104@psf.upfronthosting.co.za> John Jones added the comment: I agree with everything you're saying Gregory, however I don't think the significance of the memory doubling is as inconsequential as you might first think. For example, i have on my 64bit Linux system 128Gb of RAM, and a numpy table that's around 70Gb. Spawning a subprocess, even though memory is doubled for a very short period of time, is enough to raise a MemoryError, despite the subprocess i'm spawning using only 2 or 3Mb after the exec(). I do appreciate that for most Python users however, they will not see much benefit from what I imagine is quite a lot of development work. FWIW, I did try the posix_spawn module, but i couldn't figure out how to write data to the stdin of a posix_spawn subprocess, and gave up in place of the commonly recommended solution to this problem (via StackExchange) of spawning lots of subprocesses before you put stuff in memory. Fortunately, for my problem, this was a possible solution. For others I think they're going to have to use posix_spawn, or an entirely different programming language if that doesn't work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 15:31:41 2017 From: report at bugs.python.org (Akira Li) Date: Fri, 17 Mar 2017 19:31:41 +0000 Subject: [issue28876] bool of large range raises OverflowError In-Reply-To: <1480930662.45.0.497603219066.issue28876@psf.upfronthosting.co.za> Message-ID: <1489779101.94.0.433325421092.issue28876@psf.upfronthosting.co.za> Changes by Akira Li <4kir4.1i at gmail.com>: ---------- pull_requests: +572 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 15:39:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 19:39:52 +0000 Subject: [issue29838] Check that sq_length and mq_length return non-negative result Message-ID: <1489779592.24.0.829471920216.issue29838@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Following PR adds several asserts for checking that sq_length and mq_length either return non-negative result or raise an exception. One assert already was in PySequence_GetItem(). ---------- components: Interpreter Core messages: 289777 nosy: haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Check that sq_length and mq_length return non-negative result type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 15:40:39 2017 From: report at bugs.python.org (Akira Li) Date: Fri, 17 Mar 2017 19:40:39 +0000 Subject: [issue28876] bool of large range raises OverflowError In-Reply-To: <1480930662.45.0.497603219066.issue28876@psf.upfronthosting.co.za> Message-ID: <1489779639.26.0.0911538487336.issue28876@psf.upfronthosting.co.za> Akira Li added the comment: > Akira, could you open a pull request on GitHub? Done. PR 699 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 15:47:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 19:47:54 +0000 Subject: [issue29838] Check that sq_length and mq_length return non-negative result In-Reply-To: <1489779592.24.0.829471920216.issue29838@psf.upfronthosting.co.za> Message-ID: <1489780074.02.0.193212873215.issue29838@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +574 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 15:52:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 19:52:14 +0000 Subject: [issue29839] Avoid raising OverflowError in len() when __len__() returns negative large value Message-ID: <1489780334.51.0.943711507872.issue29839@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: For now len() raises ValueError if __len__() returns small negative integer and OverflowError if __len__() returns large negative integer. >>> class NegativeLen: ... def __len__(self): ... return -10 ... >>> len(NegativeLen()) Traceback (most recent call last): File "", line 1, in ValueError: __len__() should return >= 0 >>> class HugeNegativeLen: ... def __len__(self): ... return -sys.maxsize-10 ... >>> len(HugeNegativeLen()) Traceback (most recent call last): File "", line 1, in OverflowError: cannot fit 'int' into an index-sized integer Proposed patch makes it always raising ValueError. ---------- components: Interpreter Core messages: 289779 nosy: Oren Milman, haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Avoid raising OverflowError in len() when __len__() returns negative large value type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 15:57:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 19:57:35 +0000 Subject: [issue29839] Avoid raising OverflowError in len() when __len__() returns negative large value In-Reply-To: <1489780334.51.0.943711507872.issue29839@psf.upfronthosting.co.za> Message-ID: <1489780655.07.0.0385781874889.issue29839@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +575 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 15:58:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 19:58:01 +0000 Subject: [issue29833] Avoid raising OverflowError if possible In-Reply-To: <1489739461.89.0.615647789001.issue29833@psf.upfronthosting.co.za> Message-ID: <1489780681.27.0.545070865727.issue29833@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Avoid raising OverflowError in len() when __len__() returns negative large value _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 16:05:00 2017 From: report at bugs.python.org (Akira Li) Date: Fri, 17 Mar 2017 20:05:00 +0000 Subject: [issue29352] provide the authorative source for s[i:j] negative slice indices (<-len(s)) behavior for standard sequences In-Reply-To: <1485190156.24.0.631194950251.issue29352@psf.upfronthosting.co.za> Message-ID: <1489781100.28.0.634555909837.issue29352@psf.upfronthosting.co.za> Akira Li added the comment: I prefer the wording in the current patch. Though I don't have strong feelings one way or the other as long as the behavior is specified explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 16:27:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 20:27:26 +0000 Subject: [issue29840] Avoid raising OverflowError in bool() Message-ID: <1489782446.56.0.355449112547.issue29840@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: For now bool() raises OverflowError if __bool__ is not defined and __len__ returns large value. >>> class A: ... def __len__(self): ... return 1 << 1000 ... >>> bool(A()) Traceback (most recent call last): File "", line 1, in OverflowError: cannot fit 'int' into an index-sized integer >>> bool(range(1<<1000)) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C ssize_t Proposed patch makes bool() returning True if len() raises OverflowError. This is an alternate solution of issue28876. ---------- components: Interpreter Core messages: 289781 nosy: mark.dickinson, rhettinger, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Avoid raising OverflowError in bool() type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 16:28:43 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 17 Mar 2017 20:28:43 +0000 Subject: [issue29839] Avoid raising OverflowError in len() when __len__() returns negative large value In-Reply-To: <1489780334.51.0.943711507872.issue29839@psf.upfronthosting.co.za> Message-ID: <1489782523.75.0.560495314756.issue29839@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I was going to say that this is an API change, but given that without this, folks would have to catch both exceptions and now only have to catch one of them, it isn't. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 16:33:15 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 17 Mar 2017 20:33:15 +0000 Subject: [issue29841] errors raised by bytes and bytearray constructors for invalid size argument Message-ID: <1489782795.95.0.350894370649.issue29841@psf.upfronthosting.co.za> New submission from Oren Milman: currently (on my Windows 10): >>> bytes(-1 << 1000) Traceback (most recent call last): File "", line 1, in OverflowError: cannot fit 'int' into an index-sized integer >>> bytes(-1) Traceback (most recent call last): File "", line 1, in ValueError: negative count >>> bytes(sys.maxsize + 1) Traceback (most recent call last): File "", line 1, in OverflowError: cannot fit 'int' into an index-sized integer for the same size arguments, bytearray raises the same errors. thus, in accordance with #29833 (this is a sub-issue of #29833) for each of the constructors of bytes and bytearray: 1. ValueErrors with the same error message should be raised for any negative size argument (big negative as well as small negative). 2. MemoryError should be raised for any size argument bigger than sys.maxsize. Moreover, currently: >>> bytes(sys.maxsize - 25) Traceback (most recent call last): File "", line 1, in MemoryError >>> bytes(sys.maxsize - 24) Traceback (most recent call last): File "", line 1, in OverflowError: byte string is too large >>> bytes(sys.maxsize) Traceback (most recent call last): File "", line 1, in OverflowError: byte string is too large for each of these size arguments, bytearray raises a MemoryError. IMHO, to make the error messages more consistent, the constructor of bytes should raise a MemoryError for any too large size argument, as the constructor of bytearray already does. ---------- components: Interpreter Core messages: 289783 nosy: Oren Milman, serhiy.storchaka priority: normal severity: normal status: open title: errors raised by bytes and bytearray constructors for invalid size argument type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 16:35:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 20:35:34 +0000 Subject: [issue29840] Avoid raising OverflowError in bool() In-Reply-To: <1489782446.56.0.355449112547.issue29840@psf.upfronthosting.co.za> Message-ID: <1489782934.39.0.315040397741.issue29840@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Avoid raising OverflowError in len() when __len__() returns negative large value keywords: +patch Added file: http://bugs.python.org/file46731/bool-overflow.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 16:35:38 2017 From: report at bugs.python.org (Akira Li) Date: Fri, 17 Mar 2017 20:35:38 +0000 Subject: [issue29352] provide the authorative source for s[i:j] negative slice indices (<-len(s)) behavior for standard sequences In-Reply-To: <1485190156.24.0.631194950251.issue29352@psf.upfronthosting.co.za> Message-ID: <1489782938.39.0.916754323822.issue29352@psf.upfronthosting.co.za> Changes by Akira Li <4kir4.1i at gmail.com>: ---------- pull_requests: +576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 16:50:11 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 17 Mar 2017 20:50:11 +0000 Subject: [issue29832] Don't refer to getsockaddrarg in error messages In-Reply-To: <1489732997.44.0.201686346308.issue29832@psf.upfronthosting.co.za> Message-ID: <1489783811.45.0.48671708067.issue29832@psf.upfronthosting.co.za> Oren Milman added the comment: note that #15988 also left 3 changes for this issue to fix, as can be seen by searching for '29832' in the comments of PR 668. for example, this issue should also fix the following inconsistent error messages: >>> socket.socket(family=socket.AF_INET6).bind(('::1', -1)) Traceback (most recent call last): File "", line 1, in OverflowError: getsockaddrarg: port must be 0-65535. >>> socket.socket(family=socket.AF_INET6).bind(('::1', -1 << 1000)) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C long ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 16:56:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 20:56:36 +0000 Subject: [issue29841] errors raised by bytes and bytearray constructors for invalid size argument In-Reply-To: <1489782795.95.0.350894370649.issue29841@psf.upfronthosting.co.za> Message-ID: <1489784196.05.0.296585862648.issue29841@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I worked on this issue. The simplest solution is calling PyNumber_AsSsize_t() with NULL rather than PyExc_OverflowError in bytes and bytearray constructors. Then both constructors will raise ValueError for large negative size and bytearray() will raise MemoryError for large positive size. For raising MemoryError in bytes() we should change OverflowError to MemoryError in other place. But this is not the only difference between bytes and bytearray. >>> bytearray(b'abcd') * sys.maxsize Traceback (most recent call last): File "", line 1, in MemoryError >>> b'abcd' * sys.maxsize Traceback (most recent call last): File "", line 1, in OverflowError: repeated bytes are too long This looks related and I think that it is worth to change OverflowError to MemoryError in the repetition operation. But 'abcd' * sys.maxsize raises OverflowError too, therefore we should change exception types in str. Concatenation also can raise OverflowError. If change OverflowError to MemoryError in above operations, it should be changed for concatenation too. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:31 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:31 +0000 Subject: [issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None In-Reply-To: <1269807316.51.0.487538621224.issue8256@psf.upfronthosting.co.za> Message-ID: <1489784431.58.0.00234039389991.issue8256@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +577 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:31 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:31 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1489784431.82.0.762812099949.issue27593@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +578 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:31 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:31 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1489784431.94.0.14006102543.issue29572@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +579 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:32 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:32 +0000 Subject: [issue29376] threading._DummyThread.__repr__ raises AssertionError In-Reply-To: <1485385808.95.0.00162143215773.issue29376@psf.upfronthosting.co.za> Message-ID: <1489784432.12.0.381724382373.issue29376@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +581 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:32 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:32 +0000 Subject: [issue28682] Bytes support in os.fwalk() In-Reply-To: <1479029050.5.0.426622691368.issue28682@psf.upfronthosting.co.za> Message-ID: <1489784432.03.0.359944194571.issue28682@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +580 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:32 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:32 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1489784432.22.0.836172148457.issue28856@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:32 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:32 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1489784432.43.0.286523626434.issue9303@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +583 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:32 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:32 +0000 Subject: [issue29463] Add `docstring` field to AST nodes In-Reply-To: <1486390876.35.0.496966996959.issue29463@psf.upfronthosting.co.za> Message-ID: <1489784432.6.0.549737696126.issue29463@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +584 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:32 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:32 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1489784432.83.0.519246906779.issue29723@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +585 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:32 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:32 +0000 Subject: [issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike` In-Reply-To: <1487418512.16.0.401961352482.issue28624@psf.upfronthosting.co.za> Message-ID: <1489784432.94.0.18262389184.issue28624@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:33 +0000 Subject: [issue28231] zipfile does not support pathlib In-Reply-To: <1474445503.11.0.219964117103.issue28231@psf.upfronthosting.co.za> Message-ID: <1489784433.01.0.4233072632.issue28231@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +587 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:33 +0000 Subject: [issue29568] undefined parsing behavior with the old style string formatting In-Reply-To: <1487170382.81.0.823573985019.issue29568@psf.upfronthosting.co.za> Message-ID: <1489784433.11.0.28340596688.issue29568@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:33 +0000 Subject: [issue29139] operator.concat/iconcat could only work if left operand is a sequence In-Reply-To: <1483437510.5.0.880271510583.issue29139@psf.upfronthosting.co.za> Message-ID: <1489784433.37.0.676159659512.issue29139@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +590 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:33 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1489784433.29.0.720992036087.issue29695@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +589 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:33 +0000 Subject: [issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes In-Reply-To: <1488493463.16.0.114641402405.issue29704@psf.upfronthosting.co.za> Message-ID: <1489784433.56.0.195386694178.issue29704@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +592 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:33 +0000 Subject: [issue29271] Task.current_task(None) returns unexpected result In-Reply-To: <1484345484.86.0.127501941011.issue29271@psf.upfronthosting.co.za> Message-ID: <1489784433.46.0.52517718547.issue29271@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +591 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:33 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1489784433.62.0.635054873468.issue29703@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +593 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:33 +0000 Subject: [issue29623] configparser.ConfigParser.read() does not accept Pathlib path as a single argument. In-Reply-To: <1487789335.63.0.00643279339965.issue29623@psf.upfronthosting.co.za> Message-ID: <1489784433.69.0.445449162126.issue29623@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +594 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:33 +0000 Subject: [issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch In-Reply-To: <1487709025.37.0.198613157816.issue29615@psf.upfronthosting.co.za> Message-ID: <1489784433.75.0.364444756199.issue29615@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +595 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:33 +0000 Subject: [issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file. In-Reply-To: <1483059317.41.0.849254662988.issue29110@psf.upfronthosting.co.za> Message-ID: <1489784433.86.0.873373692485.issue29110@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +597 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:33 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1489784433.82.0.428102716902.issue29742@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +596 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:33 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:33 +0000 Subject: [issue28963] Use-after-free in _asyncio_Future_remove_done_callback() of _asynciomodule.c In-Reply-To: <1481657201.46.0.37032067172.issue28963@psf.upfronthosting.co.za> Message-ID: <1489784433.94.0.297461743425.issue28963@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +598 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:34 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:34 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1489784434.01.0.472503568629.issue29619@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +599 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:34 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:34 +0000 Subject: [issue28929] Provide a link from documentation back to its source file In-Reply-To: <1481331536.86.0.539237207001.issue28929@psf.upfronthosting.co.za> Message-ID: <1489784434.15.0.983717493629.issue28929@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +600 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:34 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:34 +0000 Subject: [issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat) In-Reply-To: <1441472893.95.0.412611892234.issue25008@psf.upfronthosting.co.za> Message-ID: <1489784434.44.0.437415579151.issue25008@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +603 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:34 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:34 +0000 Subject: [issue24037] Argument Clinic: add the boolint converter In-Reply-To: <1429785188.86.0.806042190219.issue24037@psf.upfronthosting.co.za> Message-ID: <1489784434.23.0.215205423174.issue24037@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:34 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:34 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1489784434.36.0.263008837502.issue20087@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +602 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:34 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:34 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1489784434.58.0.00798252669603.issue28298@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +604 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:34 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:34 +0000 Subject: [issue28692] gettext: deprecate selecting plural form by fractional numbers In-Reply-To: <1479148679.54.0.229445108959.issue28692@psf.upfronthosting.co.za> Message-ID: <1489784434.68.0.350721426603.issue28692@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:34 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:34 +0000 Subject: [issue22807] uuid.uuid1() should use uuid_generate_time_safe() if available In-Reply-To: <1415304446.34.0.331764401827.issue22807@psf.upfronthosting.co.za> Message-ID: <1489784434.8.0.899267226187.issue22807@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +606 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:34 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:34 +0000 Subject: [issue29347] Python could crash while creating weakref for a given object In-Reply-To: <1485141841.25.0.0993319189306.issue29347@psf.upfronthosting.co.za> Message-ID: <1489784434.89.0.390132490631.issue29347@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +607 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:34 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:34 +0000 Subject: [issue28518] execute("begin immediate") throwing OperationalError In-Reply-To: <1477307118.31.0.70785963389.issue28518@psf.upfronthosting.co.za> Message-ID: <1489784434.97.0.791577221489.issue28518@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +608 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:35 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:35 +0000 Subject: [issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc In-Reply-To: <1462256356.96.0.954300432794.issue26915@psf.upfronthosting.co.za> Message-ID: <1489784435.15.0.458509282786.issue26915@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +609 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:35 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:35 +0000 Subject: [issue29534] _decimal difference with _pydecimal In-Reply-To: <1486821255.04.0.156424545638.issue29534@psf.upfronthosting.co.za> Message-ID: <1489784435.26.0.314856978408.issue29534@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +610 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:35 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:35 +0000 Subject: [issue29579] Windows Python 3.7 installer broken by README.txt renamed to README.rst In-Reply-To: <1487238516.39.0.726696732648.issue29579@psf.upfronthosting.co.za> Message-ID: <1489784435.35.0.182356959282.issue29579@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +611 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:35 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:35 +0000 Subject: [issue29532] functools.partial is not compatible between 2.7 and 3.5 In-Reply-To: <1486797601.63.0.771798059735.issue29532@psf.upfronthosting.co.za> Message-ID: <1489784435.45.0.0995048313085.issue29532@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +612 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:35 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:35 +0000 Subject: [issue29607] Broken stack_effect for CALL_FUNCTION_EX In-Reply-To: <1487620239.38.0.547704987013.issue29607@psf.upfronthosting.co.za> Message-ID: <1489784435.54.0.884158024452.issue29607@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +613 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:35 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:35 +0000 Subject: [issue29684] Minor regression in PyEval_CallObjectWithKeywords() In-Reply-To: <1488360000.25.0.226175161117.issue29684@psf.upfronthosting.co.za> Message-ID: <1489784435.61.0.148554613332.issue29684@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +614 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:35 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:35 +0000 Subject: [issue29546] A more helpful ImportError message In-Reply-To: <1487003411.13.0.404377957211.issue29546@psf.upfronthosting.co.za> Message-ID: <1489784435.67.0.132695479983.issue29546@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +615 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:35 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:35 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> Message-ID: <1489784435.79.0.680314361957.issue29714@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +616 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:35 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:35 +0000 Subject: [issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc In-Reply-To: <1488358332.92.0.449242887398.issue29683@psf.upfronthosting.co.za> Message-ID: <1489784435.87.0.325568629424.issue29683@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +617 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:35 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:35 +0000 Subject: [issue29576] Improve some deprecations in the importlib In-Reply-To: <1487208454.1.0.000568467436348.issue29576@psf.upfronthosting.co.za> Message-ID: <1489784435.92.0.0373687299029.issue29576@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +618 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:36 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:36 +0000 Subject: [issue28598] RHS not consulted in `str % subclass_of_str` case. In-Reply-To: <1478180164.76.0.63576586286.issue28598@psf.upfronthosting.co.za> Message-ID: <1489784436.0.0.311094374467.issue28598@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:36 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:36 +0000 Subject: [issue29438] use after free in key sharing dict In-Reply-To: <1486169576.7.0.502230969893.issue29438@psf.upfronthosting.co.za> Message-ID: <1489784436.17.0.174597968644.issue29438@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +621 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:36 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:36 +0000 Subject: [issue29602] complex() on object with __complex__ function loses sign of zero imaginary part In-Reply-To: <1487551792.12.0.674027934311.issue29602@psf.upfronthosting.co.za> Message-ID: <1489784436.08.0.550102448117.issue29602@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +620 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:36 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:36 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1489784436.32.0.875738728885.issue26121@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +622 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:36 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:36 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1489784436.39.0.722250843771.issue29800@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +623 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:36 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:36 +0000 Subject: [issue28893] Make sure exceptions raised in __aiter__ are properly chained in ceval In-Reply-To: <1481085693.53.0.293766364883.issue28893@psf.upfronthosting.co.za> Message-ID: <1489784436.47.0.875150274232.issue28893@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +624 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:36 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:36 +0000 Subject: [issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator In-Reply-To: <1264337326.51.0.913533963705.issue7769@psf.upfronthosting.co.za> Message-ID: <1489784436.56.0.881076310767.issue7769@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +625 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:00:36 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:00:36 +0000 Subject: [issue29645] webbrowser module import has heavy side effects In-Reply-To: <1488014818.45.0.347439137836.issue29645@psf.upfronthosting.co.za> Message-ID: <1489784436.72.0.141024193572.issue29645@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +626 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:05:13 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:05:13 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1489784713.33.0.932166356562.issue27593@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: -578 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:05:32 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:05:32 +0000 Subject: [issue28682] Bytes support in os.fwalk() In-Reply-To: <1479029050.5.0.426622691368.issue28682@psf.upfronthosting.co.za> Message-ID: <1489784732.08.0.703368153499.issue28682@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: -580 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:05:44 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:05:44 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1489784744.0.0.904521987047.issue9303@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: -583 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:05:56 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:05:56 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1489784756.05.0.806853782129.issue29703@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: -593 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:06:07 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:06:07 +0000 Subject: [issue29568] undefined parsing behavior with the old style string formatting In-Reply-To: <1487170382.81.0.823573985019.issue29568@psf.upfronthosting.co.za> Message-ID: <1489784767.59.0.179464433597.issue29568@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: -588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:06:24 2017 From: report at bugs.python.org (Larry Hastings) Date: Fri, 17 Mar 2017 21:06:24 +0000 Subject: [issue24037] Argument Clinic: add the boolint converter In-Reply-To: <1429785188.86.0.806042190219.issue24037@psf.upfronthosting.co.za> Message-ID: <1489784784.02.0.774813928839.issue24037@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: -601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:09:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 21:09:22 +0000 Subject: [issue28876] bool of large range raises OverflowError In-Reply-To: <1480930662.45.0.497603219066.issue28876@psf.upfronthosting.co.za> Message-ID: <1489784962.17.0.00024044312714.issue28876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In issue29840 proposed an alternate and more general solution. But I think that nb_bool should be implemented for range objects since issue29840 is 3.7 only and nb_bool is faster. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:11:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 21:11:46 +0000 Subject: [issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None In-Reply-To: <1269807316.51.0.487538621224.issue8256@psf.upfronthosting.co.za> Message-ID: <1489785106.52.0.973683994629.issue8256@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:13:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 21:13:55 +0000 Subject: [issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch In-Reply-To: <1487709025.37.0.198613157816.issue29615@psf.upfronthosting.co.za> Message-ID: <1489785235.54.0.473262169421.issue29615@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:18:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 17 Mar 2017 21:18:08 +0000 Subject: [issue24037] Argument Clinic: add the boolint converter In-Reply-To: <1429785188.86.0.806042190219.issue24037@psf.upfronthosting.co.za> Message-ID: <1489785488.18.0.731153348309.issue24037@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 17:30:17 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 17 Mar 2017 21:30:17 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1489786217.29.0.557796381443.issue20087@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: The main purpose of the alias table is to support normalization and this is used for getdefaultencoding() which was created to be able to determine the default encoding based on what X.org uses as default without doing temporary setlocale() tricks. Now, normalization also happens when passing a locale value to the underlying setlocale(), mainly to avoid many common bugs due to setlocale() being extremely picky about the locale value. A side effect of this is that normalization will also kick in to add the encoding in case no encoding is given in the parameter. Note that no normalization is necessary to simply set the configured default locale configured on the system. In such a case, you'd run setlocale('LC_ALL') and get what's configured. If you run the lib C setlocale() with a locale without encoding, the encoding used by the system entirely on what's configured on the system. The SUPPORTED file only gives a hint at what glibc think it should install per default, but any admin or distributor could change these settings simply by running localedef with some other encoding (charmap in locale speak). I suppose that we could resolve some of the confusion by adding a parameter to disable this normalization in setlocale(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 21:09:13 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 18 Mar 2017 01:09:13 +0000 Subject: [issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__ In-Reply-To: <1489597569.75.0.0334116955024.issue29822@psf.upfronthosting.co.za> Message-ID: <1489799353.21.0.49222784991.issue29822@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Serhiy, sorry for a distraction, but it looks like here is one more situation where inspect.isabstract is problematic, similar to what was discussed in http://bugs.python.org/issue29638 recently. ---------- nosy: +levkivskyi, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 21:32:56 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 18 Mar 2017 01:32:56 +0000 Subject: [issue29842] Executor.map should not submit all futures prior to yielding any results Message-ID: <1489800776.56.0.575396558681.issue29842@psf.upfronthosting.co.za> New submission from Josh Rosenberg: As currently implemented, Executor.map is not particularly lazy. Specifically, if given huge argument iterables, it will not begin yielding results until all tasks have been submitted; if given an infinite input iterable, it will run out of memory before yielding a single result. This makes it unusable as a drop in replacement for plain map, which, being lazy, handles infinite iterables just fine, and produces results promptly. Proposed change makes Executor.map begin yielding results for large iterables without submitting every task up front. As a reasonable default, I have it submit a number of tasks equal to twice the number of workers, submitting a new task immediately after getting results for the next future in line, before yielding the result (to ensure the number of outstanding futures stays constant). A new keyword-only argument, prefetch, is provided to explicitly specify how many tasks should be queued above and beyond the number of workers. Working on submitting pull request now. ---------- components: Library (Lib) messages: 289789 nosy: josh.r priority: normal severity: normal status: open title: Executor.map should not submit all futures prior to yielding any results versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 22:13:29 2017 From: report at bugs.python.org (Roundup Robot) Date: Sat, 18 Mar 2017 02:13:29 +0000 Subject: [issue29842] Executor.map should not submit all futures prior to yielding any results In-Reply-To: <1489800776.56.0.575396558681.issue29842@psf.upfronthosting.co.za> Message-ID: <1489803209.16.0.3510986325.issue29842@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 22:17:50 2017 From: report at bugs.python.org (Mark Becwar) Date: Sat, 18 Mar 2017 02:17:50 +0000 Subject: [issue29734] nt._getfinalpathname handle leak In-Reply-To: <1488799617.7.0.144245331277.issue29734@psf.upfronthosting.co.za> Message-ID: <1489803470.45.0.682352260231.issue29734@psf.upfronthosting.co.za> Changes by Mark Becwar : ---------- pull_requests: +628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 22:18:42 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 18 Mar 2017 02:18:42 +0000 Subject: [issue29842] Executor.map should not submit all futures prior to yielding any results In-Reply-To: <1489800776.56.0.575396558681.issue29842@psf.upfronthosting.co.za> Message-ID: <1489803522.52.0.14359495013.issue29842@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Nosying folks suggested by GitHub, hope that's the right etiquette. For the record, filled out contributor agreement ages ago, but hadn't linked (or even created) GitHub account until after I got the warning. I've linked this account to my GitHub username now, hope that's sufficient. ---------- nosy: +bquinlan, ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 22:34:28 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 18 Mar 2017 02:34:28 +0000 Subject: [issue20104] expose posix_spawn(p) In-Reply-To: <1489776577.7.0.530513240047.issue20104@psf.upfronthosting.co.za> Message-ID: Gregory P. Smith added the comment: All I'm really saying is that someone who wants this should provide a patch/PR with unittests. :) I can help review and go from there. It does make sense to me for it to be available as part of the subprocess API if it is available at all, likely an alternative implementation of or behavior flag to _posixsubprocess.fork_exec() with appropriate autoconf and conditional compilation based on availability ifdefs. On Fri, Mar 17, 2017 at 11:49 AM John Jones wrote: > > John Jones added the comment: > > I agree with everything you're saying Gregory, however I don't think the > significance of the memory doubling is as inconsequential as you might > first think. For example, i have on my 64bit Linux system 128Gb of RAM, and > a numpy table that's around 70Gb. Spawning a subprocess, even though memory > is doubled for a very short period of time, is enough to raise a > MemoryError, despite the subprocess i'm spawning using only 2 or 3Mb after > the exec(). > > I do appreciate that for most Python users however, they will not see much > benefit from what I imagine is quite a lot of development work. > > FWIW, I did try the posix_spawn module, but i couldn't figure out how to > write data to the stdin of a posix_spawn subprocess, and gave up in place > of the commonly recommended solution to this problem (via StackExchange) of > spawning lots of subprocesses before you put stuff in memory. Fortunately, > for my problem, this was a possible solution. For others I think they're > going to have to use posix_spawn, or an entirely different programming > language if that doesn't work. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 17 23:52:32 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 Mar 2017 03:52:32 +0000 Subject: [issue29139] operator.concat/iconcat could only work if left operand is a sequence In-Reply-To: <1483437510.5.0.880271510583.issue29139@psf.upfronthosting.co.za> Message-ID: <1489809152.64.0.51314977415.issue29139@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think it is too late in the game to change the semantics of this function. Changing it now will only break code. The time for API discussion is before a release, not after. Also, we have no indication from actual users that there is an actual problem here. ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 01:38:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 05:38:56 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1489815536.5.0.711597152382.issue29638@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 01:46:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 05:46:49 +0000 Subject: [issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__ In-Reply-To: <1489597569.75.0.0334116955024.issue29822@psf.upfronthosting.co.za> Message-ID: <1489816009.02.0.263897815955.issue29822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is this an alternate fix of issue29638? ---------- components: +Library (Lib) nosy: +yselivanov stage: -> patch review type: -> behavior versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 02:26:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 06:26:19 +0000 Subject: [issue29139] operator.concat/iconcat could only work if left operand is a sequence In-Reply-To: <1483437510.5.0.880271510583.issue29139@psf.upfronthosting.co.za> Message-ID: <1489818379.06.0.394543802643.issue29139@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -590 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 02:31:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 06:31:35 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1489818695.11.0.945463839971.issue20087@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -602 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 02:32:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 06:32:17 +0000 Subject: [issue28692] gettext: deprecate selecting plural form by fractional numbers In-Reply-To: <1479148679.54.0.229445108959.issue28692@psf.upfronthosting.co.za> Message-ID: <1489818737.63.0.187140853302.issue28692@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 02:32:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 06:32:45 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1489818765.67.0.0893842665721.issue29619@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -599 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 02:33:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 06:33:22 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1489818802.28.0.64639957543.issue29572@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -579 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 03:04:13 2017 From: report at bugs.python.org (Nate Soares) Date: Sat, 18 Mar 2017 07:04:13 +0000 Subject: [issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__ In-Reply-To: <1489597569.75.0.0334116955024.issue29822@psf.upfronthosting.co.za> Message-ID: <1489820653.24.0.86805135766.issue29822@psf.upfronthosting.co.za> Nate Soares added the comment: I didn't know about issue29638, and I'm not sure whether my PR fixes it. Looking at that bug, I don't think that my PR would fix it, because I still trust TPFLAGS_IS_ABSTRACT when __abstractmethods__ exists. That said, I'm not clear on how the cache works, so it's possible that my PR would fix 29638. My issue appears when one uses py3.6's new __init_subclass__ hook with an ABC. __init_subclass__ is run by type.__new__, which means that, as of py3.6, users can (in a natural/reasonable way) inspect ABCMeta classes before ABCMeta.__new__ finishes executing. I didn't see any reasonable way to have ABCMeta.__new__ finish setting up the ABC before calling super().__new__, so I figured the fix should go into inspect.isabstract. But there may be better solutions I just didn't think of. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 03:41:08 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 Mar 2017 07:41:08 +0000 Subject: [issue29833] Avoid raising OverflowError if possible In-Reply-To: <1489739461.89.0.615647789001.issue29833@psf.upfronthosting.co.za> Message-ID: <1489822868.9.0.0537736384043.issue29833@psf.upfronthosting.co.za> Raymond Hettinger added the comment: IIRC, there have been previous discussions about little inconsistencies between when objects raise an OverflowError versus MemoryError and IndexError, and ValueError. I believe that Guido had opined that the choices were made somewhat arbitrarily (by different people at different times) but that it hadn't proved to be an actual problem in practice and that changing exception types after an API has already been released is more disruptive to users (potentially breaking existing, tested code) than living with the minor inconsistencies. Guido, do you want these exceptions changed and do you agree with the Serhiy's new principles? My own thoughts are: * As a starting point, it seems reasonable to want consistent errors across ranges of input values. And being more predictable is a virtue as well. * Changing existing APIs is disruptive, making it more difficult to maintain cross-version code, breaking existing code or tests that use the current exceptions, and creating unnecessary work for Jython, IronPython, and PyPy who would have to follow our myriad of little changes. * Personally, I find OverflowError to be more self-explanatory of the cause of an exception than MemoryError which is more jarring and seemingly indicative of inadequate memory. * Likewise, Overflow error is more precise and helpful than ValueError which is very generic, covering a wide variety of problems. * A lot of third-party tools have evolved over time that mimic the behaviors of built-in types. If we change those behaviors now, the ecosystem will likely never fully sync-up. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 04:04:19 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 Mar 2017 08:04:19 +0000 Subject: [issue29834] Raise ValueError rather of OverflowError in PyLong_AsUnsignedLong() In-Reply-To: <1489740299.73.0.174810615045.issue29834@psf.upfronthosting.co.za> Message-ID: <1489824259.27.0.870750135288.issue29834@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Strong -1 on this. For zero benefit, this breaks everything (within Python and third-party code) that ever relied on the documented behavior , https://docs.python.org/3/c-api/long.html#c.PyLong_AsUnsignedLong . The cause perfectly fits the definition of an OverflowError: class OverflowError(ArithmeticError) | Result too large to be represented. The time to challenge API design decisions is when they are created, not after they've been published and relied upon for over decade. Also, we really don't everyone who writes cross-platform code and tests to have to catch both exceptions because they don't know which version is being run. This creates yet another barrier to upgrading Python and as far as I can tell isn't solving any reported user problem. Instead, it is second-guessing design decisions made long ago. ---------- nosy: +gvanrossum, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 04:10:43 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 Mar 2017 08:10:43 +0000 Subject: [issue29834] Raise ValueError rather of OverflowError in PyLong_AsUnsignedLong() In-Reply-To: <1489740299.73.0.174810615045.issue29834@psf.upfronthosting.co.za> Message-ID: <1489824643.69.0.207877278324.issue29834@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Looking back in time, this API isn't as old as I thought. The other concerns about breaking a published API still stand. ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 05:01:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 09:01:27 +0000 Subject: [issue29834] Raise ValueError rather of OverflowError in PyLong_AsUnsignedLong() In-Reply-To: <1489740299.73.0.174810615045.issue29834@psf.upfronthosting.co.za> Message-ID: <1489827687.14.0.571940989593.issue29834@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: _Py_Uid_Converter() in Modules/posixmodule.c is not an example because it calls PyLong_AsUnsignedLong() only for positive integers > LONG_MAX. PyLong_AsUnsignedLong() is used not much. The motivation of this issue was that if use PyLong_AsUnsignedLong() for converting non-negative by its nature values ValueError can be more appropriate since this limitation is not platform or implementation dependent. Strictly speaking raising OverflowError for negative values doesn't fits the definition of an OverflowError, since the result is not large at all. I was going to investigate all usages of PyLong_AsUnsignedLong() and if in majority of them ValueError is appropriate and desirable, changing the exception type at that level can make the implementation simpler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 05:11:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 09:11:28 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489828288.11.0.741235362326.issue15988@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: it is hard to discuss such large patch on GitHub since diffs and comments to all files are shown on one page. Rietveld is more appropriate since it shows only one file at the time. I suggest you Oren to provide the next version of your patch as a patch for reviewing on Rietveld and make PRs only for ready patches. Even after withdrawing some changes or extracting them as separate issues the patch can be too large. I suggest to commit first the part that relates to PyArg_Parse* ang PyLong_As*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 05:56:32 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 18 Mar 2017 09:56:32 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute Message-ID: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> New submission from Oren Milman: With regard to ctypes.Array: currently: >>> from ctypes import * >>> class T(Array): ... _type_ = c_int ... _length_ = -1 ... Traceback (most recent call last): File "", line 1, in OverflowError: array too large >>> class T(Array): ... _type_ = c_int ... _length_ = -1 << 1000 ... Traceback (most recent call last): File "", line 1, in OverflowError: The '_length_' attribute is too large Obviously, here the _length_ attribute is too small, not too large. Thus, the error messages should be changed to be more accurate (optimally, for any negative _length_, the error message should be the same). Moreover, in accordance with #29833 (this is a sub-issue of #29833), ValueError should be raised for any negative _length_ attribute (instead of OverflowError). Also, Note that currently, in case _length_ == 0, no error is raised. ISTM that a ctypes Array of length 0 is useless, so maybe we should raise a ValueError in this case too? ---------- components: ctypes messages: 289800 nosy: Oren Milman, serhiy.storchaka priority: normal severity: normal status: open title: errors raised by ctypes.Array for invalid _length_ attribute type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 06:03:53 2017 From: report at bugs.python.org (Paul "TBBle" Hampson) Date: Sat, 18 Mar 2017 10:03:53 +0000 Subject: [issue29844] Windows Python installers not installing DLL to System32/SysWOW64 Message-ID: <1489831433.22.0.028475249754.issue29844@psf.upfronthosting.co.za> New submission from Paul "TBBle" Hampson: As noted in https://github.com/python/cpython/tree/master/Tools/msi === When installed for all users, the following files are installed to either "%SystemRoot%\System32" or "%SystemRoot%\SysWOW64" as appropriate. For the current user, they are installed in the Python install directory. .\python3x.dll The core interpreter .\python3.dll The stable ABI reference === However, at least with the Python 3.5.3 and Python 3.6.0 installers from the official download page, even an all-users install puts the relevant DLLs in the installation directory instead. This is the both with the command-line option and checking the relevant box during installation. I've also confirmed that it happens whether you add Python to the path or not. The latter is my use-case as I have multiple versions of Python installed and use the Python Launcher for Windows to select a version to run or virtualenv to build. Looking at the source, I suspect this feature was completely lost when the MSI build system was rewritten in commit https://github.com/python/cpython/commit/bb24087a2cbfb186b540cc71a74ec8c39c1ebe3a (formerly https://hg.python.org/cpython/rev/e7dbef447157) for issue #23260 which removed all references to SystemFolder or System64Folder ---------- messages: 289801 nosy: TBBle priority: normal severity: normal status: open title: Windows Python installers not installing DLL to System32/SysWOW64 versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 06:04:31 2017 From: report at bugs.python.org (Paul "TBBle" Hampson) Date: Sat, 18 Mar 2017 10:04:31 +0000 Subject: [issue29844] Windows Python installers not installing DLL to System32/SysWOW64 In-Reply-To: <1489831433.22.0.028475249754.issue29844@psf.upfronthosting.co.za> Message-ID: <1489831471.9.0.75322859757.issue29844@psf.upfronthosting.co.za> Changes by Paul "TBBle" Hampson : ---------- components: +Installation type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 06:14:45 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 18 Mar 2017 10:14:45 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1489832085.96.0.495069322992.issue29843@psf.upfronthosting.co.za> Oren Milman added the comment: A patch draft (which doesn't change anything about the case of _length_ == 0) is attached. (I am not opening a PR, because I am not sure the behavior change would be accepted.) I ran the test module on my Windows 10, and it seems the patch doesn't break anything. ---------- keywords: +patch Added file: http://bugs.python.org/file46732/patchDraft1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 06:18:32 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 10:18:32 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1489832312.73.0.89324249618.issue29116@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 06:19:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 10:19:45 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1489832385.09.0.190362765342.issue29116@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +630 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 06:25:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 10:25:36 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1489832736.7.0.73648731506.issue29116@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 709 fixes the order of types for concatenating bytes and and bytearray. b''+0 will raise "can't concat str to bytes" rather than "can't concat bytes to str". PR 710 makes error message for str concatenation more informative and similar to error messages for list, tuple, deque, array. '' + b'' will raise "can only concatenate str (not "bytes") to str" rather than "must be str, not bytes". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 06:50:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 10:50:10 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1489834210.56.0.678231889326.issue29843@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM, but I prefer `overflow > 0` over `overflow == 1`. If use _testcapi the tests should be decorated with cpython_only. But I think that it is better to not use it. Limiting _length_ to C long (rather than size_t) is an implementation detail. The test with _length_ = 1 << 1000 should be enough. ---------- nosy: +amaury.forgeotdarc, belopolsky, meador.inge stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 07:01:00 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 18 Mar 2017 11:01:00 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1489834860.7.0.899712299935.issue29843@psf.upfronthosting.co.za> Oren Milman added the comment: "If use _testcapi the tests should be decorated with cpython_only." at first, I thought so too, but then I searched for 'cpython_only' in Lib/ctypes/test, and found nothing. then I searched for '_testcapi' there, and found a top level 'import _testcapi' in Lib/ctypes/test/test_structures.py, and a test using _testcapi.INT_MAX. so I assumed that test_ctypes itself is cpython_only. should test_structures.py be changed, then? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 07:06:32 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 18 Mar 2017 11:06:32 +0000 Subject: [issue29844] Windows Python installers not installing DLL to System32/SysWOW64 In-Reply-To: <1489831433.22.0.028475249754.issue29844@psf.upfronthosting.co.za> Message-ID: <1489835192.35.0.985415544254.issue29844@psf.upfronthosting.co.za> Eryk Sun added the comment: 3.5+ doesn't install files to system directories -- except the py launcher in %SystemRoot%. This was an intentional change, so I'm flagging this as a documentation issue. ---------- assignee: -> docs at python components: +Documentation, Windows keywords: +easy nosy: +docs at python, eryksun, paul.moore, steve.dower, tim.golden, zach.ware stage: -> needs patch versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 07:07:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 11:07:00 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1489835220.24.0.465141224044.issue29843@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suggest just remove the test with LONG_MAX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 07:19:23 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 18 Mar 2017 11:19:23 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1489835963.59.0.669699379483.issue29843@psf.upfronthosting.co.za> Oren Milman added the comment: yes, you are right, of course. but regardless of this issue, shouldn't test_structures.py be changed (in a seperate issue)? ISTM it has a cpython-specific test not decorated in @cpython_only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 07:22:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 11:22:04 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1489836124.84.0.606025597595.issue29843@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm working on this. Right now I'm searching other tests that use _testcapi without guards. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 07:41:18 2017 From: report at bugs.python.org (Mark Becwar) Date: Sat, 18 Mar 2017 11:41:18 +0000 Subject: [issue29734] nt._getfinalpathname handle leak In-Reply-To: <1488799617.7.0.144245331277.issue29734@psf.upfronthosting.co.za> Message-ID: <1489837278.46.0.440001429773.issue29734@psf.upfronthosting.co.za> Changes by Mark Becwar : ---------- pull_requests: -628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 09:12:06 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 18 Mar 2017 13:12:06 +0000 Subject: [issue28980] ResourceWarning when imorting antigravity in 3.6 In-Reply-To: <1481814216.83.0.890338512389.issue28980@psf.upfronthosting.co.za> Message-ID: <1489842726.62.0.945442639984.issue28980@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: It looks like this is fixed on master, but the problem still appears on 3.6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 09:23:59 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 18 Mar 2017 13:23:59 +0000 Subject: [issue21253] unittest assertSequenceEqual can lead to Difflib.compare() crashing on mostly different sequences In-Reply-To: <1397663686.19.0.71446048811.issue21253@psf.upfronthosting.co.za> Message-ID: <1489843439.03.0.523784379394.issue21253@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 09:39:06 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 18 Mar 2017 13:39:06 +0000 Subject: [issue24796] Deleting names referencing from enclosed and enclosing scopes In-Reply-To: <1438779917.48.0.0299421063838.issue24796@psf.upfronthosting.co.za> Message-ID: <1489844346.41.0.468987184655.issue24796@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: It looks like it is safe to just remove this line from docs. This code >>> x = 1 >>> def f(): ... global x ... del x ... >>> f() >>> x Works as expected, i.e. raises NameError. (The same happens for nonlocal but with UnboundLocalError.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 09:52:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 13:52:21 +0000 Subject: [issue29845] Mark tests that use _testcapi as CPython-only Message-ID: <1489845141.37.0.776933976205.issue29845@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Most tests that use _testcapi are optional or marked as CPython-only. But there are few tests that aren't. Proposed patch fixes this. ---------- components: Tests messages: 289812 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Mark tests that use _testcapi as CPython-only type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 09:54:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 13:54:07 +0000 Subject: [issue29845] Mark tests that use _testcapi as CPython-only In-Reply-To: <1489845141.37.0.776933976205.issue29845@psf.upfronthosting.co.za> Message-ID: <1489845247.05.0.729438522137.issue29845@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +631 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 09:55:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 13:55:15 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1489845315.42.0.967719384161.issue29843@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Opened issue29845 for _testcapi issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 09:57:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 13:57:08 +0000 Subject: [issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__ In-Reply-To: <1489597569.75.0.0334116955024.issue29822@psf.upfronthosting.co.za> Message-ID: <1489845428.97.0.266858391008.issue29822@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 10:19:41 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 18 Mar 2017 14:19:41 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489846781.34.0.117439028036.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: Here is a patch including only changes related to PyLong_As* and PyArg_Parse* functions. (I ran the test module, and on my Windows 10, the same tests failed with and without my patches. However, on my Ubuntu 16.04 VM, none of the tests failed.) ---------- Added file: http://bugs.python.org/file46733/PyLong_As_and_PyArg_Parse_patchVer1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 10:35:10 2017 From: report at bugs.python.org (Adam Stewart) Date: Sat, 18 Mar 2017 14:35:10 +0000 Subject: [issue29846] ImportError: No module named _io Message-ID: <1489847707.41.0.897250288335.issue29846@psf.upfronthosting.co.za> New submission from Adam Stewart: I'm trying to build Python 2.7.13 with clang on macOS 10.12.3 with the Spack package manager, but it fails to build the _io module. The exact error message from the build log can be seen here: https://github.com/LLNL/spack/issues/3478#issuecomment-287548431 This only seems to occur for me on macOS; I can't reproduce it on Linux. I checked my environment, but I don't have any Python-related environment variables, nor do I have any variables like DYLD_LIBRARY_PATH set that could cause problems. I'm a developer for the Spack package manager, so any problems that you help me solve will greatly benefit our community. I have attached the build log. Please let me know if there is any more information I can provide you with. ---------- components: Build files: spack-build.out messages: 289815 nosy: ajstewart priority: normal severity: normal status: open title: ImportError: No module named _io type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file46734/spack-build.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 10:37:15 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 18 Mar 2017 14:37:15 +0000 Subject: [issue29844] Windows Python installers not installing DLL to System32/SysWOW64 In-Reply-To: <1489831433.22.0.028475249754.issue29844@psf.upfronthosting.co.za> Message-ID: <1489847835.86.0.776764172041.issue29844@psf.upfronthosting.co.za> Steve Dower added the comment: I don't even think there's documentation to fix, the install page should say where things are installed. The system directory is for the system to install files - the Python installer is not a system component, it's a developer kit. For most cases, the install directory was "fixed" rather than broken. If you have particular needs to install a system-wide python3x.dll, I'd suggest crafting your own install script from the files in a normal install (though putting the install directory on PATH should also enable dependency resolution for most processes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 11:22:47 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Sat, 18 Mar 2017 15:22:47 +0000 Subject: [issue29847] Path takes and ignores **kwargs Message-ID: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> New submission from Jelle Zijlstra: pathlib.Path.__new__ takes **kwargs, but doesn't do anything with them (https://github.com/python/cpython/blob/master/Lib/pathlib.py#L979). This doesn't appear to be documented. This feature should presumably be either documented or removed (probably removed unless I'm missing some reason for having it). Brief discussion on a typeshed PR at https://github.com/python/typeshed/pull/991#discussion-diff-105813974R100 ---------- messages: 289817 nosy: Jelle Zijlstra, pitrou priority: normal severity: normal status: open title: Path takes and ignores **kwargs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 11:51:37 2017 From: report at bugs.python.org (Decorater) Date: Sat, 18 Mar 2017 15:51:37 +0000 Subject: [issue29848] Cannot use Decorators of the same class that requires an instance of itself to change variables in that class. Message-ID: <1489852297.0.0.839012781566.issue29848@psf.upfronthosting.co.za> New submission from Decorater: So, many people rely on Decorators in class that accepts an instance of itself like so: class ExampleClass: """Example class with an example decorator that cannot be used.""" def __init__(self): self.list_of_items = [] def add_item(self, item): self.list_of_items.append(item) @self.add_item("test_item") def test_item(): print("Example function of ExampleClass that demonstrates the inability to use decorators with self passed to it.") Many people fall for this on classes and then they are like "Why is it not letting me do this?". As such there is got to be a way to somehow support something like this in Python 3.7 as it could be useful on classes like this. The class above is an example, however I know of an library out there that allows you to import from a file and also allows you to use the same thing (that is imported) that would be bound to "self.[whatever it is called in the class]". As such people try to avoid that import and use the one in "self.[whatever it is called in the class]" to try to fit their needs (which ends up failing for them). ---------- messages: 289818 nosy: Decorater priority: normal severity: normal status: open title: Cannot use Decorators of the same class that requires an instance of itself to change variables in that class. versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 12:06:14 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 18 Mar 2017 16:06:14 +0000 Subject: [issue29848] Cannot use Decorators of the same class that requires an instance of itself to change variables in that class. In-Reply-To: <1489852297.0.0.839012781566.issue29848@psf.upfronthosting.co.za> Message-ID: <1489853174.96.0.187389491055.issue29848@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Its not clear what you are asking for here. Do you think the current behaviour is a bug? Are you asking for a new feature? What do you want? When the decorator is called, "self" doesn't exist, so of course @self.decorator *must* fail. What else could it do? Which instance should Python use, if there is no instance that exists yet? You say "many people rely on Decorators in class that accepts an instance of itself", but I doubt that. I've never wanted code like that, and the example you show wouldn't work even if "self" existed. Can you give a better example? Personally, I think this is a good learning experience for programmers, not something that needs to be fixed. Anyone who tries to decorate a method in a class by calling self.method is confused about classes, instances and decorators, and this is a good lesson for them to learn. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 12:21:15 2017 From: report at bugs.python.org (Decorater) Date: Sat, 18 Mar 2017 16:21:15 +0000 Subject: [issue29848] Cannot use Decorators of the same class that requires an instance of itself to change variables in that class. In-Reply-To: <1489852297.0.0.839012781566.issue29848@psf.upfronthosting.co.za> Message-ID: <1489854075.36.0.74724288765.issue29848@psf.upfronthosting.co.za> Decorater added the comment: hmm, I see. Well I was looking for an way to actually be able to use decorators made in the same class to be able to somehow pass in the same instance as well. Currently the only way to use class decorators is for them to be static (which would not allow using or changing variables to the class (or functions in other classes bound to self). So, yeah there is got to be a way to do this, to use an decorator that takes in the same instance of a class. On the other hand they get realize there is a certain way to use classes, decorators, and instances. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 12:53:10 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 18 Mar 2017 16:53:10 +0000 Subject: [issue29694] race condition in pathlib mkdir with flags parents=True In-Reply-To: <1488462813.87.0.464471853988.issue29694@psf.upfronthosting.co.za> Message-ID: <1489855990.94.0.8122830074.issue29694@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: +Library (Lib) nosy: +berker.peksag stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 13:07:02 2017 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 18 Mar 2017 17:07:02 +0000 Subject: [issue29833] Avoid raising OverflowError if possible In-Reply-To: <1489739461.89.0.615647789001.issue29833@psf.upfronthosting.co.za> Message-ID: <1489856822.93.0.82193294854.issue29833@psf.upfronthosting.co.za> Guido van Rossum added the comment: If I had to do it over again I would have used OverflowError only for some very narrowly defined conditions and ValueError for "logical" range limitations. In particular OverflowError suggests that the abstraction is slightly broken (since we usually don't think much about how large an integer fits in a register) while ValueError suggests that the caller passed something of the right type but with an inappropriate value. I'm not too worried about breaking APIs in this case (but that could change if someone finds data showing there are common idioms in actual use that would break). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 13:25:52 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 18 Mar 2017 17:25:52 +0000 Subject: [issue29846] ImportError: No module named _io In-Reply-To: <1489847707.41.0.897250288335.issue29846@psf.upfronthosting.co.za> Message-ID: <1489857952.22.0.933224564605.issue29846@psf.upfronthosting.co.za> Ned Deily added the comment: I'm not familiar with Spack and I'm certainly not going to try to deeply analyze a build that inserts *that* many separate -I and -L options into the compiler calls :) But there have been a number of reports of problems with this symptom in the past (try searching the web) and at least one previous issue opened here (Issue26498). The root cause in all of these is that at some point there is a mismatch between a python executable of one 2.7.x version being dynamically linked at run time with python shared libraries of a different 2.7.x version. While a python build should guard against this happening, often it doesn't matter when such a mismatch occurs. However, there was an incompatibility introduced in the lifetime of 2.7.x involving __PyCodecInfo_GetIncrementalDecoder (I forget the details). My guess is that you will find that the problem goes away if you avoid the use of '--enable-shared' on the Python configure; most Python distributions on macOS use --enable-framework rather than --enable-shared and we seldom test it. Or use neither. You should also check that there are no third-party Python 2.7's on PATH and/or Python 2.7 shared libraries on the dyld library search paths, other than the Apple-supplied pythons in /usr/bin. It would be nice to finally figure out and resolve where the hole is but I've never been able to reproduce the failure myself. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 13:29:21 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 18 Mar 2017 17:29:21 +0000 Subject: [issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS In-Reply-To: <1489847707.41.0.897250288335.issue29846@psf.upfronthosting.co.za> Message-ID: <1489858161.26.0.00324308862998.issue29846@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- title: ImportError: No module named _io -> ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 13:52:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 17:52:51 +0000 Subject: [issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__ In-Reply-To: <1489597569.75.0.0334116955024.issue29822@psf.upfronthosting.co.za> Message-ID: <1489859571.55.0.601782067403.issue29822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM, but would be nice if Yury and Nick take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 14:21:17 2017 From: report at bugs.python.org (Brett Cannon) Date: Sat, 18 Mar 2017 18:21:17 +0000 Subject: [issue29830] pyexpat.errors doesn't have __spec__ and __loader__ set In-Reply-To: <1489703712.88.0.588940526219.issue29830@psf.upfronthosting.co.za> Message-ID: <1489861277.24.0.537408654907.issue29830@psf.upfronthosting.co.za> Brett Cannon added the comment: ExtensionFileLoader.is_package() is accurate because it's not typical for an extension module to inject its own submodules like pyexpat is. Usually people who use an extension module in a package use it just for a submodule and not even as an __init__. IOW there's a long history of built-ins and extensions not being in packages that people bump up against that no one has taken the time to try and straighten out due to it not being an issue on a regular basis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 14:59:56 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 18 Mar 2017 18:59:56 +0000 Subject: [issue29849] fix memory in import_from Message-ID: <1489863596.03.0.14582514818.issue29849@psf.upfronthosting.co.za> New submission from Xiang Zhang: import_from suffer from memory leak since #29546. Propose a PR to fix it. :-) ---------- messages: 289825 nosy: barry, brett.cannon, mbussonn, xiang.zhang priority: normal severity: normal stage: patch review status: open title: fix memory in import_from versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 15:01:48 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 18 Mar 2017 19:01:48 +0000 Subject: [issue29849] fix memory in import_from In-Reply-To: <1489863596.03.0.14582514818.issue29849@psf.upfronthosting.co.za> Message-ID: <1489863708.59.0.715358269807.issue29849@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +632 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 15:16:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 18 Mar 2017 19:16:29 +0000 Subject: [issue29546] A more helpful ImportError message In-Reply-To: <1487003411.13.0.404377957211.issue29546@psf.upfronthosting.co.za> Message-ID: <1489864589.15.0.0358380578665.issue29546@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -615 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 15:24:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 18 Mar 2017 19:24:39 +0000 Subject: [issue29833] Avoid raising OverflowError if possible In-Reply-To: Message-ID: STINNER Victor added the comment: I don't expect that any code rely on OverflowError. I don't remember any code catching explicitly this exception. As MemoryError, it's not common to catch these exceptions. I expect that Python abstract the hardware if the cost on performance is acceptable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 16:12:08 2017 From: report at bugs.python.org (Adam Stewart) Date: Sat, 18 Mar 2017 20:12:08 +0000 Subject: [issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS In-Reply-To: <1489847707.41.0.897250288335.issue29846@psf.upfronthosting.co.za> Message-ID: <1489867928.53.0.623510111226.issue29846@psf.upfronthosting.co.za> Adam Stewart added the comment: > I'm certainly not going to try to deeply analyze a build that inserts *that* many separate -I and -L options into the compiler calls I believe those were necessary to get the build working. Spack doesn't install anything into /usr/, and without those flags, Python doesn't know where to search for its dependencies. I tried removing them anyway but it didn't help. > My guess is that you will find that the problem goes away if you avoid the use of '--enable-shared' on the Python configure Just tried this and it does indeed go away! I can try convincing the other developers that this is the best option. > most Python distributions on macOS use --enable-framework rather than --enable-shared and we seldom test it. I just tried using using `--enable-framework` and `make install` failed. Seeing lots of `ImportError: No module named site` errors. > You should also check that there are no third-party Python 2.7's on PATH and/or Python 2.7 shared libraries on the dyld library search paths, other than the Apple-supplied pythons in /usr/bin. This could very well be the cause of the problem. I happen to have both Python 2 and 3 installed with both Homebrew and Anaconda, and all 4 are in my PATH. I don't have any PYTHON or LD/DYLD related env vars though. If you think it's worth testing, I can try removing everything from my PATH except /usr/bin:/bin ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 16:40:41 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 18 Mar 2017 20:40:41 +0000 Subject: [issue29848] Cannot use Decorators of the same class that requires an instance of itself to change variables in that class. In-Reply-To: <1489852297.0.0.839012781566.issue29848@psf.upfronthosting.co.za> Message-ID: <1489869641.73.0.933916050856.issue29848@psf.upfronthosting.co.za> R. David Murray added the comment: Decorators are called with the decorated *function* objection when the class is compiled. There can be no instance involved by their very nature, since the instance doesn't exist yet. So no, you can't have a decorator that affects instance attributes at the compile step. You *can* have a decorator that *effectively* manipulates instance attributes by returning a wrapper function, which will receive self when called, and can do whatever it wants. There is no bug here, nor any need for a feature. You can already do what you want, you just have to write your decorator correctly. You can even have it as a static method of the class, though I'm not sure I'd consider that good style (but people's opinions on style differ). ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 16:59:08 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 18 Mar 2017 20:59:08 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1489870748.39.0.572226921526.issue29843@psf.upfronthosting.co.za> Oren Milman added the comment: here is the patch updated according to your suggestions, Serhiy. however, I wonder about the case of a too large _length_. shouldn't we raise a MemoryError in such a case, in accordance with #29833? BTW, while inspecting code related to a too large _length_, I came across this (in PyCArrayType_new): if (length * itemsize < 0) { PyErr_SetString(PyExc_OverflowError, "array too large"); goto error; } I am not sure, but isn't this check unsafe? (e.g. if length == 2 ** 30, and itemsize == 4, couldn't the product be 0 on some platforms?) but maybe the code before this check makes more checks. I didn't make a thorough inspection... ---------- Added file: http://bugs.python.org/file46735/patchDraft2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 18:02:19 2017 From: report at bugs.python.org (Gabriel POTTER) Date: Sat, 18 Mar 2017 22:02:19 +0000 Subject: [issue29850] file access, other drives Message-ID: <1489874539.85.0.804795402296.issue29850@psf.upfronthosting.co.za> New submission from Gabriel POTTER: If python 3 is installed on another drive (for instance D:/), then it cannot access any C:/ files, but can access D:/ files. I use: open("C:/path/....") The same function did work under python 2.7 but now doesn't anymore. That means that os.path.isfile, open(file).... do not work. Any help ? ---------- components: Windows messages: 289830 nosy: Gabriel POTTER, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: file access, other drives type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 18:07:02 2017 From: report at bugs.python.org (Gabriel POTTER) Date: Sat, 18 Mar 2017 22:07:02 +0000 Subject: [issue29850] file access, other drives In-Reply-To: <1489874539.85.0.804795402296.issue29850@psf.upfronthosting.co.za> Message-ID: <1489874822.44.0.402621157687.issue29850@psf.upfronthosting.co.za> Gabriel POTTER added the comment: To be precise, i cannot detect (only know if the file exist) any file located in C:/Windows/... (in particulary System32) contrary to Python 2.7 where it was possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 18:09:59 2017 From: report at bugs.python.org (Paul Moore) Date: Sat, 18 Mar 2017 22:09:59 +0000 Subject: [issue29850] file access, other drives In-Reply-To: <1489874539.85.0.804795402296.issue29850@psf.upfronthosting.co.za> Message-ID: <1489874999.13.0.371571649325.issue29850@psf.upfronthosting.co.za> Paul Moore added the comment: Please provide a script reproducing this issue, and precise details of your Python version. It's extremely unlikely that the problem is as broad as you describe, as otherwise we'd have lots of reports of issues. But we'll need a more specific description to pinpoint the actual problem here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 18:48:26 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 18 Mar 2017 22:48:26 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489877306.71.0.379163569202.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: Here is a patch including only changes related to formats using the 'c' specifier. (I ran the test module, and on my Windows 10, the same tests failed with and without my patches. However, on my Ubuntu 16.04 VM, none of the tests failed.) ---------- Added file: http://bugs.python.org/file46736/formats_patchVer1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 20:09:56 2017 From: report at bugs.python.org (Richard Cooper) Date: Sun, 19 Mar 2017 00:09:56 +0000 Subject: [issue29851] importlib.reload references None object Message-ID: <1489882196.37.0.503568145678.issue29851@psf.upfronthosting.co.za> New submission from Richard Cooper: importlib.reload doesn't work; gives an error about NoneType having no name attribute. See attached a simple repo testcase When run it yields the following [disappointing] result. I'm running Python3.0.6.1 (installed from brew) on OSX 10.12.3 ``` iMac:python_package_loader cooper$ python3 bug.py module loaded Traceback (most recent call last): File "bug.py", line 14, in importlib.reload(sys.modules[moduleName]) File "/usr/local/Cellar/python3/3.6.0_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 166, in reload _bootstrap._exec(spec, module) File "", line 589, in _exec AttributeError: 'NoneType' object has no attribute 'name' ``` ---------- components: Library (Lib) files: bug.py messages: 289834 nosy: Richard Cooper priority: normal severity: normal status: open title: importlib.reload references None object type: crash Added file: http://bugs.python.org/file46737/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 20:35:25 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 19 Mar 2017 00:35:25 +0000 Subject: [issue29833] Avoid raising OverflowError if possible In-Reply-To: <1489739461.89.0.615647789001.issue29833@psf.upfronthosting.co.za> Message-ID: <1489883725.36.0.226819653364.issue29833@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I don't expect that any code rely on OverflowError. > ... > As MemoryError, it's not common to catch these exceptions. So why bother making any changes here at all? It seems like an invented problem resulting in unnecessary churn, creating more work for downstream implementations and test suites. It isn't even clear that Python will be any better after the change. One thing I'm strongly against is changing the published C API for things like PyLong_AsUnsignedLong, https://docs.python.org/3/c-api/long.html#c.PyLong_AsUnsignedLong . Also, in the content of converting to and from fixed-width C type, an OverflowError seems like exactly the right error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 18 20:40:35 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 19 Mar 2017 00:40:35 +0000 Subject: [issue29700] readline memory corruption when sys.stdin fd >= FD_SETSIZE for select() In-Reply-To: <1488484095.89.0.988668664064.issue29700@psf.upfronthosting.co.za> Message-ID: <1489884035.49.0.583742088414.issue29700@psf.upfronthosting.co.za> Martin Panter added the comment: Marien?s pull request is for 2.7 and adds two new paths when raw_input is called: * On Linux (actually glibc), use ?poll? rather than ?select? * In other cases, if sys.stdin cannot be used with ?select?, raise ValueError Marien admits that even in the best case, some versions of the Readline library still crash because they use ?select? themselves. Marien: can you identify which versions? Gnu Readline, or the wrapper in Editline? New versions vs superseded versions? Assuming we add some catch-all behaviour like the ValueError, any further parts like the Linux ?poll? implementation seem like new features, and are only appropriate for the next version of Python (3.7 atm). But it seems the bug would be hard to trigger in Python 3, so I doubt the Linux-specific implementation is worthwhile. IMO the simplest solution may be to use one of the existing fallbacks if ?select? is not usable. Either the other readline_until_enter_or_signal implementation (which hooks SIGINT rather than using the callback API), or PyOS_StdioReadline, or the raw_input fallback for non-interactive mode. I would only bother with the complication of ?poll? if there is a strong use-case. Gregory: do you really care if the ?readline? module is used, or would a fallback like PyOS_StdioReadline be fine in your case (which is used if you never import the ?readline? module)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 00:21:30 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 19 Mar 2017 04:21:30 +0000 Subject: [issue29849] fix memory leak in import_from In-Reply-To: <1489863596.03.0.14582514818.issue29849@psf.upfronthosting.co.za> Message-ID: <1489897290.28.0.854118929606.issue29849@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- title: fix memory in import_from -> fix memory leak in import_from _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 00:49:43 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 19 Mar 2017 04:49:43 +0000 Subject: [issue29850] file access, other drives In-Reply-To: <1489874539.85.0.804795402296.issue29850@psf.upfronthosting.co.za> Message-ID: <1489898983.1.0.350538084015.issue29850@psf.upfronthosting.co.za> Eryk Sun added the comment: When you say "to be precise...C:/Windows/...System32", do you mean that this is the only directory that you've tested? If so, what you're seeing may be WOW64 file-system redirection, if your 2.7 installation is 64-bit and 3.6 installation is 32-bit, or vice versa. In a WOW64 process, accessing the %SystemRoot%\System32 directory in most cases gets redirected to the 32-bit system directory, %SystemRoot%\SysWOW64. You can access the native system directory via %SystemRoot%\SysNative. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 01:19:12 2017 From: report at bugs.python.org (Paul "TBBle" Hampson) Date: Sun, 19 Mar 2017 05:19:12 +0000 Subject: [issue29844] Windows Python installers not installing DLL to System32/SysWOW64 In-Reply-To: <1489831433.22.0.028475249754.issue29844@psf.upfronthosting.co.za> Message-ID: <1489900752.88.0.136219078135.issue29844@psf.upfronthosting.co.za> Paul "TBBle" Hampson added the comment: If this is just a documentation fix, then there's two places that need it: * https://github.com/python/cpython/blob/master/Tools/msi/README.txt contains the text I quoted in the original report. * Some kind of release note (https://docs.python.org/3/whatsnew/3.5.html) so that things that have relied on this behaviour in the past (e.g. gvim with the Python3/dynamic build option) can have all their documentation updated to tell people to... I don't know? Grab the embedded version into the gvim install directory? What _is_ the recommended approach here, to give system-wide-installed applications access to a system-wide-installed Python environment? ============================================== I don't agree that this change is correct. It's inconsistent with the Linux experience of an all-users installation (i.e. anything on the system can link against libpython2.7.so and get the expected behaviour of using the system-installed Python) and I would also consider an All-Users install to *be* a system component, since the intent is clearly to make it available to all users and applications without further effort. Unlike putting python.exe in the path, the DLLs are version-named, so you don't suffer the conflict of *which Python* you get. The Python Launcher for Windows has taken care of that nicely, and if I have to add all the Python install directories to my path to ensure the DLLs are visible to applications that link against them, that seems to be a regression in the behaviour that launcher was trying to fix. An issue I see with the embedded installation approach is that if I want to make modules available to something like gvim's Python environment, then I need to maintain those modules distinctly from the modules I maintain on the system level. It also means I need to be modifying gvim's install directory to add that embedded distribution, and that leaves a whole bunch of manual tracking of installed things I need to worry about. I have the same concerns (manual tracking of things) if I have to add extra infrastructure to manage a copy of python3.X.dll in System32. Searching Google for this issue suggests that many people are just grabbing a random DLL off the internet named python3.5.dll and putting it in System32 when they encounter this problem, because "it used to work with Python 3.2". Alternatively... Does it make sense to have a "System Component" installer version of Python for use by other applications that want to offer (optional) Python interpreter support? It would be pretty-much identical to the installer we have now, except putting the DLL entry point (python3.x.dll) into the system path, but not having python.exe in the path to confuse command-line usage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 01:40:00 2017 From: report at bugs.python.org (Glenn Linderman) Date: Sun, 19 Mar 2017 05:40:00 +0000 Subject: [issue5053] http.client.HTTPMessage.getallmatchingheaders() always returns [] In-Reply-To: <1232897073.53.0.7443757693.issue5053@psf.upfronthosting.co.za> Message-ID: <1489902000.87.0.131764140119.issue5053@psf.upfronthosting.co.za> Glenn Linderman added the comment: It is certainly true that getallmatchingheaders is broken... because the data it is looking at has changed format. Here is a replacement that is as compatible as can be, based on the changed format. name = name.lower() n = len(name) lst = [] for line, data in self.items(): if line.lower() == name: lst.append(line + ': ' + data) return lst The changed format has merged continuation lines, and separated keys and values into a list of duplet tuples. Iterators keys, values, and items exist, keys are not necessarily unique. ---------- nosy: +v+python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 02:18:12 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 19 Mar 2017 06:18:12 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1489904292.96.0.538045135167.issue20087@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- pull_requests: +633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 02:32:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 06:32:38 +0000 Subject: [issue28749] Fixed the documentation of the mapping codec APIs In-Reply-To: <1479637798.25.0.994184606714.issue28749@psf.upfronthosting.co.za> Message-ID: <1489905158.73.0.748641728856.issue28749@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 02:37:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 06:37:41 +0000 Subject: [issue28749] Fixed the documentation of the mapping codec APIs In-Reply-To: <1479637798.25.0.994184606714.issue28749@psf.upfronthosting.co.za> Message-ID: <1489905461.8.0.862793896638.issue28749@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +635 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 02:41:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 06:41:14 +0000 Subject: [issue29776] Modernize properties In-Reply-To: <1489079402.47.0.435152463031.issue29776@psf.upfronthosting.co.za> Message-ID: <1489905674.39.0.174052028493.issue29776@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 02:53:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 06:53:20 +0000 Subject: [issue29736] Optimize builtin types constructor In-Reply-To: <1488812174.68.0.707747009021.issue29736@psf.upfronthosting.co.za> Message-ID: <1489906400.11.0.737306986305.issue29736@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Victor, could you please rebase your PR? And maybe rerun benchmarks? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 03:16:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 07:16:16 +0000 Subject: [issue29793] Convert some builtin types constructors to Argument Clinic In-Reply-To: <1489239993.83.0.329707117156.issue29793@psf.upfronthosting.co.za> Message-ID: <1489907776.79.0.426538482893.issue29793@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 03:33:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 19 Mar 2017 07:33:25 +0000 Subject: [issue29736] Optimize builtin types constructor In-Reply-To: <1489906400.11.0.737306986305.issue29736@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Ok, will do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 03:40:56 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 19 Mar 2017 07:40:56 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489909256.59.0.799225871188.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: Here is a patch including only changes related to array. (I ran the test module, and on my Windows 10, the same tests failed with and without my patches. However, on my Ubuntu 16.04 VM, none of the tests failed.) ---------- Added file: http://bugs.python.org/file46738/array_patchVer1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 04:48:36 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 19 Mar 2017 08:48:36 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489913315.99.0.530756259105.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: Here is a patch including only changes related to hashlib, lzma and pickle. (I ran the test module, and on my Windows 10, the same tests failed with and without my patches. However, on my Ubuntu 16.04 VM, none of the tests failed.) ---------- Added file: http://bugs.python.org/file46739/hashlib_lzma_pickle_patchVer1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 05:39:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 09:39:16 +0000 Subject: [issue29736] Optimize builtin types constructor In-Reply-To: <1488812174.68.0.707747009021.issue29736@psf.upfronthosting.co.za> Message-ID: <1489916356.89.0.696353049637.issue29736@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And include bytearray. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 07:22:38 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 19 Mar 2017 11:22:38 +0000 Subject: [issue29830] pyexpat.errors doesn't have __spec__ and __loader__ set In-Reply-To: <1489703712.88.0.588940526219.issue29830@psf.upfronthosting.co.za> Message-ID: <1489922558.59.0.581156276422.issue29830@psf.upfronthosting.co.za> Nick Coghlan added the comment: Right, there's a longstanding RFE to allow builtin packages and submodules: https://bugs.python.org/issue1644818 At the moment, modules like pyexpat are more like the os module than they are packages: they eagerly set other modules as attributes at import time (akin to os.path), rather than defining an actual package with submodules that can be optionally loaded via the import system. Given the import system changes in recent 3.x releases, I'd expect it to be feasible (but not necessarily easy) to come up with a viable specification and implementation for builtin and extension packages that work similarly to traditional packages (perhaps based on the handling of frozen packages). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 07:28:04 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 19 Mar 2017 11:28:04 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489922884.0.0.346219341398.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: Here is a patch including only changes related to time and re. (I ran the test module, and on my Windows 10, the same tests failed with and without my patches. However, on my Ubuntu 16.04 VM, none of the tests failed.) ---------- Added file: http://bugs.python.org/file46740/time_and_re_patchVer1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 07:28:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 11:28:47 +0000 Subject: [issue29852] Argument Clinic: add common converter to Py_ssize_t that accepts None Message-ID: <1489922927.22.0.81107726334.issue29852@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Many methods in the io module accept int and None and convert the argument to Py_ssize_t. Proposed patch adds common Argument Clinic converter for that case. The Py_ssize_t converter now takes the accept argument that can be {int} (the default) or {int, NoneType}. In the latter case None is acceptable value which means using the default value. Similar converter was previously used locally in the io module, now it is used also in the mmap module. Examples: _io.BytesIO.read size: Py_ssize_t(accept={int, NoneType}) = -1 / _io.BytesIO.truncate size: Py_ssize_t(accept={int, NoneType}, c_default="self->pos") = None / ---------- components: Argument Clinic, IO messages: 289847 nosy: benjamin.peterson, larry, serhiy.storchaka, stutzbach priority: normal severity: normal stage: patch review status: open title: Argument Clinic: add common converter to Py_ssize_t that accepts None type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 07:35:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 11:35:57 +0000 Subject: [issue29819] Avoid raising OverflowError in truncate() if possible In-Reply-To: <1489590666.79.0.55108836997.issue29819@psf.upfronthosting.co.za> Message-ID: <1489923357.08.0.661426668019.issue29819@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Issue29852 is not strict dependency, but it may make the solution of this issue simpler. ---------- dependencies: +Argument Clinic: add common converter to Py_ssize_t that accepts None _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 07:37:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 11:37:31 +0000 Subject: [issue29852] Argument Clinic: add common converter to Py_ssize_t that accepts None In-Reply-To: <1489922927.22.0.81107726334.issue29852@psf.upfronthosting.co.za> Message-ID: <1489923451.58.0.686743709716.issue29852@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 07:46:56 2017 From: report at bugs.python.org (Jakub Wilk) Date: Sun, 19 Mar 2017 11:46:56 +0000 Subject: [issue14208] No way to recover original argv with python -m In-Reply-To: <1331016803.5.0.715499259579.issue14208@psf.upfronthosting.co.za> Message-ID: <1489924016.29.0.559422784285.issue14208@psf.upfronthosting.co.za> Changes by Jakub Wilk : ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 07:53:16 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 19 Mar 2017 11:53:16 +0000 Subject: [issue14208] No way to recover original argv with python -m In-Reply-To: <1331016803.5.0.715499259579.issue14208@psf.upfronthosting.co.za> Message-ID: <1489924396.6.0.680001941114.issue14208@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 08:09:49 2017 From: report at bugs.python.org (Gabriel POTTER) Date: Sun, 19 Mar 2017 12:09:49 +0000 Subject: [issue29850] file access, other drives In-Reply-To: <1489874539.85.0.804795402296.issue29850@psf.upfronthosting.co.za> Message-ID: <1489925389.38.0.758291292677.issue29850@psf.upfronthosting.co.za> Gabriel POTTER added the comment: Thanks for your answers. I'll try to be as precise as possible. The problem i have is really specific: I have a custom file, that i added in C:/Windows/System32/ I have a Windows 10 x64 computer, with 2 versions of python installed: - Python 2.7, in C:\Python27 - Python 3.6, in D:\Programms\Python3 I use a sample of code with the two different versions: * With Python 2.7: Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.path.isfile(os.path.normpath("C:/Users/gpotter/Desktop/test.txt")) True >>> os.path.isfile(os.path.normpath("C:/Windows/System32/cmd.exe")) True >>> os.path.isfile(os.path.normpath("C:/Windows/System32/windump.exe")) True >>> os.path.isfile(os.path.normpath("C:/Windows/System32/do_not_exist.stg")) False * Now, with Python 3.6: Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.path.isfile(os.path.normpath("C:/Users/gpotter/Desktop/test.txt")) True >>> os.path.isfile(os.path.normpath("C:/Windows/System32/cmd.exe")) True >>> os.path.isfile(os.path.normpath("C:/Windows/System32/windump.exe")) False >>> os.path.isfile(os.path.normpath("C:/Windows/System32/do_not_exist.stg")) False As you can see, Python 2.7 acts normally for everything. Python 3.6 does detect cmd.exe as a correct file, but do not detects windump.exe, the file that I added manually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 08:24:51 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 19 Mar 2017 12:24:51 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489926291.5.0.516587009534.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: Here is a patch including only changes related to curses, stat, callproc (ctypes) and sequence_repeat (abstract). (I ran the test module, and on my Windows 10, the same tests failed with and without my patches. However, on my Ubuntu 16.04 VM, none of the tests failed.) ---------- Added file: http://bugs.python.org/file46741/curses_stat_callproc_abstract_patchVer1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 08:53:08 2017 From: report at bugs.python.org (Paul Moore) Date: Sun, 19 Mar 2017 12:53:08 +0000 Subject: [issue29850] file access, other drives In-Reply-To: <1489874539.85.0.804795402296.issue29850@psf.upfronthosting.co.za> Message-ID: <1489927988.6.0.540241193545.issue29850@psf.upfronthosting.co.za> Paul Moore added the comment: As you see from the banner, your Python 3.6 is 32-bit but your Python 2.7 is 64-bit. I'd suggest you try 64-bit Python 3.6. This definitely looks like the SysWOW64 issue Eryk described. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 09:19:29 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Sun, 19 Mar 2017 13:19:29 +0000 Subject: [issue29842] Make Executor.map work with infinite/large inputs correctly In-Reply-To: <1489800776.56.0.575396558681.issue29842@psf.upfronthosting.co.za> Message-ID: <1489929569.5.0.237830163652.issue29842@psf.upfronthosting.co.za> Changes by Josh Rosenberg : ---------- title: Executor.map should not submit all futures prior to yielding any results -> Make Executor.map work with infinite/large inputs correctly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 10:01:03 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 19 Mar 2017 14:01:03 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489932063.34.0.0736518514083.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: Here is a patch including only changes related to mmap, posix, socket and select. (I ran the test module, and on my Windows 10, the same tests failed with and without my patches. However, on my Ubuntu 16.04 VM, none of the tests failed.) ---------- Added file: http://bugs.python.org/file46742/mmap_posix_socket_select_patchVer1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 10:08:28 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 19 Mar 2017 14:08:28 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1489932508.6.0.936930912321.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: ISTM that what's left is (except for my 7 sub-patches): - making the error messages of long_rshift and long_lshift consistent (waits for #29816) - deciding whether to open an issue for changing the type of errors PyLong_AsSize_t raises ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 11:09:05 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sun, 19 Mar 2017 15:09:05 +0000 Subject: [issue29853] Improve exception messages for remove and index methods Message-ID: <1489936145.67.0.822710231299.issue29853@psf.upfronthosting.co.za> New submission from Jim Fasarakis-Hilliard: Currently, there's a discrepancy in the exception reporting for the `.index` and `.remove` methods of many objects: For arrays: array.remove(val) -> ValueError: array.remove(x): x not in list array.index(val) -> ValueError: array.index(x): x not in list not only is always printing `x` not in list not informative, it's wrong since it isn't a list. For tuples: tuple.index(val) -> ValueError: tuple.index(x): x not in tuple For lists: list.remove(val) -> ValueError: list.remove(x): x not in list list.index(val) produces a more informative message: ValueError: is not in list For deques: deque.remove(val) -> ValueError: deque.remove(x): x not in deque similarly to lists, `deque.index(val)` prints the actual argument supplied. I'm not sure if there's valid reasoning behind not providing the repr of the arguments in all `remove` methods but, if there isn't, I'd like to suggest changing all of them to use PyErr_Format and produce more informative messages: array.remove(val) -> ValueError: is not in array array.index(val) -> ValueError: is not in array tuple.index(val) -> ValueError: is not in tuple list.remove(val) -> ValueError: is not in list deque.remove(val) -> ValueError: is not in deque ---------- messages: 289854 nosy: Jim Fasarakis-Hilliard priority: normal severity: normal status: open title: Improve exception messages for remove and index methods type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 11:09:57 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sun, 19 Mar 2017 15:09:57 +0000 Subject: [issue29853] Improve exception messages for remove and index methods In-Reply-To: <1489936145.67.0.822710231299.issue29853@psf.upfronthosting.co.za> Message-ID: <1489936197.59.0.479761723271.issue29853@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: I'd be happy to supply a PR for this if the change seems reasonable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 11:19:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 15:19:47 +0000 Subject: [issue29853] Improve exception messages for remove and index methods In-Reply-To: <1489936145.67.0.822710231299.issue29853@psf.upfronthosting.co.za> Message-ID: <1489936787.6.0.318310340662.issue29853@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Non-informative error message in index() and remove() functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 11:31:33 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sun, 19 Mar 2017 15:31:33 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1489937493.0.0.261541866968.issue13349@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: @Sean Ochoa, do you want to make this into a PR? The only tweak I would suggest would be to change all error messages to either be: "object.method(repr(x)): element not in object" or: "repr(x) not in object" also, this probably needs to be changed to version 3.7 now. ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 12:49:27 2017 From: report at bugs.python.org (Gabriel POTTER) Date: Sun, 19 Mar 2017 16:49:27 +0000 Subject: [issue29850] file access, other drives In-Reply-To: <1489874539.85.0.804795402296.issue29850@psf.upfronthosting.co.za> Message-ID: <1489942167.74.0.839211311294.issue29850@psf.upfronthosting.co.za> Gabriel POTTER added the comment: Thanks a lot, that resolved it. ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 13:30:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 17:30:53 +0000 Subject: [issue25455] Some repr implementations don't check for self-referential structures In-Reply-To: <1445455038.6.0.824380060049.issue25455@psf.upfronthosting.co.za> Message-ID: <1489944653.4.0.158385697802.issue25455@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +637 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 13:42:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 17:42:23 +0000 Subject: [issue29748] Argument Clinic: slice index converter In-Reply-To: <1488892007.86.0.01356022303.issue29748@psf.upfronthosting.co.za> Message-ID: <1489945343.77.0.613637204883.issue29748@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 14:18:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 18:18:00 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1489947480.97.0.752513657114.issue29116@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +638 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 14:18:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 18:18:51 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1489947531.97.0.297673222115.issue29116@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +639 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 14:22:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 18:22:06 +0000 Subject: [issue29845] Mark tests that use _testcapi as CPython-only In-Reply-To: <1489845141.37.0.776933976205.issue29845@psf.upfronthosting.co.za> Message-ID: <1489947726.7.0.0170406247278.issue29845@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +640 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 14:22:32 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 18:22:32 +0000 Subject: [issue29845] Mark tests that use _testcapi as CPython-only In-Reply-To: <1489845141.37.0.776933976205.issue29845@psf.upfronthosting.co.za> Message-ID: <1489947752.5.0.770754944319.issue29845@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 14:41:09 2017 From: report at bugs.python.org (Steve Dower) Date: Sun, 19 Mar 2017 18:41:09 +0000 Subject: [issue29844] Windows Python installers not installing DLL to System32/SysWOW64 In-Reply-To: <1489831433.22.0.028475249754.issue29844@psf.upfronthosting.co.za> Message-ID: <1489948869.52.0.769949968735.issue29844@psf.upfronthosting.co.za> Steve Dower added the comment: Maybe I need to look through the history to see whether I actually intended the all-users install to be in System, but I don't think I did (despite writing the documentation linked - it may have been adapted from the old documentation). Applications that need Python should look in the registry or embed the embeddable distro, depending on whether they are providing access to the user's own Python (e.g. an IDE) or it's an internal implementation detail (e.g. a tool that just happens to be implemented using Python). The former should really offer options for the user to specify a path to the install as well. Reliably finding the required standard library for a copy of Python that is installed somewhere else is every bit as problematic as locating the install itself. When everyone follows PEP 514 properly it may be safe for a System32-DLL to use the registry again for finding its library, but as long as various distros want to overwrite the core registry keys, everyone is better off without it being a system component. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 14:56:05 2017 From: report at bugs.python.org (Decorater) Date: Sun, 19 Mar 2017 18:56:05 +0000 Subject: [issue29844] Windows Python installers not installing DLL to System32/SysWOW64 In-Reply-To: <1489831433.22.0.028475249754.issue29844@psf.upfronthosting.co.za> Message-ID: <1489949765.27.0.624640065507.issue29844@psf.upfronthosting.co.za> Decorater added the comment: tbh, I would rather have it default for all python files installed for all users to go in ``%SystemDrive%\Python{major}{minor}`` on windows and then work with then the environment variables like currently so that way none of the python dll's are outside of such folder in case someone installs for example 3.6.0 in ``%SystemDrive%\Python360`` and then installs 3.6.1 in ``%SystemDrive%\Python361`` without uninstalling 3.6.0. ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 15:19:15 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 19 Mar 2017 19:19:15 +0000 Subject: [issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS In-Reply-To: <1489847707.41.0.897250288335.issue29846@psf.upfronthosting.co.za> Message-ID: <1489951155.56.0.903753672522.issue29846@psf.upfronthosting.co.za> Ned Deily added the comment: Glad the --enable-shared workaround worked around. If you feel like exploring the issue further, a couple of things that might be useful would be to set one or more of dyld's debugging environment variables, like DYLD_PRINT_LIBRARIES, to try to see exactly which shared library is being accessed by mistake and at what point, assuming that is the root cause; see man (1) dyld for more info. My guess is that you'll see a Homebrew or Anaconda Python library from /usr/local/lib or some such being dynamically loaded in error. Another option might be to temporarily mv rename any such Python libraries under /usr/local/lib and see if that makes a difference. As I said, it would be nice to finally put this issue to bed but, it's tough to do that without being to able to reliably reproduce it and, at this point, it doesn't seem to affect enough users to make it very high priority. ---------- priority: normal -> low stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 15:45:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 19:45:13 +0000 Subject: [issue29845] Mark tests that use _testcapi as CPython-only In-Reply-To: <1489845141.37.0.776933976205.issue29845@psf.upfronthosting.co.za> Message-ID: <1489952713.32.0.604836949862.issue29845@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 16:21:24 2017 From: report at bugs.python.org (Adam Stewart) Date: Sun, 19 Mar 2017 20:21:24 +0000 Subject: [issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS In-Reply-To: <1489847707.41.0.897250288335.issue29846@psf.upfronthosting.co.za> Message-ID: <1489954884.42.0.0197519988808.issue29846@psf.upfronthosting.co.za> Adam Stewart added the comment: I agree, the `--enable-shared` fix is nice, but I would also love to squash this bug. An interesting piece of information: When I provide the full path to the executable (not just relying on the hashed python location), I see: $ /Users/Adam/spack/opt/spack/darwin-sierra-x86_64/clang-8.0.0-apple/python-2.7.13-tjqn5npfo573q2jw3dumzhzctfd2vvdv/bin/python Python 2.7.10 (default, Jul 30 2016, 19:40:32) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> print sys.version 2.7.10 (default, Jul 30 2016, 19:40:32) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] >>> print sys.path ['', '/Users/Adam/spack/opt/spack/darwin-sierra-x86_64/clang-8.0.0-apple/python-2.7.13-tjqn5npfo573q2jw3dumzhzctfd2vvdv/lib/python27.zip', '/Users/Adam/spack/opt/spack/darwin-sierra-x86_64/clang-8.0.0-apple/python-2.7.13-tjqn5npfo573q2jw3dumzhzctfd2vvdv/lib/python2.7', '/Users/Adam/spack/opt/spack/darwin-sierra-x86_64/clang-8.0.0-apple/python-2.7.13-tjqn5npfo573q2jw3dumzhzctfd2vvdv/lib/python2.7/plat-darwin', '/Users/Adam/spack/opt/spack/darwin-sierra-x86_64/clang-8.0.0-apple/python-2.7.13-tjqn5npfo573q2jw3dumzhzctfd2vvdv/lib/python2.7/plat-mac', '/Users/Adam/spack/opt/spack/darwin-sierra-x86_64/clang-8.0.0-apple/python-2.7.13-tjqn5npfo573q2jw3dumzhzctfd2vvdv/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/Adam/spack/opt/spack/darwin-sierra-x86_64/clang-8.0.0-apple/python-2.7.13-tjqn5npfo573q2jw3dumzhzctfd2vvdv/lib/python2.7/lib-tk', '/Users/Adam/spack/opt/spack/darwin-sierra-x86_64/clang-8.0.0-apple/python-2.7.13-tjqn5npfo573q2jw3dumzhzctfd2vvdv/lib/python2.7/lib-old', '/Users/Adam/spack/opt/spack/darwin-sierra-x86_64/clang-8.0.0-apple/python-2.7.13-tjqn5npfo573q2jw3dumzhzctfd2vvdv/lib/python2.7/lib-dynload', '/Users/Adam/.local/lib/python2.7/site-packages', '/Users/Adam/spack/opt/spack/darwin-sierra-x86_64/clang-8.0.0-apple/python-2.7.13-tjqn5npfo573q2jw3dumzhzctfd2vvdv/lib/python2.7/site-packages'] Note that I am building Python 2.7.13, not 2.7.10. Homebrew installs Python in /usr/local and that version is 2.7.12. My Ananconda installation is in ~/anaconda2 and is 2.7.13. However, the system Python installed at /usr is 2.7.10. Perhaps this is where it is picking up libraries from? Here's some more debug information that could possibly be helpful. I have attached the output of: $ /Users/Adam/spack/opt/spack/darwin-sierra-x86_64/clang-8.0.0-apple/python-2.7.13-tjqn5npfo573q2jw3dumzhzctfd2vvdv/bin/python -c 'from __future__ import print_function; import sysconfig; vars = sysconfig.get_config_vars(); [print(var, vars[var]) for var in vars]' > ~/python-config-vars.txt Nothing in there looks particularly suspicious to me, but maybe you can find something fishy. I'll try out DYLD_PRINT_LIBRARIES next. ---------- Added file: http://bugs.python.org/file46743/python-config-vars.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 16:33:11 2017 From: report at bugs.python.org (Adam Stewart) Date: Sun, 19 Mar 2017 20:33:11 +0000 Subject: [issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS In-Reply-To: <1489847707.41.0.897250288335.issue29846@psf.upfronthosting.co.za> Message-ID: <1489955591.74.0.364557930238.issue29846@psf.upfronthosting.co.za> Adam Stewart added the comment: The output of DYLD_PRINT_LIBRARIES is attached as well. ---------- Added file: http://bugs.python.org/file46744/dyld_print_libraries.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 16:43:59 2017 From: report at bugs.python.org (Adam Stewart) Date: Sun, 19 Mar 2017 20:43:59 +0000 Subject: [issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS In-Reply-To: <1489847707.41.0.897250288335.issue29846@psf.upfronthosting.co.za> Message-ID: <1489956239.29.0.079979045985.issue29846@psf.upfronthosting.co.za> Adam Stewart added the comment: Made a mistake. Please see the new output of DYLD_PRINT_LIBRARIES. This time I actually ran a Python command to see which libraries were loaded. ---------- Added file: http://bugs.python.org/file46745/dyld_print_libraries.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 17:44:35 2017 From: report at bugs.python.org (Adam Stewart) Date: Sun, 19 Mar 2017 21:44:35 +0000 Subject: [issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS In-Reply-To: <1489847707.41.0.897250288335.issue29846@psf.upfronthosting.co.za> Message-ID: <1489959875.57.0.790843446355.issue29846@psf.upfronthosting.co.za> Adam Stewart added the comment: I also tried building with a Homebrew-installed GCC 6.2.0 but that had the same result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 17:59:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Mar 2017 21:59:45 +0000 Subject: [issue25455] Some repr implementations don't check for self-referential structures In-Reply-To: <1445455038.6.0.824380060049.issue25455@psf.upfronthosting.co.za> Message-ID: <1489960785.5.0.154718186292.issue25455@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +642 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 18:15:24 2017 From: report at bugs.python.org (Nir Soffer) Date: Sun, 19 Mar 2017 22:15:24 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size Message-ID: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> New submission from Nir Soffer: GNU readline let the user select limit the history size by setting: $ cat ~/.inputrc set history-size 1000 So I cooked this test script: $ cat history.py from __future__ import print_function import readline readline.read_history_file(".history") print("current_history_length", readline.get_current_history_length()) print("history_length", readline.get_history_length()) print("history_get_item(1)", readline.get_history_item(1)) print("history_get_item(1000)", readline.get_history_item(1000)) input() readline.write_history_file(".history") And this history file generator: $ cat make-history for i in range(2000): print("%04d" % i) Generating .history file with 2000 entries: $ python3 make-history > .history Finally running the test script: $ python3 history.py current_history_length 1000 history_length -1 history_get_item(1) None history_get_item(1000) None please crash Segmentation fault (core dumped) So we have few issues here: - segfault - history_get_item returns None for both 1 and 1000 although we have 1000 items in history - history_length is always wrong (-1), instead of the expected value (1000), set in .inputrc Running with gdb we see: $ gdb python3 GNU gdb (GDB) Fedora 7.12.1-46.fc25 Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from python3...Reading symbols from /usr/lib/debug/usr/libexec/system-python.debug...done. done. (gdb) run history.py Starting program: /usr/bin/python3 history.py [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". current_history_length 1000 history_length -1 history_get_item(1) None history_get_item(1000) None crash? Program received signal SIGSEGV, Segmentation fault. 0x00007fffeff60fab in call_readline (sys_stdin=, sys_stdout=, prompt=) at /usr/src/debug/Python-3.5.2/Modules/readline.c:1281 1281 line = (const char *)history_get(length)->line; (gdb) list 1276 if (using_libedit_emulation) { 1277 /* handle older 0-based or newer 1-based indexing */ 1278 line = (const char *)history_get(length + libedit_history_start - 1)->line; 1279 } else 1280 #endif /* __APPLE__ */ 1281 line = (const char *)history_get(length)->line; 1282 else 1283 line = ""; 1284 if (strcmp(p, line)) 1285 add_history(p); So we assume that history_get(length) returns non-null when length > 0, but this assumption is not correct. In 2 other usages in Modules/readline.c, we validate that history_get() return value is not null before using it. If we change the .history contents to 1999 lines, we get: $ python3 make-history | head -1999 > .history $ python3 history.py current_history_length 1000 history_length -1 history_get_item(1) None history_get_item(1000) 0999 crash? $ wc -l .history 1000 .history $ head -1 .history 1000 $ tail -1 .history crash? So now it does not crash, but item 1 is still None. Trying again with history file with 1000 entries: $ python3 make-history | head -1000 > .history $ python3 history.py current_history_length 1000 history_length -1 history_get_item(1) 0000 history_get_item(1000) 0999 looks fine! $ wc -l .history 1000 .history $ head -1 history head: cannot open 'history' for reading: No such file or directory $ head -1 .history 0001 $ tail -1 .history looks fine! Finally trying with 1001 items: $ python3 make-history | head -1001 > .history $ python3 history.py current_history_length 1000 history_length -1 history_get_item(1) None history_get_item(1000) 0999 And item 1 is wrong. I got same results with python 2.7, 3.5 and master on fedora 25. The root cause seems to be a readline bug when history file is bigger than the history-size in .inputrc, but I could not find yet readline library documentation, so I don't know if the issues is incorrect usage of the readline apis, or bug in readline. ---------- components: Extension Modules messages: 289865 nosy: nirs priority: normal severity: normal status: open title: Segfault when readline history is more then 2 * history size versions: Python 2.7, Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 18:27:36 2017 From: report at bugs.python.org (Roundup Robot) Date: Sun, 19 Mar 2017 22:27:36 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1489962456.55.0.347807994757.issue29854@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +643 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 19:10:25 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 19 Mar 2017 23:10:25 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1489965025.11.0.885787282062.issue29116@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Something is strange: PRs 709, 723, 724 are shown as open in the "Pull Requests" section on this page. However, all four PRs are already merged. Are other see the same? Shouldn't status be automatically updated? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 19:37:32 2017 From: report at bugs.python.org (assume_away) Date: Sun, 19 Mar 2017 23:37:32 +0000 Subject: [issue29855] The traceback compounding of RecursionError fails to work with __get__ Message-ID: <1489966652.17.0.834127602926.issue29855@psf.upfronthosting.co.za> New submission from assume_away: class Property: def __init__(self, getter): self.getter = getter def __get__(self, instance, cls): return self.getter(cls if instance is None else instance) class MyClass: @Property def something(cls): return cls.something Calling MyClass.something will show all 990+ RecursionError message. ---------- messages: 289867 nosy: assume_away priority: normal severity: normal status: open title: The traceback compounding of RecursionError fails to work with __get__ type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 22:52:31 2017 From: report at bugs.python.org (Raphael McSinyx) Date: Mon, 20 Mar 2017 02:52:31 +0000 Subject: [issue29856] curses online documentation typo Message-ID: <1489978351.51.0.185284735277.issue29856@psf.upfronthosting.co.za> New submission from Raphael McSinyx: I think there is a typo in curses online documentation about key constants: https://docs.python.org/3.7/library/curses.html#constants The key KEY_SEXIT is described as `Shifted Dxit' while I think that should be `Shifted Exit'. ---------- assignee: docs at python components: Documentation messages: 289868 nosy: McSinyx, docs at python priority: normal severity: normal status: open title: curses online documentation typo versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 23:34:34 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 20 Mar 2017 03:34:34 +0000 Subject: [issue29856] curses online documentation typo In-Reply-To: <1489978351.51.0.185284735277.issue29856@psf.upfronthosting.co.za> Message-ID: <1489980874.08.0.894454171643.issue29856@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +644 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 23:37:56 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Mon, 20 Mar 2017 03:37:56 +0000 Subject: [issue29856] curses online documentation typo In-Reply-To: <1489978351.51.0.185284735277.issue29856@psf.upfronthosting.co.za> Message-ID: <1489981076.89.0.898026797471.issue29856@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Nice catch, that's a typo indeed. If you'd like, submit a PR [see https://docs.python.org/devguide/#quick-start] to address this. ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 23:40:54 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 20 Mar 2017 03:40:54 +0000 Subject: [issue29856] curses online documentation typo In-Reply-To: <1489978351.51.0.185284735277.issue29856@psf.upfronthosting.co.za> Message-ID: <1489981254.88.0.866764657466.issue29856@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks for the report, Raphael. And thanks Jim, I made a PR just as you commented :) ---------- assignee: docs at python -> Mariatta nosy: +Mariatta stage: -> patch review versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 23:49:45 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 20 Mar 2017 03:49:45 +0000 Subject: [issue29856] curses online documentation typo In-Reply-To: <1489978351.51.0.185284735277.issue29856@psf.upfronthosting.co.za> Message-ID: <1489981785.01.0.125932071532.issue29856@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +645 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 23:49:58 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 20 Mar 2017 03:49:58 +0000 Subject: [issue29856] curses online documentation typo In-Reply-To: <1489978351.51.0.185284735277.issue29856@psf.upfronthosting.co.za> Message-ID: <1489981798.41.0.673518957746.issue29856@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +646 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 23:50:14 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 20 Mar 2017 03:50:14 +0000 Subject: [issue29856] curses online documentation typo In-Reply-To: <1489978351.51.0.185284735277.issue29856@psf.upfronthosting.co.za> Message-ID: <1489981814.96.0.0193613572906.issue29856@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 23:58:58 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Mon, 20 Mar 2017 03:58:58 +0000 Subject: [issue29855] The traceback compounding of RecursionError fails to work with __get__ In-Reply-To: <1489966652.17.0.834127602926.issue29855@psf.upfronthosting.co.za> Message-ID: <1489982338.66.0.211147060027.issue29855@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: I'm pretty sure this is by design; the change introduced in [1] tried to keep things simple by only trimming the output when the lines were identical. More complicated scenarios are trickier to implement. It should be interesting to see if the core-devs believe a change like this is warranted, though. [1]: https://bugs.python.org/issue26823 ---------- components: +Interpreter Core nosy: +Jim Fasarakis-Hilliard versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 19 23:59:49 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 20 Mar 2017 03:59:49 +0000 Subject: [issue29856] curses online documentation typo In-Reply-To: <1489978351.51.0.185284735277.issue29856@psf.upfronthosting.co.za> Message-ID: <1489982389.03.0.0466427286869.issue29856@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Typo fixed and backported into 2.7, 3.5 and 3.6. Thanks :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 00:02:31 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 20 Mar 2017 04:02:31 +0000 Subject: [issue29855] The traceback compounding of RecursionError fails to work with __get__ In-Reply-To: <1489966652.17.0.834127602926.issue29855@psf.upfronthosting.co.za> Message-ID: <1489982551.33.0.222938514296.issue29855@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +ebarry, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 00:15:56 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Mon, 20 Mar 2017 04:15:56 +0000 Subject: [issue29847] Path takes and ignores **kwargs In-Reply-To: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> Message-ID: <1489983356.83.0.705859668952.issue29847@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 02:33:43 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 20 Mar 2017 06:33:43 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments Message-ID: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> New submission from Nick Coghlan: Issue 14208 was ultimately resolved through an import system specific solution, with PEP 451 making the module name passed to `python -m` available as `__main__.__spec__.name`. However, there are other situations where it may be useful to offer an implementation-dependent attribute in the `sys` module that provides access to a copy of the host application's raw `argv` details, rather than the filtered `sys.argv` details that are left after the host application's command line processing has been completed. In the case of CPython, where `sys.argv` represents the arguments to the Python level __main__ function, `sys._raw_argv` would be a copy of the argv argument to the C level main() or wmain() function (as appropriate for the platform). ---------- messages: 289873 nosy: ncoghlan priority: normal severity: normal status: open title: Provide `sys._raw_argv` for host application's command line arguments type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 02:34:44 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 20 Mar 2017 06:34:44 +0000 Subject: [issue14208] No way to recover original argv with python -m In-Reply-To: <1331016803.5.0.715499259579.issue14208@psf.upfronthosting.co.za> Message-ID: <1489991684.55.0.477633591748.issue14208@psf.upfronthosting.co.za> Nick Coghlan added the comment: A few updates here: * For the specific case of `python -m`, the original argument has been available as `__main__.__spec__.name` since Python 3.4 * Also since Python 3.4, the `multiprocessing` module has correctly handled the -m switch. For more details, see https://docs.python.org/3/whatsnew/3.4.html#multiprocessing and the linked issues. * However, there are still some cases where it is potentially useful to have access to the full details of how the host Python runtime was invoked, rather than just the arguments that were left after CPython's runtime processing was completed. I filed issue 29857 as a new RFE specifically suggesting a `sys._raw_argv` attribute addressing that question. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 02:41:40 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 20 Mar 2017 06:41:40 +0000 Subject: [issue29855] The traceback compounding of RecursionError fails to work with __get__ In-Reply-To: <1489966652.17.0.834127602926.issue29855@psf.upfronthosting.co.za> Message-ID: <1489992100.5.0.746208236066.issue29855@psf.upfronthosting.co.za> Nick Coghlan added the comment: Indeed, the traceback abbreviation doesn't try to detect recursive loops, only exactly duplicated lines. The problem is that the more state management we do in the traceback printing, the higher the chance there is of getting an error while attempt to display the previous errors. Keeping the immediately preceding entry and doing an exact comparison is straightforward, but pattern matching on up-to-N entries is something we'll leave to external traceback pretty printers. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 02:48:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Mar 2017 06:48:06 +0000 Subject: [issue28876] bool of large range raises OverflowError In-Reply-To: <1480930662.45.0.497603219066.issue28876@psf.upfronthosting.co.za> Message-ID: <1489992486.85.0.919287927085.issue28876@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 03:13:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Mar 2017 07:13:20 +0000 Subject: [issue28876] bool of large range raises OverflowError In-Reply-To: <1480930662.45.0.497603219066.issue28876@psf.upfronthosting.co.za> Message-ID: <1489994000.2.0.177257543382.issue28876@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +649 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 03:39:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Mar 2017 07:39:08 +0000 Subject: [issue28876] bool of large range raises OverflowError In-Reply-To: <1480930662.45.0.497603219066.issue28876@psf.upfronthosting.co.za> Message-ID: <1489995548.09.0.921929196885.issue28876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Akira for your patch. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 03:52:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Mar 2017 07:52:23 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1489996343.06.0.0141552776413.issue29116@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't know why statuses was not updated automatically. Updated them manually. Ivan in the comment on GitHub suggested to use "concatenate" instead of "concat" in "can't concat to bytes". Maybe make it more similar to messages for list, tuple, deque, array? "can only concatenate objects supporting the buffer protocol (not "") to bytes"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 03:57:32 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Mar 2017 07:57:32 +0000 Subject: [issue25455] Some repr implementations don't check for self-referential structures In-Reply-To: <1445455038.6.0.824380060049.issue25455@psf.upfronthosting.co.za> Message-ID: <1489996652.64.0.856313607797.issue25455@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 04:53:27 2017 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 20 Mar 2017 08:53:27 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1490000007.58.0.274977293392.issue29816@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Mark, could you please make a review? I'll try to find time this week. At least in principle, the change sounds good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 05:19:13 2017 From: report at bugs.python.org (anton-ryzhov) Date: Mon, 20 Mar 2017 09:19:13 +0000 Subject: [issue29858] inspect.signature includes bound argument for wrappers around decorated bound methods Message-ID: <1490001553.25.0.894325859627.issue29858@psf.upfronthosting.co.za> New submission from anton-ryzhov: If we wrap function with bound method, which is also a wrapper around function, `inspect.signature` will not do `skip_bound_arg`. It will use `inspect.unwrap` and pass by bound method from outer function to inner one. Reproduce: ``` import functools, inspect def decorator(func): @functools.wraps(func) def inner(*args): return func(*args) return inner class Foo(object): @decorator def bar(self, testarg): pass f = Foo() baz = decorator(f.bar) assert inspect.signature(baz) == inspect.signature(f.bar) ``` ---------- components: Library (Lib) messages: 289879 nosy: anton-ryzhov priority: normal severity: normal status: open title: inspect.signature includes bound argument for wrappers around decorated bound methods versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 05:19:48 2017 From: report at bugs.python.org (anton-ryzhov) Date: Mon, 20 Mar 2017 09:19:48 +0000 Subject: [issue29858] inspect.signature includes bound argument for wrappers around decorated bound methods In-Reply-To: <1490001553.25.0.894325859627.issue29858@psf.upfronthosting.co.za> Message-ID: <1490001588.03.0.758817170866.issue29858@psf.upfronthosting.co.za> anton-ryzhov added the comment: Related to http://bugs.python.org/issue24298 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 05:25:29 2017 From: report at bugs.python.org (anton-ryzhov) Date: Mon, 20 Mar 2017 09:25:29 +0000 Subject: [issue29858] inspect.signature includes bound argument for wrappers around decorated bound methods In-Reply-To: <1490001553.25.0.894325859627.issue29858@psf.upfronthosting.co.za> Message-ID: <1490001929.93.0.143169691996.issue29858@psf.upfronthosting.co.za> Changes by anton-ryzhov : ---------- pull_requests: +650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 05:33:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Mar 2017 09:33:28 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1490002408.52.0.337828384475.issue29854@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The fix LGTM. Any chance to write a test? And please add an entry in Misc/NEWS. ---------- nosy: +serhiy.storchaka, twouters stage: -> patch review type: -> crash versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 05:35:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Mar 2017 09:35:21 +0000 Subject: [issue29858] inspect.signature includes bound argument for wrappers around decorated bound methods In-Reply-To: <1490001553.25.0.894325859627.issue29858@psf.upfronthosting.co.za> Message-ID: <1490002521.65.0.481640758734.issue29858@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +yselivanov stage: -> patch review type: -> behavior versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 05:54:33 2017 From: report at bugs.python.org (illagrenan) Date: Mon, 20 Mar 2017 09:54:33 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1490003673.52.0.835241236472.issue28522@psf.upfronthosting.co.za> Changes by illagrenan : ---------- nosy: +illagrenan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 06:07:17 2017 From: report at bugs.python.org (Michael Haubenwallner) Date: Mon, 20 Mar 2017 10:07:17 +0000 Subject: [issue15590] --libs is inconsistent for python-config --libs and pkgconfig python --libs In-Reply-To: <1344422598.39.0.464686614779.issue15590@psf.upfronthosting.co.za> Message-ID: <1490004437.49.0.878364766087.issue15590@psf.upfronthosting.co.za> Changes by Michael Haubenwallner : ---------- pull_requests: +652 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 06:11:44 2017 From: report at bugs.python.org (Eryk Sun) Date: Mon, 20 Mar 2017 10:11:44 +0000 Subject: [issue29844] Windows Python installers not installing DLL to System32/SysWOW64 In-Reply-To: <1489831433.22.0.028475249754.issue29844@psf.upfronthosting.co.za> Message-ID: <1490004704.26.0.0796957854968.issue29844@psf.upfronthosting.co.za> Eryk Sun added the comment: > It's inconsistent with the Linux experience of an all-users > installation Yes, if you build with --enable-shared on Linux, then the shared libraries libpython3.X.so.1.0 and libpython3.so are installed in /usr/local/lib. Currently there's no direct equivalent for 3.5+ on Windows. However, delay-loading the DLL is an alternative to a static import. At program startup, get the install path from the registry and load python3x.dll manually via LoadLibraryEx with the flag LOAD_WITH_ALTERED_SEARCH_PATH. Delayed loading automates calling GetProcAddress, so you get the flexibility of a dynamic import without losing the convenience of a static import. > add all the Python install directories to my path to ensure the DLLs > are visible to applications that link against them If the 32-bit DLL were distributed as, for example, python36-32.dll, then this would at least be reliable, albeit tedious. Using System32 and SysWOW64 handles this problem reliably via file-system redirection. > all users to go in ``%SystemDrive%\Python{major}{minor}`` The change to use %ProgramFiles% for a machine installation and %LocalAppData% for a user installation locks down the discretionary file security. In contrast, the file security inherited from C:\ is permissive. It allows any authenticated user the right to modify the directory, subdirectories, and files. The only rights not granted are delete-child (meaningless since the user has delete access for all files) and the right to modify the file security. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 07:26:30 2017 From: report at bugs.python.org (Nir Soffer) Date: Mon, 20 Mar 2017 11:26:30 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1490009190.26.0.973932458475.issue29854@psf.upfronthosting.co.za> Nir Soffer added the comment: Sure, I'll add news entry and tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 07:57:37 2017 From: report at bugs.python.org (Jakub Wilk) Date: Mon, 20 Mar 2017 11:57:37 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490011057.67.0.249665628079.issue29857@psf.upfronthosting.co.za> Changes by Jakub Wilk : ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 08:08:19 2017 From: report at bugs.python.org (Daniel Birnstiel) Date: Mon, 20 Mar 2017 12:08:19 +0000 Subject: [issue29859] Return code of pthread_* in thread_pthread.h is not used for perror Message-ID: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za> New submission from Daniel Birnstiel: Python/thread_pthread.h:145 defines the CHECK_STATUS macro used for printing error messages in case any of the calls fail. CHECK_STATUS uses perror for formatting an error message, which relies on the global erno being set (see man perror). Since the pthread functions return their status code instead of setting erno (which might not even work in threaded environments), no additional information is displayed. See for example produced by PyThread_release_lock: pthread_mutex_lock[3]: Undefined error: 0 pthread_cond_signal: Undefined error: 0 pthread_mutex_unlock[3]: Undefined error: 0 The correct solution would be to use strerror(status) in order to show the proper message. ---------- components: Interpreter Core messages: 289884 nosy: Birne94 priority: normal severity: normal status: open title: Return code of pthread_* in thread_pthread.h is not used for perror type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 09:01:54 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 20 Mar 2017 13:01:54 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490014914.98.0.166098455982.issue29857@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 09:02:32 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 20 Mar 2017 13:02:32 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490014952.12.0.347042957812.issue29857@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: As bytes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 10:32:53 2017 From: report at bugs.python.org (Lord Anton Hvornum) Date: Mon, 20 Mar 2017 14:32:53 +0000 Subject: [issue29860] smtplib.py doesn't capitalize EHLO. Message-ID: <1490020373.29.0.308540627587.issue29860@psf.upfronthosting.co.za> New submission from Lord Anton Hvornum: ``` File "mail.py", line 9, in smtp_server.starttls(context) File "/usr/lib/python3.6/smtplib.py", line 748, in starttls self.ehlo_or_helo_if_needed() File "/usr/lib/python3.6/smtplib.py", line 600, in ehlo_or_helo_if_needed (code, resp) = self.helo() File "/usr/lib/python3.6/smtplib.py", line 429, in helo (code, msg) = self.getreply() File "/usr/lib/python3.6/smtplib.py", line 393, in getreply raise SMTPServerDisconnected("Connection unexpectedly closed") ``` This happens due to the server expecting commands (like EHLO, STARTTLS) being strict upper-case. And when the SMTP command isn't, it drops us. This is a rare edge case since most mail servers handles shady client data in numerous different ways (such as gmail never sending QUIT for instance). I don't know of a work-around for this and the documentation states `EHLO` is being sent (https://docs.python.org/3/library/smtplib.html), so I guess the lib assumes that's the case as well. ---------- components: Library (Lib) messages: 289886 nosy: Lord Anton Hvornum priority: normal severity: normal status: open title: smtplib.py doesn't capitalize EHLO. versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 10:35:31 2017 From: report at bugs.python.org (Daniel Birnstiel) Date: Mon, 20 Mar 2017 14:35:31 +0000 Subject: [issue29859] Return code of pthread_* in thread_pthread.h is not used for perror In-Reply-To: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za> Message-ID: <1490020531.17.0.347155893824.issue29859@psf.upfronthosting.co.za> Daniel Birnstiel added the comment: I have attached a diff adding a new macro for handling pthread_* status codes. Will submit PR as soon as my CLA is approved. ---------- keywords: +patch versions: +Python 3.7 Added file: http://bugs.python.org/file46746/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 10:44:46 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 20 Mar 2017 14:44:46 +0000 Subject: [issue24796] Deleting names referencing from enclosed and enclosing scopes In-Reply-To: <1438779917.48.0.0299421063838.issue24796@psf.upfronthosting.co.za> Message-ID: <1490021086.79.0.494269273717.issue24796@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- keywords: +easy stage: -> needs patch versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 10:59:16 2017 From: report at bugs.python.org (Lord Anton Hvornum) Date: Mon, 20 Mar 2017 14:59:16 +0000 Subject: [issue29860] smtplib.py doesn't capitalize EHLO. In-Reply-To: <1490020373.29.0.308540627587.issue29860@psf.upfronthosting.co.za> Message-ID: <1490021956.25.0.111333657333.issue29860@psf.upfronthosting.co.za> Lord Anton Hvornum added the comment: Turns out, this goes for a lot more commands, such as: ``` Traceback (most recent call last): File "mail.py", line 12, in smtp_server.sendmail(fromaddr, toaddrs, msg) File "/usr/lib/python3.6/smtplib.py", line 866, in sendmail raise SMTPSenderRefused(code, resp, from_addr) ``` The command that the server refused was: mail FROM: size=11 Again, this is mostly because traditionally server commands are upper case (even tho RFC 821 defines that they can be any syntax, such as `mAiL FroM`). But it would be nice if Python could keep consistency in it's syntax IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 11:07:54 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 20 Mar 2017 15:07:54 +0000 Subject: [issue29860] smtplib.py doesn't capitalize EHLO. In-Reply-To: <1490020373.29.0.308540627587.issue29860@psf.upfronthosting.co.za> Message-ID: <1490022474.8.0.446931586529.issue29860@psf.upfronthosting.co.za> R. David Murray added the comment: It is interesting that in all the years smtplib has been in use, this is the first time (as far as I know) this has been reported as a problem. I don't see any reason to object to changing it to send the commands in upper case, but the server you are talking to is definitely out of spec with the RFC :) ---------- components: +email nosy: +barry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 11:10:53 2017 From: report at bugs.python.org (Lord Anton Hvornum) Date: Mon, 20 Mar 2017 15:10:53 +0000 Subject: [issue29860] smtplib.py doesn't capitalize EHLO. In-Reply-To: <1490020373.29.0.308540627587.issue29860@psf.upfronthosting.co.za> Message-ID: <1490022653.83.0.261955806333.issue29860@psf.upfronthosting.co.za> Lord Anton Hvornum added the comment: Seeing as I'm the one who built the server, it sure is out of spec :) I could also quickly correct for this "issue" server-side. So this is more of a "style guideline" change client-side - If no one opposes of keeping commands stylistically the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 11:36:17 2017 From: report at bugs.python.org (Mark Becwar) Date: Mon, 20 Mar 2017 15:36:17 +0000 Subject: [issue29734] nt._getfinalpathname handle leak In-Reply-To: <1488799617.7.0.144245331277.issue29734@psf.upfronthosting.co.za> Message-ID: <1490024177.17.0.653597116876.issue29734@psf.upfronthosting.co.za> Changes by Mark Becwar : ---------- pull_requests: +653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 11:54:15 2017 From: report at bugs.python.org (Daniel Birnstiel) Date: Mon, 20 Mar 2017 15:54:15 +0000 Subject: [issue29859] Return code of pthread_* in thread_pthread.h is not used for perror In-Reply-To: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za> Message-ID: <1490025255.5.0.912178080006.issue29859@psf.upfronthosting.co.za> Changes by Daniel Birnstiel : ---------- pull_requests: +654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 12:51:41 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 20 Mar 2017 16:51:41 +0000 Subject: [issue29860] smtplib.py doesn't capitalize EHLO. In-Reply-To: <1490020373.29.0.308540627587.issue29860@psf.upfronthosting.co.za> Message-ID: <1490028701.23.0.486450648796.issue29860@psf.upfronthosting.co.za> R. David Murray added the comment: On the other hand, the current mixed case sending found a bug in your code, so it has some value. I'm neither in favor nor in objection to the change, at this point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 12:57:48 2017 From: report at bugs.python.org (Ken Odegard) Date: Mon, 20 Mar 2017 16:57:48 +0000 Subject: [issue14965] super() and property inheritance behavior In-Reply-To: <1338433441.66.0.975494137492.issue14965@psf.upfronthosting.co.za> Message-ID: <1490029068.65.0.641192387155.issue14965@psf.upfronthosting.co.za> Changes by Ken Odegard : ---------- nosy: +njalerikson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 13:02:00 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Mon, 20 Mar 2017 17:02:00 +0000 Subject: [issue14003] __self__ on built-in functions is not as documented In-Reply-To: <1329159935.3.0.264942191971.issue14003@psf.upfronthosting.co.za> Message-ID: <1490029320.2.0.174349386883.issue14003@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 14:00:01 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 20 Mar 2017 18:00:01 +0000 Subject: [issue29859] Return code of pthread_* in thread_pthread.h is not used for perror In-Reply-To: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za> Message-ID: <1490032801.22.0.943864277309.issue29859@psf.upfronthosting.co.za> INADA Naoki added the comment: Could you give us minimum sample Python code to reproduce the error? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 14:11:05 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 20 Mar 2017 18:11:05 +0000 Subject: [issue26418] multiprocessing.pool.ThreadPool eats up memories In-Reply-To: <1456220840.03.0.74121216833.issue26418@psf.upfronthosting.co.za> Message-ID: <1490033465.3.0.613188163683.issue26418@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Your script works fine here. I see: iter 30, 30040 iter 29, 269848 iter 28, 269848 iter 27, 271996 [...] ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 14:14:14 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 20 Mar 2017 18:14:14 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long Message-ID: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> New submission from Antoine Pitrou: The various workers in multiprocessing.Pool keep a reference to the last encountered task or task result. This means some data may be kept alive even after the caller is done with them, as long as some other task doesn't clobber the relevant variables. Specifically, Pool._handle_tasks(), Pool._handle_results() and the toplevel worker() function fail to clear references at the end of each loop. Originally reported at https://github.com/dask/distributed/issues/956 ---------- components: Library (Lib) messages: 289894 nosy: davin, pitrou, sbt priority: normal severity: normal stage: needs patch status: open title: multiprocessing Pool keeps objects (tasks, args, results) alive too long type: resource usage versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 14:17:28 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 20 Mar 2017 18:17:28 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1490033848.29.0.541336006729.issue29861@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Quick patch below. I'll make a PR once I have time to :-) diff --git a/Lib/multiprocessing/pool.py b/Lib/multiprocessing/pool.py index ffdf426..945afa2 100644 --- a/Lib/multiprocessing/pool.py +++ b/Lib/multiprocessing/pool.py @@ -128,6 +128,8 @@ def worker(inqueue, outqueue, initializer=None, initargs=(), maxtasks=None, util.debug("Possible encoding error while sending result: %s" % ( wrapped)) put((job, i, (False, wrapped))) + + task = job = result = func = args = kwds = None completed += 1 util.debug('worker exiting after %d tasks' % completed) @@ -402,6 +404,8 @@ class Pool(object): if set_length: util.debug('doing set_length()') set_length(i+1) + finally: + task = taskseq = job = None else: util.debug('task handler got sentinel') @@ -445,6 +449,7 @@ class Pool(object): cache[job]._set(i, obj) except KeyError: pass + task = job = obj = None while cache and thread._state != TERMINATE: try: @@ -461,6 +466,7 @@ class Pool(object): cache[job]._set(i, obj) except KeyError: pass + task = job = obj = None if hasattr(outqueue, '_reader'): util.debug('ensuring that outqueue is not full') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 14:40:51 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 20 Mar 2017 18:40:51 +0000 Subject: [issue29847] Path takes and ignores **kwargs In-Reply-To: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> Message-ID: <1490035251.48.0.251523999536.issue29847@psf.upfronthosting.co.za> Brett Cannon added the comment: Yep, kwargs should be dropped since it isn't used or documented: https://docs.python.org/3/library/pathlib.html#pathlib.PurePath (probably just a hold-over from when it did in some earlier version of the code). ---------- components: +Library (Lib) nosy: +brett.cannon type: -> behavior versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 14:42:21 2017 From: report at bugs.python.org (Roundup Robot) Date: Mon, 20 Mar 2017 18:42:21 +0000 Subject: [issue22708] httplib/http.client in method _tunnel used HTTP/1.0 CONNECT method In-Reply-To: <1414045283.61.0.401738994501.issue22708@psf.upfronthosting.co.za> Message-ID: <1490035341.3.0.796884262383.issue22708@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +655 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 14:43:52 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 20 Mar 2017 18:43:52 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1490035432.22.0.432961000333.issue29861@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 14:47:30 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Mon, 20 Mar 2017 18:47:30 +0000 Subject: [issue29847] Path takes and ignores **kwargs In-Reply-To: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> Message-ID: <1490035650.67.0.824271185937.issue29847@psf.upfronthosting.co.za> Jelle Zijlstra added the comment: Thanks, I'll add a PR. This doesn't need to be documented, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 15:01:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Mar 2017 19:01:21 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1490036481.89.0.164970924039.issue29816@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here are two patches. The first uses C long long arithmetic (it corresponds current PR 680), the second uses PyLong arithmetic. What is easier to read and verify? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 15:02:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Mar 2017 19:02:18 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1490036538.37.0.483514087062.issue29816@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file46747/long-shift-overflow-long-long.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 15:02:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Mar 2017 19:02:33 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1490036553.43.0.998070366798.issue29816@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file46748/long-shift-overflow-divrem1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 15:04:27 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 20 Mar 2017 19:04:27 +0000 Subject: [issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS In-Reply-To: <1489847707.41.0.897250288335.issue29846@psf.upfronthosting.co.za> Message-ID: <1490036667.11.0.630769965481.issue29846@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Adam! Note to self: see Makefile changes in GH-737 for Issue15590. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 15:05:46 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 20 Mar 2017 19:05:46 +0000 Subject: [issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS In-Reply-To: <1489847707.41.0.897250288335.issue29846@psf.upfronthosting.co.za> Message-ID: <1490036746.12.0.969886885393.issue29846@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Adam! Note to self: see Makefile changes in PR 737 for Issue15590. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 15:06:00 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 20 Mar 2017 19:06:00 +0000 Subject: [issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS In-Reply-To: <1489847707.41.0.897250288335.issue29846@psf.upfronthosting.co.za> Message-ID: <1490036760.68.0.743623392941.issue29846@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- Removed message: http://bugs.python.org/msg289899 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 15:08:48 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 20 Mar 2017 19:08:48 +0000 Subject: [issue29862] Fix grammar in importlib.reload() exception Message-ID: <1490036928.42.0.0658763709681.issue29862@psf.upfronthosting.co.za> New submission from Brett Cannon: https://github.com/python/cpython/blob/05f53735c8912f8df1077e897f052571e13c3496/Lib/importlib/__init__.py#L140 "reload() argument must be a module" (missing the "a"). ---------- assignee: brett.cannon components: Library (Lib) messages: 289901 nosy: brett.cannon priority: normal severity: normal status: open title: Fix grammar in importlib.reload() exception versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 15:15:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Mar 2017 19:15:26 +0000 Subject: [issue29847] Path takes and ignores **kwargs In-Reply-To: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> Message-ID: <1490037326.45.0.177191485152.issue29847@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The support of **kwargs in Path.__new__ is needed if you want to implement a subclass of Path with __init__ accepting keyword arguments (and since Path constructor takes variable number of positional arguments, new arguments should be keyword-only). >>> import pathlib >>> class MyPath(pathlib.PosixPath): ... def __init__(self, *args, spam=False): ... self.spam = spam ... >>> p = MyPath('/', spam=True) >>> p MyPath('/') >>> p.spam True Removing **kwargs from Path.__new__ will break the above example. >>> MyPath('/', spam=True) Traceback (most recent call last): File "", line 1, in TypeError: __new__() got an unexpected keyword argument 'spam' ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 15:22:29 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 20 Mar 2017 19:22:29 +0000 Subject: [issue29851] Have importlib.reload() raise ImportError when a spec can't be found In-Reply-To: <1489882196.37.0.503568145678.issue29851@psf.upfronthosting.co.za> Message-ID: <1490037749.03.0.248649218591.issue29851@psf.upfronthosting.co.za> Brett Cannon added the comment: First, I don't know what version you're testing against because 3.0.6.1 isn't an actual release of Python and 3.6.1 isn't released yet (unless you know something I don't know :) ). Second, the issue is that you're trying to import a module under a name which doesn't match the file specified. That's causing reload() to not be able to find the original source file to reload against, leading to the None being returned by importlib._bootstrap._find_spec() which is leading to the error you're seeing. (Remember, reload() basically runs like an import statement for the module you're reloading but recycles the module object.) Third, while an exception is reasonable in this case, it is misleading and reload() should be updated to raise an ImportError if _bootstrap._find_spec() returns None. I'm marking this issue as an easy fix since you just need to add an `is None` check on a return value and then raise ImportError if necessary in case someone wants to propose a PR to improve the error. It will require a doc update to document the change in the exception raised. ---------- keywords: +easy nosy: +brett.cannon, eric.snow, ncoghlan priority: normal -> low title: importlib.reload references None object -> Have importlib.reload() raise ImportError when a spec can't be found type: crash -> enhancement versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 16:39:45 2017 From: report at bugs.python.org (Daniel Birnstiel) Date: Mon, 20 Mar 2017 20:39:45 +0000 Subject: [issue29859] Return code of pthread_* in thread_pthread.h is not used for perror In-Reply-To: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za> Message-ID: <1490042385.09.0.271616628328.issue29859@psf.upfronthosting.co.za> Daniel Birnstiel added the comment: While you might scold me for the following code, it is just some fiddling with the cpython functions from python side. Backstory is issue 6721 or related to it. I am working on a multi-process service which uses multiprocessing (or rather the billiard fork). While forking I run into deadlocks as described in the issue when I fork while the io lock is acquired. In order to find a solution I experimented with the cpython module and tried to release the lock manually after a fork. The code can be found attached (tested with python 3.6/3.7 on OSX Sierra). While it does not really do what it is supposed to do, it shows the problem described in this issue (#29859): If the internal calls to the pthread_* functions fail, I will only get a generic error message: pthread_mutex_lock[3]: Undefined error: 0 pthread_cond_signal: Undefined error: 0 pthread_mutex_unlock[3]: Undefined error: 0 In reality the produced error messages should be: pthread_mutex_lock[3]: Invalid argument pthread_cond_signal: Invalid argument pthread_mutex_unlock[3]: Invalid argument This happens because the pthread_* functions do not set the erno variable as described in the issue description. Please note that the issue is not only related to my code, but might affect all code using locks. While I suppose there shouldn't be any errors when calling the low level functions, the attached patch/pr will make debugging a lot easier when it actually happens by displaying the correct error message. ---------- Added file: http://bugs.python.org/file46749/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 18:33:19 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 20 Mar 2017 22:33:19 +0000 Subject: [issue29863] Add a COMPACT constant to the json module Message-ID: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> New submission from Brett Cannon: In issue #29540 there was a suggestion to add a `compact` argument to json.dump() and json.dumps(). That was eventually rejected as adding complexity to an API that's already messy. But in GH-72 someone created a COMPACT constant to the json module which gets a similar effect as a `compact` argument but without expanding any APIs. Unfortunately I think the constant proposal got lost in discussion of adding the `compact` argument, so I'm opening a new issue to make a final decision as to whether we should accept/reject the COMPACT constant idea. ---------- components: Library (Lib) messages: 289905 nosy: brett.cannon, ezio.melotti, rhettinger priority: normal severity: normal status: open title: Add a COMPACT constant to the json module type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 18:33:53 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 20 Mar 2017 22:33:53 +0000 Subject: [issue29863] Add a COMPACT constant to the json module In-Reply-To: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> Message-ID: <1490049233.88.0.909798581435.issue29863@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +benhoyt, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 18:34:11 2017 From: report at bugs.python.org (Andrew Nester) Date: Mon, 20 Mar 2017 22:34:11 +0000 Subject: [issue29863] Add a COMPACT constant to the json module In-Reply-To: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> Message-ID: <1490049251.07.0.964895998085.issue29863@psf.upfronthosting.co.za> Changes by Andrew Nester : ---------- pull_requests: +657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 19:14:51 2017 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 20 Mar 2017 23:14:51 +0000 Subject: [issue29863] Add a COMPACT constant to the json module In-Reply-To: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> Message-ID: <1490051691.79.0.473340020562.issue29863@psf.upfronthosting.co.za> Eric V. Smith added the comment: +1: gets the job done without complicating the API. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 19:16:41 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 20 Mar 2017 23:16:41 +0000 Subject: [issue29860] smtplib.py doesn't capitalize EHLO. In-Reply-To: <1490020373.29.0.308540627587.issue29860@psf.upfronthosting.co.za> Message-ID: <1490051801.97.0.231552230271.issue29860@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Is EHLO the only command sent in lower case? I think it might not be. I suppose I'm a solid ?0 on changing this (how's that for a completely neutral endorsement?). I won't do the change myself, but I'd review a pull request. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 22:41:21 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 21 Mar 2017 02:41:21 +0000 Subject: [issue29859] Return code of pthread_* in thread_pthread.h is not used for perror In-Reply-To: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za> Message-ID: <1490064081.76.0.885430483314.issue29859@psf.upfronthosting.co.za> INADA Naoki added the comment: I don't know your patch is worth enough or not. (I dislike fprintf(stderr, ...) at least). But my advice is stop mixing multithreading and fork (except fork+exec). It's almost impossible. While Python has GIL, some extension can release GIL and run any C code. But very vary functions are not fork-safe. Even malloc and printf are unsafe. For more information, see "rational" section in http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_atfork.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 23:14:44 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 21 Mar 2017 03:14:44 +0000 Subject: [issue29849] fix memory leak in import_from In-Reply-To: <1489863596.03.0.14582514818.issue29849@psf.upfronthosting.co.za> Message-ID: <1490066084.31.0.464544266114.issue29849@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 23:16:05 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 21 Mar 2017 03:16:05 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490066165.2.0.429343626551.issue27593@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 20 23:22:29 2017 From: report at bugs.python.org (renlifeng) Date: Tue, 21 Mar 2017 03:22:29 +0000 Subject: [issue26418] multiprocessing.pool.ThreadPool eats up memories In-Reply-To: <1456220840.03.0.74121216833.issue26418@psf.upfronthosting.co.za> Message-ID: <1490066549.8.0.0488326747717.issue26418@psf.upfronthosting.co.za> renlifeng added the comment: I confirm that 3.5.3 and 2.7.13 have fixed this problem. Now the memory usage will stop growing after using 28% of physical memory. In other words, this problem can not be reproduced with the latest version of python, Thanks. It's OK for me to set it to any of out of date, fixed, or closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 00:06:20 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Mar 2017 04:06:20 +0000 Subject: [issue29863] Add a COMPACT constant to the json module In-Reply-To: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> Message-ID: <1490069180.42.0.49950771068.issue29863@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -1 We already have a way to do it. I teach this way in my Python courses and there is a zero learning curve. It isn't difficult at all. ---------- assignee: -> bob.ippolito nosy: +bob.ippolito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 00:06:55 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 21 Mar 2017 04:06:55 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490069215.41.0.58566436515.issue27593@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 00:12:50 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 21 Mar 2017 04:12:50 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490069570.47.0.177939796927.issue27593@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +660 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 00:49:01 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 21 Mar 2017 04:49:01 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490071741.78.0.254962926979.issue27593@psf.upfronthosting.co.za> Ned Deily added the comment: Based on Brett's and Steve's feedback, I've pushed some tweaks to the captured git info. With the changes, we now use --short form of git hash. And we use output from "git describe --all --always --dirty" for the tag. I added --all and --always for better results with development builds; the results should be the same for release (tagged) builds - I think. I'm going to cherry pick this into 3.6.1 final and we can see how this works for development builds and further tweak as necessary. Steve, note that I was brave and modified the Windows builds; yay, AppVeyor. I'll also cherrypick these to 2.7 soon. Expected outputs: 1. previous hg 2. previous git 3. updated git Release (tagged) build: 1. Python 3.7.0a0 (v3.7.0a0:4def2a2901a5, ... 2. Python 3.7.0a0 (v3.7.0a0^0:05f53735c8912f8df1077e897f052571e13c3496, ... 3. Python 3.7.0a0 (v3.7.0a0:05f53735c8, ... Development build: 1. Python 3.7.0a0 (default:41df79263a11, ... 2. Python 3.7.0a0 (master:05f53735c8912f8df1077e897f052571e13c3496, ... 3. Python 3.7.0a0 (heads/master-dirty:05f53735c8, ... "dirty" means the working tree has uncommitted changes. See "git help describe" for more info. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 00:51:13 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Mar 2017 04:51:13 +0000 Subject: [issue29863] Add a COMPACT constant to the json module In-Reply-To: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> Message-ID: <1490071873.32.0.00609670696322.issue29863@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Actually, only put me down for -0. This isn't a necessary change but it isn't egregious either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 00:53:36 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 21 Mar 2017 04:53:36 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490072016.58.0.666635391633.issue21895@psf.upfronthosting.co.za> Nathaniel Smith added the comment: It turns out that this bug is more general than signal.pause, and has caused problems for a few different people: https://github.com/dabeaz/curio/issues/118#issuecomment-287735781 https://github.com/dabeaz/curio/issues/118#issuecomment-287798241 https://github.com/dabeaz/curio/issues/118#issuecomment-287887843 The basic problem is that CPython's signal handling strategy on Unix-likes assumes that if a signal is delivered to the process at a time when the main thread is blocked in a syscall, then that syscall will promptly exit with EINTR. So for example, time.sleep has some clever code on Windows to make it interruptible with control-C, but on Unix we assume that the kernel will break the sleep for us. The problem with this is that POSIX only guarantees that *some* thread will receive the signal -- not necessarily the main thread. In practice it seems like most implementations do deliver most signals to the main thread or CPython wouldn't have gotten away with this for as long as it has, but in particular it seems like Linux is happy to deliver SIGCHLD to random other threads. So the C-level signal handler runs in whatever thread, it sets the flag for the main thread to run the Python-level signal handler... and then the main thread sits there blocked in sleep() or select() or pause() or whatever, and never checks the flag. A simple solution would be to make sure signals are always delivered to the main thread, by adjusting the C-level signal handler to do something like: if (current_thread != main_thread) { pthread_kill(main_thread, sig_num); return; } ---------- nosy: +njs title: signal.pause() doesn't wake up on SIGCHLD in non-main thread -> signal.pause() and signal handlers don't react to SIGCHLD in non-main thread versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 01:14:28 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 21 Mar 2017 05:14:28 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490073268.57.0.669483820859.issue29857@psf.upfronthosting.co.za> Nick Coghlan added the comment: For CPython, I was thinking of having it be "whatever gets passed to Py_Main", and that accepts wchar_t in Py3 [1], so on *Nix systems, the command line has already been decoded with [2] by the time it runs. [1] https://docs.python.org/3/c-api/veryhigh.html#c.Py_Main [2] https://docs.python.org/3/c-api/sys.html#c.Py_DecodeLocale In the case of Windows, the wchar_t array is received straight from the OS as UTF-16-LE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 02:02:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 06:02:13 +0000 Subject: [issue29864] Misuse of Py_SIZE in dict.fromkey() Message-ID: <1490076133.0.0.154466123244.issue29864@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In dict.fromkeys() implementation when a dict is passed its size is determined by using the Py_SIZE macro. This is not correct since PyDictObject is not a PyVarObject (but see issue28988). ---------- components: Interpreter Core messages: 289915 nosy: inada.naoki, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Misuse of Py_SIZE in dict.fromkey() type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 02:03:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 06:03:30 +0000 Subject: [issue29864] Misuse of Py_SIZE in dict.fromkey() In-Reply-To: <1490076133.0.0.154466123244.issue29864@psf.upfronthosting.co.za> Message-ID: <1490076210.95.0.861019575968.issue29864@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 02:19:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 06:19:52 +0000 Subject: [issue29865] Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types Message-ID: <1490077192.4.0.970659730607.issue29865@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch replaces Py_SIZE with PyXXX_GET_SIZE macros for concrete types. For details see https://mail.python.org/pipermail/python-dev/2017-March/147628.html . Py_SIZE still is used in concrete type implementations and when set the new size: `Py_SIZE(obj) = newsize`. ---------- components: Extension Modules, Interpreter Core messages: 289916 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 02:24:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 06:24:40 +0000 Subject: [issue29865] Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types In-Reply-To: <1490077192.4.0.970659730607.issue29865@psf.upfronthosting.co.za> Message-ID: <1490077480.34.0.785249678889.issue29865@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 02:25:21 2017 From: report at bugs.python.org (Decorater) Date: Tue, 21 Mar 2017 06:25:21 +0000 Subject: [issue29866] Added datetime_diff to datetime.py. Message-ID: <1490077521.83.0.664563461017.issue29866@psf.upfronthosting.co.za> New submission from Decorater: The datetime_diff function compares two datetime objects and returns the time since the prior datetime objects (based on the current datetime object) in a what that is readable by humans. This is useful when one might need to compare two datetime objects, keeping ones codebase as small as possible (to ensure fast Python code), and to reduce 'hacks' in their code to make the comparison more readable by humans the github pull request comes with changes to datetime.rst as well Note: This is currently targeting 3.7, however if you guys desire you guys could backport it into 3.5 and 3.6. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 289917 nosy: Decorater, docs at python priority: normal severity: normal status: open title: Added datetime_diff to datetime.py. versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 02:25:36 2017 From: report at bugs.python.org (Decorater) Date: Tue, 21 Mar 2017 06:25:36 +0000 Subject: [issue29866] Added datetime_diff to datetime.py. In-Reply-To: <1490077521.83.0.664563461017.issue29866@psf.upfronthosting.co.za> Message-ID: <1490077536.86.0.581103506457.issue29866@psf.upfronthosting.co.za> Changes by Decorater : ---------- pull_requests: +663 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 02:35:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 06:35:04 +0000 Subject: [issue29866] Added datetime_diff to datetime.py. In-Reply-To: <1490077521.83.0.664563461017.issue29866@psf.upfronthosting.co.za> Message-ID: <1490078104.29.0.088529642467.issue29866@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In most cases you needed localized version. And I doubt that it makes much sense to output seconds seconds when the difference is larger than a year. Often you need to use other units for quantizations, e.g. "1 1/4 hours ago" as on this tracker. This function doesn't look enough general for including in the stdlib. ---------- nosy: +belopolsky, serhiy.storchaka stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 02:41:15 2017 From: report at bugs.python.org (Decorater) Date: Tue, 21 Mar 2017 06:41:15 +0000 Subject: [issue29866] Added datetime_diff to datetime.py. In-Reply-To: <1490077521.83.0.664563461017.issue29866@psf.upfronthosting.co.za> Message-ID: <1490078475.29.0.47431513285.issue29866@psf.upfronthosting.co.za> Decorater added the comment: I have people who would use it and there are use cases for it as well. Also it works perfectly fine the other one I added to it's docstring is an example datetime object of my very own discord account from when I created it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 02:53:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 06:53:59 +0000 Subject: [issue29864] Misuse of Py_SIZE in dict.fromkey() In-Reply-To: <1490076133.0.0.154466123244.issue29864@psf.upfronthosting.co.za> Message-ID: <1490079239.26.0.00253367936408.issue29864@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 02:54:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 06:54:33 +0000 Subject: [issue29865] Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types In-Reply-To: <1490077192.4.0.970659730607.issue29865@psf.upfronthosting.co.za> Message-ID: <1490079273.21.0.400633173588.issue29865@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 02:57:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 Mar 2017 06:57:51 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: Message-ID: STINNER Victor added the comment: If the main thread waits on select() and uses a pipe with signal.set_wakeup_fd(), it should be fine. Is that your case? Asyncio requires to have an event loop running in the main thread to spawn child processes, to get SIGCHLD signals to get notified of child completions. Or you can ignore these signals and use the "safe" child waiter using waitall() and then iterate on all children. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 03:10:30 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 21 Mar 2017 07:10:30 +0000 Subject: [issue29863] Add a COMPACT constant to the json module In-Reply-To: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> Message-ID: <1490080230.96.0.628420606896.issue29863@psf.upfronthosting.co.za> INADA Naoki added the comment: -0. COMPACT_SEPARATOR make more sense to me. Because `ensure_ascii=False` may make JSON more compact too. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 03:11:17 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 21 Mar 2017 07:11:17 +0000 Subject: [issue29864] Misuse of Py_SIZE in dict.fromkey() In-Reply-To: <1490076133.0.0.154466123244.issue29864@psf.upfronthosting.co.za> Message-ID: <1490080277.95.0.488071507189.issue29864@psf.upfronthosting.co.za> Xiang Zhang added the comment: How about 3.6, Serhiy? I see you treat this as a bugfix on the PR. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 03:28:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 07:28:44 +0000 Subject: [issue29863] Add a COMPACT constant to the json module In-Reply-To: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> Message-ID: <1490081324.96.0.704475378397.issue29863@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: -0 too. This complicates the module API without a need. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 03:35:32 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 07:35:32 +0000 Subject: [issue29864] Misuse of Py_SIZE in dict.fromkey() In-Reply-To: <1490076133.0.0.154466123244.issue29864@psf.upfronthosting.co.za> Message-ID: <1490081732.17.0.418720223755.issue29864@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +664 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 03:39:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 07:39:17 +0000 Subject: [issue29864] Misuse of Py_SIZE in dict.fromkey() In-Reply-To: <1490076133.0.0.154466123244.issue29864@psf.upfronthosting.co.za> Message-ID: <1490081957.7.0.864186711773.issue29864@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, I treat this as a bugfix but I hesitated about backporting it. Py_SIZE works "by accident" and we can't change the layout of PyDictObject structure in maintain branches. I have backported the fix to 3.6, but not to other branches since PyDict_GET_SIZE was added in 3.6 and other branches would need modifying the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 03:48:33 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 21 Mar 2017 07:48:33 +0000 Subject: [issue29864] Misuse of Py_SIZE in dict.fromkey() In-Reply-To: <1490076133.0.0.154466123244.issue29864@psf.upfronthosting.co.za> Message-ID: <1490082513.31.0.872192853993.issue29864@psf.upfronthosting.co.za> Xiang Zhang added the comment: I think 3.6 is enough. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 03:50:57 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 21 Mar 2017 07:50:57 +0000 Subject: [issue26418] multiprocessing.pool.ThreadPool eats up memories In-Reply-To: <1456220840.03.0.74121216833.issue26418@psf.upfronthosting.co.za> Message-ID: <1490082657.52.0.545226971397.issue26418@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the feedback! I'm closing the issue then. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 03:53:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 07:53:03 +0000 Subject: [issue29867] Add asserts in PyXXX_GET_SIZE macros Message-ID: <1490082783.53.0.325668446272.issue29867@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch adds asserts for checking the type in macros PyTuple_GET_SIZE, PyList_GET_SIZE and PySet_GET_SIZE. This can help to find the misuse of these macros. Asserts already are used in macros PyBytes_GET_SIZE, PyByteArray_GET_SIZE, PyUnicode_GET_SIZE and PyDict_GET_SIZE. See also the discussion on Python-Dev: https://mail.python.org/pipermail/python-dev/2017-March/147628.html . This change can break the code that uses these macros for setting the size. For example one place in odictobject.c. But I expect that such cases are rare. And all these macros are not in the limited API. ---------- components: Interpreter Core messages: 289927 nosy: haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Add asserts in PyXXX_GET_SIZE macros type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 03:55:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 07:55:23 +0000 Subject: [issue29867] Add asserts in PyXXX_GET_SIZE macros In-Reply-To: <1490082783.53.0.325668446272.issue29867@psf.upfronthosting.co.za> Message-ID: <1490082923.17.0.10027241288.issue29867@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 04:14:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 08:14:55 +0000 Subject: [issue28749] Fixed the documentation of the mapping codec APIs In-Reply-To: <1479637798.25.0.994184606714.issue28749@psf.upfronthosting.co.za> Message-ID: <1490084095.04.0.514045016307.issue28749@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 04:50:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 08:50:36 +0000 Subject: [issue29866] Added datetime_diff to datetime.py. In-Reply-To: <1490077521.83.0.664563461017.issue29866@psf.upfronthosting.co.za> Message-ID: <1490086236.83.0.910859744561.issue29866@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In that case you can publish your code as a receipt or as a module on PyPI. If it will be popular enough we can consider including it in the stdlib. Currently your code is just broken. >>> datetime.datetime_diff(datetime.datetime(2017, 1, 31), datetime.datetime(2017, 1, 31)) ' ago.' >>> datetime.datetime_diff(datetime.datetime(2016, 12, 31, 23, 59, 59), datetime.datetime(2017, 1, 1)) '1 years ago.' >>> datetime.datetime_diff(datetime.datetime(2016, 1, 31), datetime.datetime(2017, 1, 31, 1)) '1 years1 hours ago.' ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 05:54:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 Mar 2017 09:54:48 +0000 Subject: [issue29867] Add asserts in PyXXX_GET_SIZE macros In-Reply-To: <1490082783.53.0.325668446272.issue29867@psf.upfronthosting.co.za> Message-ID: <1490090088.41.0.728361624044.issue29867@psf.upfronthosting.co.za> STINNER Victor added the comment: We should test to run popular C extensions like numpy, PyQt, cython, pillow, etc. with a patched Python to see if it's common to use a "GET" macro to "set" a size. Maybe test also Django see it probably uses many C extensions. I don't ask to test all these modules, but at least a few of them. By "testing", I mean run the test suite of these projects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 06:14:34 2017 From: report at bugs.python.org (Daniel Birnstiel) Date: Tue, 21 Mar 2017 10:14:34 +0000 Subject: [issue29859] Return code of pthread_* in thread_pthread.h is not used for perror In-Reply-To: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za> Message-ID: <1490091274.62.0.53304576321.issue29859@psf.upfronthosting.co.za> Daniel Birnstiel added the comment: While I agree, fprintf it not really nice, I looked through other parts of the python source where information is printed to stderr and fprintf was used there as well, so I fell back to it myself. % grep -rnw . -e "fprintf(stderr," | wc -l 178 Using threading and multiprocessing is insane, I know that. Nevertheless the error codes returned by the pthread_* calls are processed incorrectly, so I would consider this a bug worth fixing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 06:28:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 Mar 2017 10:28:48 +0000 Subject: [issue29736] Optimize builtin types constructor In-Reply-To: <1488812174.68.0.707747009021.issue29736@psf.upfronthosting.co.za> Message-ID: <1490092128.1.0.527644918393.issue29736@psf.upfronthosting.co.za> STINNER Victor added the comment: The following types were patched to use Argument Clinic (use now _PyArg_ParseTupleAndKeywordsFast or don't accept keyword arguments anymore): * complex * float (don't accept keywords anymore) * list * tuple The following types still uses PyArg_ParseTupleAndKeywords: * bytes * bytearray * int (PyLong) * str (unicode_new) bool doesn't accept keywords anymore and uses now PyArg_UnpackTuple(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 06:34:38 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 21 Mar 2017 10:34:38 +0000 Subject: [issue29859] Return code of pthread_* in thread_pthread.h is not used for perror In-Reply-To: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za> Message-ID: <1490092478.22.0.99433977922.issue29859@psf.upfronthosting.co.za> INADA Naoki added the comment: OK, perror() writes to stderr too. fair enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 07:17:38 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 21 Mar 2017 11:17:38 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490095058.41.0.603849165332.issue29857@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Why is the name flagged as a private implementation detail? I.e. a single leading underscore. I'd be reluctant to rely on this in production code, given how strong the _private convention is. Suggest just `sys.raw_args` instead. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 07:47:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 Mar 2017 11:47:17 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490096837.04.0.42920077295.issue29857@psf.upfronthosting.co.za> STINNER Victor added the comment: > As bytes? No, text please. Text is just more convenient in Python, and it's trivial to retrieve original bytes: raw_args_bytes = [os.fsencode(arg) for arg in sys._raw_args] ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 09:13:21 2017 From: report at bugs.python.org (Daniel Birnstiel) Date: Tue, 21 Mar 2017 13:13:21 +0000 Subject: [issue29859] Return code of pthread_* in thread_pthread.h is not used for perror In-Reply-To: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za> Message-ID: <1490102001.25.0.225208913314.issue29859@psf.upfronthosting.co.za> Changes by Daniel Birnstiel : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 09:21:06 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 21 Mar 2017 13:21:06 +0000 Subject: [issue17792] Unhelpful UnboundLocalError due to del'ing of exception target In-Reply-To: <1366329322.51.0.489771554551.issue17792@psf.upfronthosting.co.za> Message-ID: <1490102466.29.0.87183345595.issue17792@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 09:21:22 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 21 Mar 2017 13:21:22 +0000 Subject: [issue29593] Improve UnboundLocalError message for deleted names In-Reply-To: <1487351217.08.0.939746599909.issue29593@psf.upfronthosting.co.za> Message-ID: <1490102482.98.0.553239053938.issue29593@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 09:43:20 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 21 Mar 2017 13:43:20 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1490096837.04.0.42920077295.issue29857@psf.upfronthosting.co.za> Message-ID: <20170321094316.517346a0@subdivisions.wooz.org> Barry A. Warsaw added the comment: On Mar 21, 2017, at 11:47 AM, STINNER Victor wrote: >No, text please. Text is just more convenient in Python, and it's trivial to >retrieve original bytes: > >raw_args_bytes = [os.fsencode(arg) for arg in sys._raw_args] Well, "raw args" implies minimal or no processing, so bytes would make the most sense. It doesn't bother me that it's inconvenient; this won't be an oft used API and the conversion to strings should be just as easy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 09:53:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 Mar 2017 13:53:00 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490104380.66.0.759772630534.issue29857@psf.upfronthosting.co.za> STINNER Victor added the comment: > Well, "raw args" implies minimal or no processing, Ok, so call it "original", sys.orig_arv, in that case ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 10:04:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 Mar 2017 14:04:54 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490105094.94.0.20650501219.issue29857@psf.upfronthosting.co.za> STINNER Victor added the comment: There is already an existing public C API get retrieve original program arguments *as text*: /* Make the *original* argc/argv available to other modules. This is rare, but it is needed by the secureware extension. */ void Py_GetArgcArgv(int *argc, wchar_t ***argv) { *argc = orig_argc; *argv = orig_argv; } Are you talking about exposing these arguments at the Python level? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 10:54:56 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 21 Mar 2017 14:54:56 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490108096.66.0.0538094082413.issue29857@psf.upfronthosting.co.za> Nick Coghlan added the comment: @Steven This is an implementation detail in the same sense that sys._getframe() is: it's not something that's actually going to make sense in all contexts. For example, if Py_Main() is never called (for CPython), it would still be None, and other implementations may not define it at all. And even when it's set for CPython, the exact details of what it contains are going to be at least somewhat platform dependent. @Barry On Windows we define `mainw` rather than `main`, so it's the UTF-16-LE encoded text that is the "raw" form. That means the "raw" here refers to "before the Python interpreter CLI processing" - the normalization step to get the command line to wchar_t regardless of platform isn't going to be skipped (since the interpreter runtime itself never even sees the raw bytes in Python 3). One option would be to use a longer name like `sys._executable_argv`, since in the typical case, `sys.executable` and `sys._executable_argv[0]` will be the same. @Victor It wouldn't be exactly the same as Py_GetArgcArgv, as I'd propose making a pristine copy *before* Py_Main() mutates anything - we do some in-place editing of entries while figuring out what "sys.argv[0]" should look like at the Python level. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 11:00:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 Mar 2017 15:00:18 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490108418.91.0.668449839042.issue29857@psf.upfronthosting.co.za> STINNER Victor added the comment: > For example, if Py_Main() is never called (for CPython), it would still be None, What is the content of sys.argv in that case? Can't we use the same value for sys._raw_argv? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 11:18:51 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 21 Mar 2017 15:18:51 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490109531.93.0.15683574524.issue29857@psf.upfronthosting.co.za> Nick Coghlan added the comment: If the embedding application doesn't call PySys_SetArgv or PySys_SetArgvEx, then there is no `argv` attribute defined in the sys module (I wasn't actually sure what happened in that case, so I went and checked the code). For the reference CLI, the relevant call happens in Py_Main() after all the interpreter level arguments have been processed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 11:32:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 21 Mar 2017 15:32:33 +0000 Subject: [issue29857] Provide `sys._raw_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490110353.28.0.296729768618.issue29857@psf.upfronthosting.co.za> STINNER Victor added the comment: > If the embedding application doesn't call PySys_SetArgv or PySys_SetArgvEx, then there is no `argv` attribute defined in the sys module (I wasn't actually sure what happened in that case, so I went and checked the code). Ok, so just don't define sys._raw_argv in that case. But it doesn't seem enough to me to justify to make the attribute private. https://docs.python.org/dev/library/sys.html#sys.getallocatedblocks can be seen as an implementation detail.The method name has no underscore prefix, but a simple fallback: return 0 if the feature is is not implemented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 11:59:47 2017 From: report at bugs.python.org (Bob Ippolito) Date: Tue, 21 Mar 2017 15:59:47 +0000 Subject: [issue29863] Add a COMPACT constant to the json module In-Reply-To: <1490049199.07.0.61664177999.issue29863@psf.upfronthosting.co.za> Message-ID: <1490111987.7.0.55079893023.issue29863@psf.upfronthosting.co.za> Bob Ippolito added the comment: I suppose I'm +0. I don't think this is particularly useful, but this is closer to the ideal of just having a boolean option. We should probably also plan to remove the documentation for what the type of separators is to give the impression that COMPACT and the default are the only valid options. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 12:51:38 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 21 Mar 2017 16:51:38 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490115098.42.0.64242061987.issue27593@psf.upfronthosting.co.za> Brett Cannon added the comment: The output LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 13:07:40 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 21 Mar 2017 17:07:40 +0000 Subject: [issue29862] Fix grammar typo in importlib.reload() exception In-Reply-To: <1490036928.42.0.0658763709681.issue29862@psf.upfronthosting.co.za> Message-ID: <1490116060.25.0.188382381301.issue29862@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: Fix grammar in importlib.reload() exception -> Fix grammar typo in importlib.reload() exception _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 13:12:24 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 21 Mar 2017 17:12:24 +0000 Subject: [issue29847] Path takes and ignores **kwargs In-Reply-To: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> Message-ID: <1490116344.91.0.742863319846.issue29847@psf.upfronthosting.co.za> Brett Cannon added the comment: Shoot, that's too bad. I guess we should document it then so people are aware that keyword arguments are ignored, else we will break subclasses. There's also an unfortunate difference between PurePath and Path as PurePath doesn't have this quirk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 13:25:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Mar 2017 17:25:34 +0000 Subject: [issue29847] Path takes and ignores **kwargs In-Reply-To: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> Message-ID: <1490117134.73.0.584193139602.issue29847@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't know whether it was the intension of Antoine or just an oversight. I don't know whether it is used in the wild. But we can at least raise a TypeError for concrete classes PosixPath and WindowsPath if ignoring keyword arguments is a problem. Many extension types don't take keyword arguments, but their subclasses accept and ignore keyword arguments. For example: >>> filter(None, [], foo=123) Traceback (most recent call last): File "", line 1, in TypeError: filter() does not take keyword arguments >>> class X(filter): pass ... >>> X(None, [], foo=123) <__main__.X object at 0xb6fdcacc> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 13:32:27 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 21 Mar 2017 17:32:27 +0000 Subject: [issue29847] Path takes and ignores **kwargs In-Reply-To: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> Message-ID: <1490117547.15.0.845988153143.issue29847@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The support of **kwargs in Path.__new__ is needed if you want to implement a subclass of Path with __init__ accepting keyword arguments I don't remember exactly, but I think this was the intention indeed. There was originally an openat-using subclass, and IIRC it took additional parameters (such as the directory fd). That got scrapped quite early in the process, so we can remove the **kwargs thing now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 13:58:10 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 21 Mar 2017 17:58:10 +0000 Subject: [issue29859] Return code of pthread_* in thread_pthread.h is not used for perror In-Reply-To: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za> Message-ID: <1490119090.69.0.0617274146631.issue29859@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +666 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 14:13:41 2017 From: report at bugs.python.org (Decorater) Date: Tue, 21 Mar 2017 18:13:41 +0000 Subject: [issue29866] Added datetime_diff to datetime.py. In-Reply-To: <1490077521.83.0.664563461017.issue29866@psf.upfronthosting.co.za> Message-ID: <1490120021.84.0.0684845022749.issue29866@psf.upfronthosting.co.za> Decorater added the comment: Oh, I just realized I forgot to add other if's to each block in case certain parts was 0 but others was not. I also realized I tried to do datetime.datetime.new instead of datetime.datetime.now on the tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 14:36:30 2017 From: report at bugs.python.org (Decorater) Date: Tue, 21 Mar 2017 18:36:30 +0000 Subject: [issue29866] Added datetime_diff to datetime.py. In-Reply-To: <1490077521.83.0.664563461017.issue29866@psf.upfronthosting.co.za> Message-ID: <1490121390.47.0.0541646757253.issue29866@psf.upfronthosting.co.za> Decorater added the comment: Alright I revised it a bit locally too >>> import datetime >>> datetime.datetime_diff(datetime.datetime(2017, 1, 31), datetime.datetime(2017, 1, 31)) '' >>> datetime.datetime_diff(datetime.datetime(2016, 12, 31, 23, 59, 59), datetime.datetime(2017, 1, 1)) '1 year ago.' >>> datetime.datetime_diff(datetime.datetime(2016, 1, 31), datetime.datetime(2017, 1, 31, 1)) '1 year, 1 hour ago.' >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 14:37:27 2017 From: report at bugs.python.org (Decorater) Date: Tue, 21 Mar 2017 18:37:27 +0000 Subject: [issue29866] Added datetime_diff to datetime.py. In-Reply-To: <1490077521.83.0.664563461017.issue29866@psf.upfronthosting.co.za> Message-ID: <1490121447.94.0.207989028338.issue29866@psf.upfronthosting.co.za> Decorater added the comment: I plan to also have it to where if it is the last unit in the thing that it appends an and to the end as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 16:41:58 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 21 Mar 2017 20:41:58 +0000 Subject: [issue24796] Deleting names referencing from enclosed and enclosing scopes In-Reply-To: <1438779917.48.0.0299421063838.issue24796@psf.upfronthosting.co.za> Message-ID: <1490128918.33.0.708876850514.issue24796@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- pull_requests: +667 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 18:59:06 2017 From: report at bugs.python.org (John Wiseman) Date: Tue, 21 Mar 2017 22:59:06 +0000 Subject: [issue29868] multiprocessing.dummy missing cpu_count Message-ID: <1490137146.46.0.712424049962.issue29868@psf.upfronthosting.co.za> New submission from John Wiseman: The documentation for the multiprocessing.dummy module says that it "replicates the API of multiprocessing." In Python 2.7, I can import multiprocessing.dummy and use the cpu_count function: $ python2 Python 2.7.12 (default, Oct 29 2016, 19:21:06) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing.dummy as mp >>> mp.cpu_count() 8 But in Python 3.6, multiprocessing.dummy is missing cpu_count: $ python3 Python 3.6.0 (default, Mar 21 2017, 13:27:21) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing.dummy as mp >>> mp.cpu_count() Traceback (most recent call last): File "", line 1, in AttributeError: module 'multiprocessing.dummy' has no attribute 'cpu_count' I would expect that multiprocessing.dummy would have cpu_count, since that function is available in multiprocessing, and it's there in Python 2.7. It looks like it was removed in commit 04842a8, "Remove unused or redundant imports in concurrent.futures and multiprocessing" (Florent Xicluna 5 years ago). Maybe the removal was inadvertent? I realize there are several workarounds, but based on the documentation and the behavior of previous versions, I wouldn't have expected this breaking change. ---------- components: Library (Lib) messages: 289950 nosy: johnwiseman priority: normal severity: normal status: open type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 20:12:25 2017 From: report at bugs.python.org (Nevada Sanchez) Date: Wed, 22 Mar 2017 00:12:25 +0000 Subject: [issue29869] Underscores in numeric literals not supported in lib2to3. Message-ID: <1490141545.37.0.710126019998.issue29869@psf.upfronthosting.co.za> New submission from Nevada Sanchez: The following should work in Python 3.6 ``` from lib2to3.pgen2 import driver from lib2to3 import pytree from lib2to3 import pygram _GRAMMAR_FOR_PY3 = pygram.python_grammar_no_print_statement.copy() parser_driver = driver.Driver(_GRAMMAR_FOR_PY3, convert=pytree.convert) tree = parser_driver.parse_string('100_1\n', debug=False) ``` ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 289951 nosy: nevsan priority: normal severity: normal status: open title: Underscores in numeric literals not supported in lib2to3. type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 20:13:36 2017 From: report at bugs.python.org (Nevada Sanchez) Date: Wed, 22 Mar 2017 00:13:36 +0000 Subject: [issue29869] Underscores in numeric literals not supported in lib2to3. In-Reply-To: <1490141545.37.0.710126019998.issue29869@psf.upfronthosting.co.za> Message-ID: <1490141616.57.0.524198647604.issue29869@psf.upfronthosting.co.za> Changes by Nevada Sanchez : ---------- pull_requests: +668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 20:55:05 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 22 Mar 2017 00:55:05 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490144105.18.0.238908309618.issue21895@psf.upfronthosting.co.za> Nathaniel Smith added the comment: I don't really have a specific use case personally -- for trio, I haven't found a way to make use of set_wakeup_fd because of various issues[1], but I'm also not planning to use SIGCHLD, so this isn't very urgent. In general set_wakeup_fd can be a workaround, but I wanted to note this upstream because it's a bug in Python's signal handler logic. Note that Python already goes to great lengths to make e.g. signal handlers run during time.sleep on Windows; they ought to just work on Unix too. -- [1] (Off-topic but in case you're curious: I register actual signal handlers anyway because I follow the philosophy that the wakeup pipe should only be used for wakeups rather than transmitting information, so as long as signal handlers work I can do my own wakeups, + for some reason set_wakeup_fd doesn't work for me on Windows (no idea why, can't reproduce in simplified tests, might be my fault, need to debug), + set_wakeup_fd's handling of buffer overflow is broken for my purposes.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 21:10:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 01:10:04 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1490144105.18.0.238908309618.issue21895@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2017-03-22 1:55 GMT+01:00 Nathaniel Smith : > + for some reason set_wakeup_fd doesn't work for me on Windows (no idea why, can't reproduce in simplified tests, might be my fault, need to debug), I modified signal.set_wakeup_fd() to accept a socket handle on Windows. Are you using socket.socketpair() on Windows? Or do you pass a pipe? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 21:10:31 2017 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 22 Mar 2017 01:10:31 +0000 Subject: [issue29870] ssl socket leak Message-ID: <1490145031.23.0.122177607626.issue29870@psf.upfronthosting.co.za> New submission from Alexander Mohr: When upgrading to 3.5.3 we noticed that the requests module was leaking memory rather quickly. This led to me logging the issue: https://github.com/kennethreitz/requests/issues/3933. After more investigation I've found that the leak is caused by the raw python SSL sockets. I've created a test file here: https://gist.github.com/thehesiod/ef79dd77e2df7a0a7893dfea6325d30a which allows you to reproduce the leak with raw python ssl socket (CLIENT_TYPE = ClientType.RAW), aiohttp or requests. They all leak in a similar way due to their use of the python SSL socket objects. I tried tracing the memory usage with tracemalloc but nothing interesting popped up so I believe this is a leak in the native code. A docker cloud image is available here: amohr/testing:stretch_request_leak based on: ``` FROM debian:stretch COPY request_https_leak.py /tmp/request_https_leak.py RUN apt-get update && \ apt-get install -y python3.5 python3-pip git RUN python3 -m pip install requests git+git://github.com/thehesiod/pyca.git at fix-py3#egg=calib setproctitle requests psutil ``` I believe this issue was introduced in python 3.5.3 as we're not seeing the leak with 3.5.2. Also I haven't verified yet if this happens on non-debian systems. I'll update if I have any more info. I believe 3.6 is similarly impacted but am not 100% certain yet. ---------- assignee: christian.heimes components: SSL messages: 289954 nosy: christian.heimes, thehesiod priority: normal severity: normal status: open title: ssl socket leak type: resource usage versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 21:33:16 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 22 Mar 2017 01:33:16 +0000 Subject: [issue29871] Enable optimized locks on Windows Message-ID: <1490146396.76.0.76409234296.issue29871@psf.upfronthosting.co.za> New submission from Josh Rosenberg: Kristjan wrote improved locking primitives in #15038 that use the new (in Vista) SRWLock and Condition Variable APIs. SRWLocks (used in exclusive mode only) replace Critical Sections, which is slower than SRWLock and provides no features we use that might justify it. Condition Variables replace Semaphores, where the former is user mode (cheap) and the latter kernel mode (expensive). These changes remain disabled by default. Given that CPython dropped support for pre-Vista OSes in 3.5, I propose enabling the faster locking primitives by default. The PR I'll submit leaves the condition variable emulation code in the source so it's available to people who might try to build XP/WS03 compatible code, it just tweaks the define so it defaults to using the Vista+ APIs. Based on the numbers from #15038, we should expect to see a significant improvement in speed. ---------- components: Interpreter Core, Windows messages: 289955 nosy: josh.r, kristjan.jonsson, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Enable optimized locks on Windows type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 21:40:59 2017 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 22 Mar 2017 01:40:59 +0000 Subject: [issue29870] ssl socket leak In-Reply-To: <1490145031.23.0.122177607626.issue29870@psf.upfronthosting.co.za> Message-ID: <1490146859.4.0.502794212351.issue29870@psf.upfronthosting.co.za> Alexander Mohr added the comment: validated 3.6 in fedora is affected as well, see github bug for charts. So it seems all 3.5.3+ versions are affected. I'm guessing it was introduced in one of the SSL changes in 3.5.3: https://docs.python.org/3.5/whatsnew/changelog.html#python-3-5-3 ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 21:43:27 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 22 Mar 2017 01:43:27 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490147007.53.0.969760521687.issue21895@psf.upfronthosting.co.za> Nathaniel Smith added the comment: @haypo: It's a socketpair. It works fine when I set up a toy test case using set_wakeup_fd + select, and it works fine in my real code when I use CFFI cleverness to register a signal handler that manually writes a byte to my wakeup socket, but when I pass that exact same socket to set_wakeup_fd in my real code, it doesn't work. It's pretty mysterious, and I have no particular reason to think that the problem is in CPython as opposed to some stupid mistake I'm making. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 21:48:26 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 22 Mar 2017 01:48:26 +0000 Subject: [issue29871] Enable optimized locks on Windows In-Reply-To: <1490146396.76.0.76409234296.issue29871@psf.upfronthosting.co.za> Message-ID: <1490147306.72.0.626700039978.issue29871@psf.upfronthosting.co.za> Changes by Josh Rosenberg : ---------- pull_requests: +670 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 21:57:37 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 22 Mar 2017 01:57:37 +0000 Subject: [issue29871] Enable optimized locks on Windows In-Reply-To: <1490146396.76.0.76409234296.issue29871@psf.upfronthosting.co.za> Message-ID: <1490147857.69.0.842736719254.issue29871@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Note: Beyond turning on the new primitives by default, I also made a change to PyCOND_TIMEDWAIT. The original code looked wrong, in that: 1. It assumed that when SleepConditionVariableSRW returned non-zero, you didn't know if the wait had timed out or not, so it returned 2 to indicate "Might have timed out, act as if it timed out" 2. It assumed that when SleepConditionVariableSRW returned zero, it had suffered a critical failure, and returned -1 to indicate that. Neither of these things is true AFAICT. SleepConditionVariableSRW returns non-zero when it's alerted prior to timing out. Otherwise, it returns 0, and you have to check GetLastError to distinguish timeout from critical failures. Documentation is here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms686304(v=vs.85).aspx It's subject to "spurious" wake-ups, but so is pthread_cond_timedwait and the pthreads code doesn't use an "all timedwaits time out". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 22:01:09 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 22 Mar 2017 02:01:09 +0000 Subject: [issue28767] Readd __index__ support on ipaddress objects In-Reply-To: <1479750040.58.0.0255514552996.issue28767@psf.upfronthosting.co.za> Message-ID: <1490148069.19.0.720604840807.issue28767@psf.upfronthosting.co.za> Josh Rosenberg added the comment: >From the original bugs, it looks like people liked being able to directly produce the hex of the IP addresses using hex(). I'll admit I'm only +0.5 on restoring __index__; having them be equivalent to int, not just convertable, doesn't seem critical. I just noticed the original bugs (don't even remember why I found them) and figured the functionality should be restored, per the comments on those bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 22:36:42 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 22 Mar 2017 02:36:42 +0000 Subject: [issue29869] Underscores in numeric literals not supported in lib2to3. In-Reply-To: <1490141545.37.0.710126019998.issue29869@psf.upfronthosting.co.za> Message-ID: <1490150202.96.0.900109100504.issue29869@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 22:38:45 2017 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 22 Mar 2017 02:38:45 +0000 Subject: [issue29870] ssl socket leak In-Reply-To: <1490145031.23.0.122177607626.issue29870@psf.upfronthosting.co.za> Message-ID: <1490150325.51.0.506114054752.issue29870@psf.upfronthosting.co.za> Alexander Mohr added the comment: adding valgrind log of 3.5.3 on debian: jessie ---------- Added file: http://bugs.python.org/file46750/valgrind.log.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 22:41:43 2017 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 22 Mar 2017 02:41:43 +0000 Subject: [issue29870] ssl socket leak In-Reply-To: <1490145031.23.0.122177607626.issue29870@psf.upfronthosting.co.za> Message-ID: <1490150503.42.0.896763883967.issue29870@psf.upfronthosting.co.za> Alexander Mohr added the comment: interestingly the valgrind run doesn't show a leak in the profile ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 22:50:12 2017 From: report at bugs.python.org (James Triveri) Date: Wed, 22 Mar 2017 02:50:12 +0000 Subject: [issue29872] My reply Message-ID: New submission from James Triveri: reply from james.triveri at gmail.com ---------- messages: 289962 nosy: jtrive84 priority: normal severity: normal status: open title: My reply _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 23:04:32 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 22 Mar 2017 03:04:32 +0000 Subject: [issue29872] spam In-Reply-To: Message-ID: <1490151872.09.0.446127792519.issue29872@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed title: My reply -> spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 23:05:11 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 22 Mar 2017 03:05:11 +0000 Subject: [issue29872] spam Message-ID: <1490151911.46.0.195443817195.issue29872@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- Removed message: http://bugs.python.org/msg289962 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 23:31:29 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 22 Mar 2017 03:31:29 +0000 Subject: [issue29504] blake2: compile error with -march=bdver2 In-Reply-To: <1486574963.2.0.72017577066.issue29504@psf.upfronthosting.co.za> Message-ID: <1490153489.46.0.742942930588.issue29504@psf.upfronthosting.co.za> Ned Deily added the comment: This didn't make it in time for 3.6.1; deferred to 3.6.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 23:37:48 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 22 Mar 2017 03:37:48 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490153868.39.0.143397446312.issue21895@psf.upfronthosting.co.za> Nathaniel Smith added the comment: @haypo: okay, looked over things over for a third time and this time I found my very silly error :-). So I'm now able to use set_wakeup_fd on Windows (https://github.com/python-trio/trio/pull/108), but not on Unix (https://github.com/python-trio/trio/issues/109). In any case, the issue here remains that one shouldn't have to use set_wakeup_fd for a signal to interrupt time.sleep etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 23:39:35 2017 From: report at bugs.python.org (Alex CHEN) Date: Wed, 22 Mar 2017 03:39:35 +0000 Subject: [issue29873] Need a look for return value checking [_elementtree.c] Message-ID: <1490153975.41.0.412355658191.issue29873@psf.upfronthosting.co.za> New submission from Alex CHEN: In file _elementtree.c our static code scanner has reported this case, but I don't sure that could be any problem, may you have a look? static PyObject* element_getattr(ElementObject* self, char* name) { PyObject* res; /* handle common attributes first */ if (strcmp(name, "tag") == 0) { res = self->tag; Py_INCREF(res); return res; } else if (strcmp(name, "text") == 0) { res = element_get_text(self); // is it possible that element_get_text could return NULL here? Py_INCREF(res); return res; } ---------- components: XML messages: 289965 nosy: alexc priority: normal severity: normal status: open title: Need a look for return value checking [_elementtree.c] type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 21 23:46:17 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 22 Mar 2017 03:46:17 +0000 Subject: [issue29871] Enable optimized locks on Windows In-Reply-To: <1490146396.76.0.76409234296.issue29871@psf.upfronthosting.co.za> Message-ID: <1490154377.37.0.338450390009.issue29871@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Hmm... I was only running the threading related tests originally, and they passed, but it looks like this causes problems with multiprocessing (test_multiprocessing_spawn and test_concurrent_futures both stall out forever with this change, with or without my fix to the PyCOND_TIMEDWAIT function). I'll investigate further, don't bother to review yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 00:13:49 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 22 Mar 2017 04:13:49 +0000 Subject: [issue29873] Need a look for return value checking [_elementtree.c] In-Reply-To: <1490153975.41.0.412355658191.issue29873@psf.upfronthosting.co.za> Message-ID: <1490156029.9.0.66620098193.issue29873@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +671 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 00:14:16 2017 From: report at bugs.python.org (Alex CHEN) Date: Wed, 22 Mar 2017 04:14:16 +0000 Subject: [issue29874] Need a look for return value checking [selectmodule.c] Message-ID: <1490156056.24.0.758776369262.issue29874@psf.upfronthosting.co.za> New submission from Alex CHEN: In file selectmodule.c our static code scanner has reported the following case, function set2list is liable to return NULL (if PyTuple_New failed), would any chance the NULL pointer be dereferenced (Py_DECREF(fdlist) after set2list) or it would just raise python exception to handle PyTuple_New error ? static PyObject * select_select(PyObject *self, PyObject *args) { ...... if (n < 0) { PyErr_SetFromErrno(SelectError); } #endif else { /* any of these three calls can raise an exception. it's more convenient to test for this after all three calls... but is that acceptable? */ ifdlist = set2list(&ifdset, rfd2obj); // || <===== ofdlist = set2list(&ofdset, wfd2obj); // || efdlist = set2list(&efdset, efd2obj); // || if (PyErr_Occurred()) ret = NULL; else ret = PyTuple_Pack(3, ifdlist, ofdlist, efdlist); Py_DECREF(ifdlist); Py_DECREF(ofdlist); Py_DECREF(efdlist); ---------- messages: 289967 nosy: alexc priority: normal severity: normal status: open title: Need a look for return value checking [selectmodule.c] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 00:14:52 2017 From: report at bugs.python.org (Alex CHEN) Date: Wed, 22 Mar 2017 04:14:52 +0000 Subject: [issue29874] Need a look for return value checking [selectmodule.c] In-Reply-To: <1490156056.24.0.758776369262.issue29874@psf.upfronthosting.co.za> Message-ID: <1490156092.73.0.227246231154.issue29874@psf.upfronthosting.co.za> Changes by Alex CHEN : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 00:22:41 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 22 Mar 2017 04:22:41 +0000 Subject: [issue29874] Need a look for return value checking [selectmodule.c] In-Reply-To: <1490156056.24.0.758776369262.issue29874@psf.upfronthosting.co.za> Message-ID: <1490156561.53.0.245156772268.issue29874@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 00:25:10 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 22 Mar 2017 04:25:10 +0000 Subject: [issue29874] Need a look for return value checking [selectmodule.c] In-Reply-To: <1490156056.24.0.758776369262.issue29874@psf.upfronthosting.co.za> Message-ID: <1490156710.42.0.86799564311.issue29874@psf.upfronthosting.co.za> Xiang Zhang added the comment: This has been fixed for 3.x in #18408 but not backported to 2.7. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 00:26:27 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 22 Mar 2017 04:26:27 +0000 Subject: [issue29873] Need a look for return value checking [_elementtree.c] In-Reply-To: <1490153975.41.0.412355658191.issue29873@psf.upfronthosting.co.za> Message-ID: <1490156787.56.0.751481071651.issue29873@psf.upfronthosting.co.za> Xiang Zhang added the comment: Fixed. Thanks for your report Alex. ---------- nosy: +xiang.zhang resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 00:30:54 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 22 Mar 2017 04:30:54 +0000 Subject: [issue29874] Need a look for return value checking [selectmodule.c] In-Reply-To: <1490156056.24.0.758776369262.issue29874@psf.upfronthosting.co.za> Message-ID: <1490157054.13.0.427629158968.issue29874@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +672 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 00:46:36 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 22 Mar 2017 04:46:36 +0000 Subject: [issue29874] Need a look for return value checking [selectmodule.c] In-Reply-To: <1490156056.24.0.758776369262.issue29874@psf.upfronthosting.co.za> Message-ID: <1490157996.17.0.126133649654.issue29874@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 01:09:16 2017 From: report at bugs.python.org (Igor) Date: Wed, 22 Mar 2017 05:09:16 +0000 Subject: [issue29875] IDLE quit unexpectedly Message-ID: <1490159356.31.0.65115458873.issue29875@psf.upfronthosting.co.za> New submission from Igor: Hi! I'm a newbie, both in this community and with Python. I downloaded Python today (March 22, 2017, version 3.6.1) and as I was following a tutorial on how to build my first program (the classical Hello World) with Python, the IDLE window closed and my Mac showed the following message: "IDLE quit unexpectedly". It happens every time I type the ' (single quotation mark).I've tried 10 times so far and it keeps happening. Thank you! ---------- assignee: terry.reedy components: IDLE messages: 289970 nosy: igorafm, terry.reedy priority: normal severity: normal status: open title: IDLE quit unexpectedly versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 01:32:22 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 22 Mar 2017 05:32:22 +0000 Subject: [issue29875] IDLE quit unexpectedly In-Reply-To: <1490159356.31.0.65115458873.issue29875@psf.upfronthosting.co.za> Message-ID: <1490160742.6.0.426002736305.issue29875@psf.upfronthosting.co.za> Ned Deily added the comment: Welcome to the world of Python! You most likely saw a message similar to this when the IDLE shell window opened: WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable. Visit http://www.python.org/download/mac/tcltk/ for current information. If you follow that link, you'll see that you need to install a newer version of Tcl/Tk 8.5.x to avoid bugs in Tcl/Tk; the easiest solution is to download and install ActiveTcl 8.5 from ActiveState as described. ---------- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 01:34:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 22 Mar 2017 05:34:04 +0000 Subject: [issue29868] multiprocessing.dummy missing cpu_count In-Reply-To: <1490137146.46.0.712424049962.issue29868@psf.upfronthosting.co.za> Message-ID: <1490160844.76.0.482608037396.issue29868@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +davin, flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 01:52:24 2017 From: report at bugs.python.org (Alex CHEN) Date: Wed, 22 Mar 2017 05:52:24 +0000 Subject: [issue29876] Check for null return value [_elementtree.c : subelement] Message-ID: <1490161944.61.0.295678924414.issue29876@psf.upfronthosting.co.za> New submission from Alex CHEN: In file _elementtree.c our static code scanner has reported this case, I think there is a bit similar to http://bugs.python.org/issue29874 (returns NULL when NoMemory) static PyObject* subelement(PyObject* self, PyObject* args, PyObject* kw) { PyObject* elem; ElementObject* parent; PyObject* tag; PyObject* attrib = NULL; if (!PyArg_ParseTuple(args, "O!O|O!:SubElement", &Element_Type, &parent, &tag, &PyDict_Type, &attrib)) return NULL; if (attrib || kw) { attrib = (attrib) ? PyDict_Copy(attrib) : PyDict_New(); if (!attrib) return NULL; if (kw) PyDict_Update(attrib, kw); } else { Py_INCREF(Py_None); attrib = Py_None; } elem = element_new(tag, attrib); // <== element_new could returns a NULL pointer, the followed Py_DECREF(elem) would dereference NULL pointer. Py_DECREF(attrib); if (element_add_subelement(parent, elem) < 0) { Py_DECREF(elem); return NULL; } ---------- components: XML messages: 289972 nosy: alexc priority: normal severity: normal status: open title: Check for null return value [_elementtree.c : subelement] type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 01:57:16 2017 From: report at bugs.python.org (Dustin Spicuzza) Date: Wed, 22 Mar 2017 05:57:16 +0000 Subject: [issue29877] compileall fails with urandom error even if number of workers is 1 Message-ID: <1490162236.47.0.103711647228.issue29877@psf.upfronthosting.co.za> New submission from Dustin Spicuzza: Found on Python 3.6 on a low-resource platform (NI RoboRIO), it seems that this occurs only because the ProcessPoolExecutor is being imported. A proposed fix would only import ProcessPoolExecutor if -j > 1. Stacktrace follows: /usr/local/bin/python3 -m compileall -j 1 /home/lvuser/py ^CTraceback (most recent call last): File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/local/lib/python3.6/compileall.py", line 20, in from concurrent.futures import ProcessPoolExecutor File "/usr/local/lib/python3.6/concurrent/futures/__init__.py", line 17, in from concurrent.futures.process import ProcessPoolExecutor File "/usr/local/lib/python3.6/concurrent/futures/process.py", line 53, in import multiprocessing File "/usr/local/lib/python3.6/multiprocessing/__init__.py", line 16, in from . import context File "/usr/local/lib/python3.6/multiprocessing/context.py", line 5, in from . import process File "/usr/local/lib/python3.6/multiprocessing/process.py", line 311, in _current_process = _MainProcess() File "/usr/local/lib/python3.6/multiprocessing/process.py", line 298, in __init__ self._config = {'authkey': AuthenticationString(os.urandom(32)), ---------- components: Library (Lib) messages: 289973 nosy: virtuald priority: normal severity: normal status: open title: compileall fails with urandom error even if number of workers is 1 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 01:58:00 2017 From: report at bugs.python.org (Dustin Spicuzza) Date: Wed, 22 Mar 2017 05:58:00 +0000 Subject: [issue29877] compileall hangs when accessing urandom even if number of workers is 1 In-Reply-To: <1490162236.47.0.103711647228.issue29877@psf.upfronthosting.co.za> Message-ID: <1490162280.78.0.225215105159.issue29877@psf.upfronthosting.co.za> Changes by Dustin Spicuzza : ---------- title: compileall fails with urandom error even if number of workers is 1 -> compileall hangs when accessing urandom even if number of workers is 1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 02:15:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 22 Mar 2017 06:15:13 +0000 Subject: [issue29878] Add global instances of int 0 and 1 Message-ID: <1490163311.47.0.711325721357.issue29878@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: When C code needs to compare Python object with int 0 or add int 1 it either use local reference to PyLong_FromLong(0) and PyLong_FromLong(1) which should be decrefed just after use or module level global variable initialized and cleared during initializing and finalizing the module. Proposed patch adds global variables _PyLong_Zero and _PyLong_One for references to integer objects 0 and 1. This simplifies the code since no need to initialize local variables, check for error the result of PyLong_FromLong() and decref it after use. The patch decreases the total code size by 244 lines. That variables are only for internal use. User code should use PyLong_FromLong(0) and PyLong_FromLong(1). ---------- components: Interpreter Core files: long-constants.diff keywords: patch messages: 289974 nosy: haypo, mark.dickinson, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Add global instances of int 0 and 1 type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file46751/long-constants.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 02:17:09 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 22 Mar 2017 06:17:09 +0000 Subject: [issue29876] Check for null return value [_elementtree.c : subelement] In-Reply-To: <1490161944.61.0.295678924414.issue29876@psf.upfronthosting.co.za> Message-ID: <1490163429.1.0.841538068989.issue29876@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 02:33:08 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 22 Mar 2017 06:33:08 +0000 Subject: [issue29876] Check for null return value [_elementtree.c : subelement] In-Reply-To: <1490161944.61.0.295678924414.issue29876@psf.upfronthosting.co.za> Message-ID: <1490164388.92.0.290930541387.issue29876@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 03:22:54 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 22 Mar 2017 07:22:54 +0000 Subject: [issue29857] Provide `sys.executable_argv` for host application's command line arguments In-Reply-To: <1489991623.12.0.90529490385.issue29857@psf.upfronthosting.co.za> Message-ID: <1490167374.97.0.761634778326.issue29857@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, I've changed the proposed attribute name to be `sys.executable_argv`, with the rationale being that it's "argv as originally seen by sys.executable, rather than by Python's __main__ module" As part of documenting this, both it and the `argv` documentation can make it clear that they may be entirely absent if the host application doesn't set them. ---------- title: Provide `sys._raw_argv` for host application's command line arguments -> Provide `sys.executable_argv` for host application's command line arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 03:36:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 22 Mar 2017 07:36:06 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1490168166.97.0.856800906677.issue27863@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +674 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 04:15:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 08:15:39 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1490153868.39.0.143397446312.issue21895@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Nathaniel Smith added the comment: > In any case, the issue here remains that one shouldn't have to use set_wakeup_fd for a signal to interrupt time.sleep etc. CPython implements a C signal handler which sets a flag and then exits immediately. The thread getting the signal will probably interrupts the current blocking syscall with EINTR. CPython detects that a signal flag was set, calls the *Python* signal handler. If the Python signal handler raises an exception, the syscall is abandonned. Otherwise, the syscall is restarted. So "interrupting sleep" is only reliable if: * there is only one thread (the "main" thread) * the syscall is interrupted with EINTR * the signal handler raises an exception When you implement an event loop, raising an exception may be the best design. In asyncio, the Python signal handler calls loop.call_soon() to execute the final callback (3rd signal handler of the same signal!). The rule in asynico is not call blocking syscalls, or at least ensure that they don't block too long (ex: use aiofiles to access the filesystem). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 04:17:19 2017 From: report at bugs.python.org (Cory Benfield) Date: Wed, 22 Mar 2017 08:17:19 +0000 Subject: [issue29870] ssl socket leak In-Reply-To: <1490145031.23.0.122177607626.issue29870@psf.upfronthosting.co.za> Message-ID: <1490170639.48.0.61853085229.issue29870@psf.upfronthosting.co.za> Changes by Cory Benfield : ---------- nosy: +Lukasa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 04:29:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 08:29:48 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490171388.53.0.013083295099.issue21895@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached signal_pause_doesnt_wake_up.py is a little bit complex and not sure that it's reliable. I wrote thread_signal.py which should have a more deterministic behaviour. Output on Linux: --- main: main thread 140392674538560 thread: wait main: spawn thread 140392542746368 main: sleep main: send signal to thread main: sleep again Python signal handler, thread 140392674538560 main: wait thread thread: done main: done --- As expected, the Python signal handler is called in the main thread. time.sleep() in the thread *is* interrupted by SIGUSR1 (select() fails with EINTR), but PyErr_CheckSignals() does nothing since it's not the main thread. Then the sleep is automatically restarted (PEP 475). The code works as expected, but I understand that the behaviour is surprising. To be honest, I never understood the rationale behind "only execute signal handlers in the main thread". I was also surprised to no see a pthread_kill() in the C signal handler. I dislike the idea of transfering the signal to the main thread from another thread in the C signal handler using pthread_kill(). Most code behave very badly when getting a signal, so getting a signal twice is likely to double the pain. Moreover, pthread_sigmask() can block signals in the main thread for deliberate reasons. If we should change something, I simply suggest to remove the arbitrary limitation from the C signal handler. I don't know the consequences yet. ---------- Added file: http://bugs.python.org/file46752/thread_signal.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 04:51:06 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 22 Mar 2017 08:51:06 +0000 Subject: [issue29779] New environment variable PYTHONHISTORY In-Reply-To: <1489133424.79.0.6086605998.issue29779@psf.upfronthosting.co.za> Message-ID: <1490172666.27.0.773851899474.issue29779@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: +Library (Lib) nosy: +berker.peksag stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 04:59:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 08:59:54 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490173194.67.0.528540832777.issue21895@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, maybe I found the root issue: the C signal handler calls Py_AddPendingCall() which uses a lock to protect a global static pendingcalls array (of 32 items). The function tries 100 times in a row to acquire to lock, or does nothing (returns -1) if it fails to acquire the lock. If we start to allow signals from any thread, this shared pendingcalls array can quickly become a source of race conditions like deadlocks or ignored callbacks. To avoid deadlocks, IMHO the best is to have a per-thread array which consumes 512 bytes (on 64-bit, 32 items made of 2 pointers). -- The _thread module has a strange _thread.interrupt_main() function. -- >From the point of view of the Python signal handler, the current "if (PyThread_get_thread_ident() != main_thread) return 0;" code in the C signal handler is somehow an implicit pthread_sigmask(signal.SIG_BLOCK, range(1, signal.NSIG)) on all threads except of the main thread, whereas Unix gives a fine control on these masks with the pthread_sigmask() function. -- The Windows part is more tricky. A Windows Event object (created by CreateEvent() and retrieved by _PyOS_SigintEvent()) is used to interrupt a few blocking functions: * my_fgets() used by PyOS_StdioReadline() to implemented "readline" (especially for the REPL) * _PyOS_WindowsConsoleReadline() * read_console_w() of Modules/_io/winconsole.c * time.sleep() -- only if it's the main thread and delay != 0 seconds * _multiprocessing.SemLock.acquire() -- only if called from the main thread * _winapi.WaitForMultipleObjects() The event is set by the SIGINT signal handler set by Python. Extract of pysleep() comment: /* Allow sleep(0) to maintain win32 semantics, and as decreed * by Guido, only the main thread can be interrupted. */ ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 05:11:16 2017 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 22 Mar 2017 09:11:16 +0000 Subject: [issue29871] Enable optimized locks on Windows In-Reply-To: <1490146396.76.0.76409234296.issue29871@psf.upfronthosting.co.za> Message-ID: <1490173876.31.0.494984584557.issue29871@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Hi there. Looking at the API docs today (https://msdn.microsoft.com/en-us/library/windows/desktop/ms686304(v=vs.85).aspx) it appears that the timeout case is documented. I'm fairly sure that it wasn't when I implemented it. There was a good reason for the "2" return code. The idea was: Either there was an error (-1) or we woke up. Since there are spurious wakeups and stolen wakeups, the predicate must be tested again anyway. The '2' return code would mean that the timeout condition should be tested by looking at some external clock. Now, the api documentation is bad. Return value is BOOL. Nonzero means "success" (whatever that means) Failure means ?zero? Timeout means FALSE and GetLastError() == ERROR_TIMEOUT If memory serves, FALSE == 0 on windows.... Anyway, I've been out of this part of the code for sufficient time for details to be blurry. My advise: 1) Check that the API of the function is indeed correct. 2) If there is no bulletproof way of distinguishing timeout from normal return, just consider all returns normal (remember, non-error return means that we woke up, not that _we_ were signaled) 2) Verify that the code that is failing can indeed support spurious wakeups/stolen wakeups. It used to be that the python condition variables didn't have this property, because of the way they were implemented. This may have made people lazy. K ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 05:13:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 09:13:08 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490173988.03.0.659739867898.issue21895@psf.upfronthosting.co.za> STINNER Victor added the comment: thread_signal.py: Oops, I forgot to remove the "raise Exception" line from sighandler() (I used it for a quick test.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 05:14:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 09:14:57 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490174097.91.0.24316912242.issue21895@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 05:16:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 09:16:11 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490174171.72.0.910252922033.issue21895@psf.upfronthosting.co.za> STINNER Victor added the comment: I created a WIP patch https://github.com/python/cpython/pull/768 to experiment allowing signal handlers from any threads. I expect many race conditions since I only removed sanity checks without adding new code to handle parallelism. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 05:34:34 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 22 Mar 2017 09:34:34 +0000 Subject: [issue29788] tarfile: Add absolute_path option to tarfile, disabled by default In-Reply-To: <1489162424.66.0.632437535873.issue29788@psf.upfronthosting.co.za> Message-ID: <1490175274.61.0.366305614545.issue29788@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 07:56:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 22 Mar 2017 11:56:56 +0000 Subject: [issue29869] Underscores in numeric literals not supported in lib2to3. In-Reply-To: <1490141545.37.0.710126019998.issue29869@psf.upfronthosting.co.za> Message-ID: <1490183816.49.0.20262052361.issue29869@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Python uses more strong rules for underscores in numerical literals. Underscores are acceptable between digits and between the base prefix and digit. For example the regular expression for hexadecimals is r'0[xX]_?[\da-fA-F]+(?:_[\da-fA-F]+)*[lL]?'. Underscores also are acceptable in the exponent of float literals: Exponent = r'[eE][-+]?\d+(?:_\d+)*' ---------- nosy: +georg.brandl, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 07:58:04 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 22 Mar 2017 11:58:04 +0000 Subject: [issue28331] "CPython implementation detail:" removed when content translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1490183884.3.0.860921914108.issue28331@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +676 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 08:10:05 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 22 Mar 2017 12:10:05 +0000 Subject: [issue28331] "CPython implementation detail:" removed when content translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1490184605.71.0.933034970399.issue28331@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 09:17:53 2017 From: report at bugs.python.org (Dustin Spicuzza) Date: Wed, 22 Mar 2017 13:17:53 +0000 Subject: [issue29877] compileall hangs when accessing urandom even if number of workers is 1 In-Reply-To: <1490162236.47.0.103711647228.issue29877@psf.upfronthosting.co.za> Message-ID: <1490188673.56.0.790229058137.issue29877@psf.upfronthosting.co.za> Changes by Dustin Spicuzza : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 09:46:28 2017 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 22 Mar 2017 13:46:28 +0000 Subject: [issue29878] Add global instances of int 0 and 1 In-Reply-To: <1490163311.47.0.711325721357.issue29878@psf.upfronthosting.co.za> Message-ID: <1490190388.59.0.0596087882271.issue29878@psf.upfronthosting.co.za> Mark Dickinson added the comment: I like it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 10:04:56 2017 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 22 Mar 2017 14:04:56 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1490191496.23.0.651297106368.issue29816@psf.upfronthosting.co.za> Mark Dickinson added the comment: I much prefer the `divrem1`-based version: it makes fewer assumptions about relative sizes of long / long long / size_t and about the number of bits per digit. I'd rather not have another place that would have to be carefully examined in the future if the number of bits per digit changed again. Overall, Objects/longobject.c is highly portable, and I'd like to keep it that way as much as possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 10:11:25 2017 From: report at bugs.python.org (=?utf-8?q?Charles_Bouchard-L=C3=A9gar=C3=A9?=) Date: Wed, 22 Mar 2017 14:11:25 +0000 Subject: [issue29879] typing.Text not available in python 3.5.1 Message-ID: <1490191885.24.0.466307693119.issue29879@psf.upfronthosting.co.za> New submission from Charles Bouchard-L?gar?: The real issue here is that this is not documented in Doc/library/typing.rst. ---------- assignee: docs at python components: Documentation messages: 289985 nosy: Charles Bouchard-L?gar?, docs at python priority: normal severity: normal status: open title: typing.Text not available in python 3.5.1 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 10:23:47 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 22 Mar 2017 14:23:47 +0000 Subject: [issue29879] typing.Text not available in python 3.5.1 In-Reply-To: <1490191885.24.0.466307693119.issue29879@psf.upfronthosting.co.za> Message-ID: <1490192627.26.0.145906782706.issue29879@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: I'm guessing you might of missed it, `Text` is documented in the docs for Python 3.5 https://docs.python.org/3.5/library/typing.html#typing.Text :-) ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 10:25:27 2017 From: report at bugs.python.org (=?utf-8?q?Charles_Bouchard-L=C3=A9gar=C3=A9?=) Date: Wed, 22 Mar 2017 14:25:27 +0000 Subject: [issue29879] typing.Text not available in python 3.5.1 In-Reply-To: <1490191885.24.0.466307693119.issue29879@psf.upfronthosting.co.za> Message-ID: <1490192727.93.0.910195220263.issue29879@psf.upfronthosting.co.za> Charles Bouchard-L?gar? added the comment: I mean, what is not documented is 'New in 3.5.2' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 10:56:58 2017 From: report at bugs.python.org (Nevada Sanchez) Date: Wed, 22 Mar 2017 14:56:58 +0000 Subject: [issue29869] Underscores in numeric literals not supported in lib2to3. In-Reply-To: <1490141545.37.0.710126019998.issue29869@psf.upfronthosting.co.za> Message-ID: <1490194618.58.0.296020120991.issue29869@psf.upfronthosting.co.za> Nevada Sanchez added the comment: The existing regular expressions weren't actually strict enough as is, so I made them even more correct. In particular, we must have at least one digit following `0[xXbBoO]` and must be before any underscores. I have a small set of test cases to examine correctness of these regular expressions: https://gist.github.com/nevsan/7fc78dc61d309842406d67d6839b9861 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 10:57:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 14:57:34 +0000 Subject: [issue29878] Add global instances of int 0 and 1 In-Reply-To: <1490163311.47.0.711325721357.issue29878@psf.upfronthosting.co.za> Message-ID: <1490194654.42.0.262961282675.issue29878@psf.upfronthosting.co.za> STINNER Victor added the comment: +1. Please create a PR for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 11:24:13 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 22 Mar 2017 15:24:13 +0000 Subject: [issue29878] Add global instances of int 0 and 1 In-Reply-To: <1490163311.47.0.711325721357.issue29878@psf.upfronthosting.co.za> Message-ID: <1490196253.78.0.0479206321556.issue29878@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 for this idea. Also consider adding new function PyLong_Increment. This basic operation is small pain using the current API. It may also give a small speed benefit. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 11:34:27 2017 From: report at bugs.python.org (pz) Date: Wed, 22 Mar 2017 15:34:27 +0000 Subject: [issue29880] python3.6 install readline ,and then cpython exit Message-ID: <1490196867.91.0.906821746268.issue29880@psf.upfronthosting.co.za> New submission from pz: python3.6 -m pip istall readline # python3.6 Python 3.6.0 (default, Mar 21 2017, 23:23:51) [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> *** glibc detected *** python3.6: free(): invalid pointer: 0x00007f63bbb5b570 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x75f3e)[0x7f63babdaf3e] /lib64/libc.so.6(+0x78d8d)[0x7f63babddd8d] python3.6(PyOS_Readline+0x134)[0x44a433] ............ and after I unistall readline,then enter cpython?the error not occur # python3.6 Python 3.6.0 (default, Mar 21 2017, 23:23:51) [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> >>> >>> ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 289991 nosy: pz priority: normal severity: normal status: open title: python3.6 install readline ,and then cpython exit versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 11:42:30 2017 From: report at bugs.python.org (Zachary Ware) Date: Wed, 22 Mar 2017 15:42:30 +0000 Subject: [issue29880] python3.6 install readline ,and then cpython exit In-Reply-To: <1490196867.91.0.906821746268.issue29880@psf.upfronthosting.co.za> Message-ID: <1490197350.49.0.821992938676.issue29880@psf.upfronthosting.co.za> Zachary Ware added the comment: This is more likely to be a bug in the 'readline' package from PyPI rather than in Python itself. That package has not been updated since 2012 when it was renamed to 'gnureadline', and 'gnureadline' has not been updated since 2014. If you can still reproduce this issue with the latest 'gnureadline', please open an issue with that project. ---------- nosy: +zach.ware resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 11:56:56 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 22 Mar 2017 15:56:56 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1490198216.16.0.333994147245.issue29640@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Patch for protecting the key list while forking. ---------- Added file: http://bugs.python.org/file46753/0001-Protect-key-list-during-fork.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 12:09:09 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 22 Mar 2017 16:09:09 +0000 Subject: [issue29879] typing.Text not available in python 3.5.1 In-Reply-To: <1490191885.24.0.466307693119.issue29879@psf.upfronthosting.co.za> Message-ID: <1490198949.25.0.573409078012.issue29879@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Ah I see now, yes, neither are Reversible, Type, NewType, TYPE_CHECKING and DefaultDict. Why don't you go ahead an submit a PR for this? :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 12:15:16 2017 From: report at bugs.python.org (=?utf-8?q?Charles_Bouchard-L=C3=A9gar=C3=A9?=) Date: Wed, 22 Mar 2017 16:15:16 +0000 Subject: [issue29879] typing.Text not available in python 3.5.1 In-Reply-To: <1490191885.24.0.466307693119.issue29879@psf.upfronthosting.co.za> Message-ID: <1490199316.89.0.58321098265.issue29879@psf.upfronthosting.co.za> Charles Bouchard-L?gar? added the comment: Thank you for confirming this. I'll look into it ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 12:18:20 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 22 Mar 2017 16:18:20 +0000 Subject: [issue29866] Added datetime_diff to datetime.py. In-Reply-To: <1490077521.83.0.664563461017.issue29866@psf.upfronthosting.co.za> Message-ID: <1490199500.82.0.451577590123.issue29866@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Without stating an opinion on the change, I'd suggest first posting to python-ideas (unless you already did so and I missed it :-) to get an initial reaction from folks on your idea before coming to b.p.o. If you have the backing of python-ideas you might have a good chance of having your change accepted. ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 12:21:25 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 22 Mar 2017 16:21:25 +0000 Subject: [issue29879] typing.Text not available in python 3.5.1 In-Reply-To: <1490191885.24.0.466307693119.issue29879@psf.upfronthosting.co.za> Message-ID: <1490199685.61.0.315587593061.issue29879@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: That's great, make sure you also take a look at the quick start section of the devguide [1] if you need help in any steps :-) [1]: https://docs.python.org/devguide/#quick-start ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 12:32:48 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 22 Mar 2017 16:32:48 +0000 Subject: [issue29847] Path takes and ignores **kwargs In-Reply-To: <1489850567.46.0.646194395205.issue29847@psf.upfronthosting.co.za> Message-ID: <1490200368.07.0.69457703382.issue29847@psf.upfronthosting.co.za> Brett Cannon added the comment: Then I vote for Serhiy's idea of simply raising an exception in the concrete subclasses when a keyword argument is given. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 12:43:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 16:43:29 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit Message-ID: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> New submission from STINNER Victor: When I read Serhiy Storshaka's idea in issue #29878, it recalled me an old idea of writing a generalization of the _Py_IDENTIFIER() API. _Py_IDENTIFIER is an API to initialize a static string variable once. The _Py_Identifier structure has a "next" field to create a single-linked chained list. It allows to clear all variables at exit in _PyUnicode_ClearStaticStrings(). I propose a similar API but for any PyObject* object, to be able to clear all static variables at exit. It should help to release all memory in Py_Finalize() and have a safer Python finalization. See attached pull request for the API itself. "Static variables" in C are variables with a limited scope: a single C file or a single function. It seems like the API can remove some lines of code. Example of patch: @@ -1452,14 +1450,14 @@ compiler_mod(struct compiler *c, mod_ty mod) { PyCodeObject *co; int addNone = 1; - static PyObject *module; - if (!module) { - module = PyUnicode_InternFromString(""); - if (!module) - return NULL; + _Py_STATICVAR(module); + + if (_PY_STATICVAR_INIT(&module, PyUnicode_InternFromString(""))) { + return 0; } + /* Use 0 for firstlineno initially, will fixup in assemble(). */ - if (!compiler_enter_scope(c, module, COMPILER_SCOPE_MODULE, mod, 0)) + if (!compiler_enter_scope(c, module.obj, COMPILER_SCOPE_MODULE, mod, 0)) return NULL; switch (mod->kind) { case Module_kind: -- Drawbacks of the API: * It adds one pointer per static variables, so increase the memory footprint of 8 bytes per variable * It requires to write "var.obj" instead of just "var" to access the Python object The API doesn't try to remove duplicated objects. I consider that it's not an issue since functions like PyLong_FromLong() and PyUnicode_InternFromString("c string") already do it for us. Some functions create mutable variables like PyImport_Import() which creates an empty list. -- Note: Eric Snow proposed a solution "solving multi-core Python": * https://mail.python.org/pipermail/python-ideas/2015-June/034177.html * http://ericsnowcurrently.blogspot.fr/2016/09/solving-mutli-core-python.html I'm not sure if this API would help or not to implement such idea, but Eric's project is experimental and wasn't taken in account when designing the API. ---------- components: Interpreter Core messages: 289999 nosy: haypo priority: normal severity: normal status: open title: Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 12:46:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 16:46:41 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490201201.64.0.823362992617.issue29881@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +677 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 12:47:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 16:47:00 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490201220.81.0.532345653023.issue29881@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +eric.snow, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 12:49:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 16:49:09 +0000 Subject: [issue29878] Add global instances of int 0 and 1 In-Reply-To: <1490163311.47.0.711325721357.issue29878@psf.upfronthosting.co.za> Message-ID: <1490201349.41.0.222936937528.issue29878@psf.upfronthosting.co.za> STINNER Victor added the comment: Other common values used in C functions: empty byte string, empty Unicode string, empty tuple. The problem is to make sure that singletons are created in the right order :-/ This issue reminded me an old idea of writing a generalization of the _Py_IDENTIFIER() API. I created an issue #29881: Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit. To be clear: it's related but different to this issue, the two issues are exclusive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 13:15:17 2017 From: report at bugs.python.org (Georg Brandl) Date: Wed, 22 Mar 2017 17:15:17 +0000 Subject: [issue29869] Underscores in numeric literals not supported in lib2to3. In-Reply-To: <1490141545.37.0.710126019998.issue29869@psf.upfronthosting.co.za> Message-ID: <1490202917.05.0.436902234984.issue29869@psf.upfronthosting.co.za> Georg Brandl added the comment: > In particular, we must have at least one digit following `0[xXbBoO]` and must be before any underscores. This is not true (but your test file does the right thing). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 13:16:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 22 Mar 2017 17:16:49 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490203009.58.0.867795444212.issue29881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The problem with existing static variables are that they are not properly cleared. When the Python interpreter is finalized and reinitialized they can contain invalid references. This patch fixes this issue. > * It requires to write "var.obj" instead of just "var" to access the Python object You can use a dynamic array of PyObject** instead of a linked list for collecting references to "static variables" or use gc_next/gc_refs for managing a linked list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 13:30:42 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Wed, 22 Mar 2017 17:30:42 +0000 Subject: [issue29882] Add an efficient popcount method for integers Message-ID: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> New submission from Niklas Fiekas: An efficient popcount (something equivalent to bin(a).count("1")) would be useful for numerics, parsing binary formats, scientific applications and others. DESIGN DECISIONS * Is a popcount method useful enough? * How to handle negative values? * How should the method be named? SURVEY gmpy calls the operation popcount and returns -1/None for negative values: >>> import gmpy2 >>> gmpy2.popcount(-10) -1 >>> import gmpy >>> gmpy.popcount(-10) >From the documentation [1]: > If x < 0, the number of bits with value 1 is infinite > so -1 is returned in that case. (I am not a fan of the arbitrary return value). The bitarray module has a count(value=True) method: >>> from bitarray import bitarray >>> bitarray(bin(123456789).strip("0b")).count() 16 Bitsets [2] exposes __len__. There is an SSE4 POPCNT instruction. C compilers call the corresponding intrinsic popcnt or popcount (with some prefix and suffix) and they accept unsigned arguments. Rust calls the operation count_ones [3]. Ones are counted in the binary representation of the *absolute* value. (I propose to do the same). Introducing popcount was previously considered here but closed for lack of a PEP or patch: http://bugs.python.org/issue722647 Sensible names could be bit_count along the lines of the existing bit_length or popcount for gmpy compability and to distinguish it more. PERFORMANCE $ ./python -m timeit "bin(123456789).count('1')" # equivalent 1000000 loops, best of 5: 286 nsec per loop $ ./python -m timeit "(123456789).bit_count()" # fallback 5000000 loops, best of 5: 46.3 nsec per loop [1] https://gmpy2.readthedocs.io/en/latest/mpz.html#mpz-functions [2] https://pypi.python.org/pypi/bitsets/0.7.9 [3] https://doc.rust-lang.org/std/primitive.i64.html#method.count_ones ---------- components: Interpreter Core messages: 290003 nosy: mark.dickinson, niklasf priority: normal severity: normal status: open title: Add an efficient popcount method for integers type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 13:32:02 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Wed, 22 Mar 2017 17:32:02 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1490203922.18.0.273094430136.issue29882@psf.upfronthosting.co.za> Changes by Niklas Fiekas : ---------- pull_requests: +678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 13:47:33 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Wed, 22 Mar 2017 17:47:33 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1490204853.71.0.569028028992.issue29882@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 13:53:29 2017 From: report at bugs.python.org (Decorater) Date: Wed, 22 Mar 2017 17:53:29 +0000 Subject: [issue29866] Added datetime_diff to datetime.py. In-Reply-To: <1490077521.83.0.664563461017.issue29866@psf.upfronthosting.co.za> Message-ID: <1490205209.52.0.882777744113.issue29866@psf.upfronthosting.co.za> Decorater added the comment: Yeah, I could. I did just realize that there is a bug in it though that sometimes if it is like 58 seconds into a minute and you sleep for 15 that the code then thinks an entire minute elapsed when it has not. I need to think of a way to bypass that bug first. I found it after running tests many times locally (that actually run this time). Before it even gets accepted even with support from them I would have to fix that bug somehow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 14:02:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 22 Mar 2017 18:02:43 +0000 Subject: [issue29878] Add global instances of int 0 and 1 In-Reply-To: <1490163311.47.0.711325721357.issue29878@psf.upfronthosting.co.za> Message-ID: <1490205763.83.0.955529502208.issue29878@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yet one idea that can make the code simpler is make PyLong_FromLong(0) and PyLong_FromLong(1) never failing. I.e. require NSMALLPOSINTS not less than 2. > Also consider adding new function PyLong_Increment. This basic operation is small pain using the current API. It may also give a small speed benefit. Smaller pain with using _PyLong_One and Py_SETREF(). Py_SETREF(long_obj, PyNumber_Add(long_obj, _PyLong_One)); Agree that with _PyLong_Increment() it can look better and be faster. But I don't know whether incrementing by 1 is enough popular operation. I have counted 5 cases in the stdlib (not counting tests): for enumerate, range and Counter. > The problem is to make sure that singletons are created in the right order :-/ Yes, I spent much time for making empty Unicode string singleton always be initialized. It can be accessed at very early stage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 14:04:40 2017 From: report at bugs.python.org (Decorater) Date: Wed, 22 Mar 2017 18:04:40 +0000 Subject: [issue29866] Added datetime_diff to datetime.py. In-Reply-To: <1490077521.83.0.664563461017.issue29866@psf.upfronthosting.co.za> Message-ID: <1490205880.58.0.520820224003.issue29866@psf.upfronthosting.co.za> Decorater added the comment: an url preview of the bug itself https://travis-ci.org/AraHaan/datetime_diff/jobs/213944228 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 14:41:49 2017 From: report at bugs.python.org (Nevada Sanchez) Date: Wed, 22 Mar 2017 18:41:49 +0000 Subject: [issue29869] Underscores in numeric literals not supported in lib2to3. In-Reply-To: <1490141545.37.0.710126019998.issue29869@psf.upfronthosting.co.za> Message-ID: <1490208109.33.0.749460223694.issue29869@psf.upfronthosting.co.za> Nevada Sanchez added the comment: Thanks, it seems I misspoke. Glad I tested it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 14:57:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 22 Mar 2017 18:57:03 +0000 Subject: [issue29869] Underscores in numeric literals not supported in lib2to3. In-Reply-To: <1490141545.37.0.710126019998.issue29869@psf.upfronthosting.co.za> Message-ID: <1490209023.94.0.711818089952.issue29869@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suggest to use my regular expression for haxadedecimals. Your regular expression starves from catastrophic backtracking. Compare two examples: re.match(r'0[xX]_?[\da-fA-F]+(?:_[\da-fA-F]+)*[lL]?'+r'\b', '0x'+'0'*100+'z') re.match(r'0[xX](?:_?[\da-fA-F]+)+[lL]?'+r'\b', '0x'+'0'*100+'z') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 15:20:32 2017 From: report at bugs.python.org (Kostis Anagnostopoulos) Date: Wed, 22 Mar 2017 19:20:32 +0000 Subject: [issue29757] The loop in utility `socket.create_connection()` swallows previous errors In-Reply-To: <1488984317.87.0.296010902983.issue29757@psf.upfronthosting.co.za> Message-ID: <1490210432.7.0.457416671019.issue29757@psf.upfronthosting.co.za> Kostis Anagnostopoulos added the comment: > This is a new feature, so we can only push it to 3.7. As it stands now(b39d4b1c6) it hardly contains any change - just in the case of multiple intermediate errors AND final failure, the exception raised is a bit different. AFAICS it would be a "change" for 3.7 if my one of the 3 options of my last comment gets implemented. Any ideas which one to implement? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 15:28:01 2017 From: report at bugs.python.org (Adam Meily) Date: Wed, 22 Mar 2017 19:28:01 +0000 Subject: [issue29883] asyncio: Windows Proactor Event Loop UDP Support Message-ID: <1490210881.18.0.553215827239.issue29883@psf.upfronthosting.co.za> New submission from Adam Meily: I am working on a Python 3.5 project that uses asyncio on a Windows system to poll both UDP and TCP connections. Multiple sources online say that the Windows Proactor event loop, which uses I/O Completion Ports, is considerably faster and more efficient than the default Selector event loop. I'm using both UDP and TCP connections so I am stuck with the Selector event loop for the time being. I've seen the overhead of 128 open UDP/TCP connections on the Selector event loop to be near 85%, which I understand is entirely spent in Windows proprietary code and not the Python implementation. I'd like to take a shot at implementing UDP support in the IOCP event loop. It looks like there will be a considerable amount of code shared between TCP and UDP IOCP so I plan on implementing UDP support directly in _ProactorReadPipeTransport and _ProactorBaseWritePipeTransport. I should be able to do this by wrapping any TCP/UDP specific function calls in a check of: if sock.type == socket.SOCK_DGRAM: # Do UDP stuff elif sock.type == socket.SOCK_STREAM: # Do TCP stuff My initial implementation plan is to: - Call datagram_received() instead of data_received() when UDP data is available in _ProactorReadPipeTransport._loop_reading(). - Implement BaseProactorEventLoop._make_datagram_transport(). - Implement wrappers for WSAConnect, WSARecvFrom, and WSASendTo in _overlapped. - Implement sendto() and recvfrom() in IocpProactor, which will use the new functions in _overlapped. - Implement handling for UDP "connections" in IocpProactor.connect() to call WSAConnect(). WSAConnect() appears to always return immediately so the function not supporting IOCP shouldn't be an issue. We can't use ConnectEx() for UDP because ConnectEx() is for connection-oriented sockets only. My project is unfortunately tied to Python 3.5. So, if possible, I'd like to have UDP support merged into a v3.5 release. I can fork off of master instead of v3.5.3 if Python 3.5 support isn't an option. ---------- components: asyncio messages: 290010 nosy: Adam Meily, yselivanov priority: normal severity: normal status: open title: asyncio: Windows Proactor Event Loop UDP Support type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 15:35:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 22 Mar 2017 19:35:29 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1490211329.96.0.211275485924.issue29816@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated the PR to divrem1-based version. The drawback is that divrem1 can fail with MemoryError while C long long arithmetic always works for integers of the size less than 1 exbibyte. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 15:52:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 22 Mar 2017 19:52:55 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1490212375.08.0.989205043753.issue29816@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The special case would be not needed if limit Python ints on 32-bit platforms to approximately 2**2**28. int.bit_length() could be simpler too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 16:22:28 2017 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 22 Mar 2017 20:22:28 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1490214148.51.0.929006049782.issue29882@psf.upfronthosting.co.za> Mark Dickinson added the comment: Can you give some examples of concrete use-cases? I've spent the last six years or so writing scientific applications and parsing all sorts of odd binary formats, and haven't needed or wanted a popcount yet. > (I am not a fan of the arbitrary return value). Agreed: if this were implemented, I think raising ValueError would be the most appropriate thing to do for negative inputs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 17:30:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 22 Mar 2017 21:30:07 +0000 Subject: [issue29204] Add code deprecations in ElementTree In-Reply-To: <1483874003.49.0.675614316595.issue29204@psf.upfronthosting.co.za> Message-ID: <1490218207.33.0.168089132789.issue29204@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 17:38:05 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Wed, 22 Mar 2017 21:38:05 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1490218685.13.0.617620912645.issue29882@psf.upfronthosting.co.za> Niklas Fiekas added the comment: Searching popcount in Python files on GitHub yields a considerable number of examples: https://github.com/search?utf8=%E2%9C%93&q=popcount+extension%3Apy&type=Code Perhaps intresting: * In CPython itself: See count_set_bits in Modules/mathmodule.c * Domain specific applications: Bitboards in Chess, fairly shuffling cards in Poker, comparing molecules * Size of bitsets (see bitarray and bitsets I listed above). Probably for this reason also as a first class citizen in Redis: https://redis.io/commands/bitcount. Probably most important: * As the Hamming Distance: https://en.wikipedia.org/wiki/Hamming_distance#History_and_applications --- Btw. not a concrete application. I just stumbled upon this. popcnt was considered important enough to be included in the rather limited WebAssembly instruction set: https://github.com/WebAssembly/spec/raw/master/papers/pldi2017.pdf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 17:45:13 2017 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 22 Mar 2017 21:45:13 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1490219113.74.0.337054561285.issue29882@psf.upfronthosting.co.za> Mark Dickinson added the comment: Many of those applications are really for bitstrings (chess bitboards, hamming distance), which aren't really the same thing as integers. Nice find for the mathmodule.c case. I'd forgotten about that one (though according to git blame, apparently I'm responsible for checking it in). It's a fairly obscure corner case, though. Overall, I'm -1 on adding this: I don't think it meets the bar of being useful enough to justify the extra method. I'd suggest that people needing this kind of efficient bitstring operation use a 3rd-party bitstring library instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 17:49:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 22 Mar 2017 21:49: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: <1490219382.45.0.998439097138.issue29882@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think that adding bitarray or bitset (or both) in the stdlib would better satisfy the needs. There are open issues for adding ability to read or set selected bits or range of bits in int or for bitwise operations on bytes. I think that bitarray and bitset would provide better interface for these operations. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 18:00:39 2017 From: report at bugs.python.org (Tim Peters) Date: Wed, 22 Mar 2017 22:00:39 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1490220039.01.0.937350375479.issue29882@psf.upfronthosting.co.za> Tim Peters added the comment: See also: https://en.wikipedia.org/wiki/Hamming_weight As that says, there are a number of languages and processors with first class support for a popcount function. I've frequently implemented it in Python when using integers as integer bitsets (`i` is in the set if and only if bit `2**i` is set in the integer), which often - except for finding the cardinality - runs much faster than using general Python sets. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 19:57:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 23:57:34 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490227054.75.0.630851247304.issue29881@psf.upfronthosting.co.za> STINNER Victor added the comment: The purpose of the issue is to fix memory leaks like issue #21387 (this one is not the best example since it seems like the leak doesn't come from a static variable.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 19:58:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 22 Mar 2017 23:58:01 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490227081.87.0.321156371254.issue29881@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 20:35:14 2017 From: report at bugs.python.org (Ned Deily) Date: Thu, 23 Mar 2017 00:35:14 +0000 Subject: [issue29574] python-3.6.0.tgz permissions borked In-Reply-To: <1487199047.25.0.291984947125.issue29574@psf.upfronthosting.co.za> Message-ID: <1490229314.13.0.702151067515.issue29574@psf.upfronthosting.co.za> Ned Deily added the comment: My apologies for the bad permissions in the tar file. The newly-released 3.6.1 tar files should not have this anomaly. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 22:44:14 2017 From: report at bugs.python.org (Emmanuel Arias) Date: Thu, 23 Mar 2017 02:44:14 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1490237054.62.0.164722402501.issue13349@psf.upfronthosting.co.za> Emmanuel Arias added the comment: I agree with Jim Fasarakis-Hilliard this message may be change in new 3.7 version ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 22 23:58:10 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 23 Mar 2017 03:58:10 +0000 Subject: [issue29728] Expose TCP_NOTSENT_LOWAT In-Reply-To: <1488740878.04.0.852546577047.issue29728@psf.upfronthosting.co.za> Message-ID: <1490241490.56.0.706402644348.issue29728@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks, Nathaniel. I merged your patch :) ---------- nosy: +Mariatta resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 00:06:31 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 23 Mar 2017 04:06:31 +0000 Subject: [issue24796] Deleting names referencing from enclosed and enclosing scopes In-Reply-To: <1438779917.48.0.0299421063838.issue24796@psf.upfronthosting.co.za> Message-ID: <1490241991.1.0.170279968038.issue24796@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 00:07:12 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 23 Mar 2017 04:07:12 +0000 Subject: [issue24796] Deleting names referencing from enclosed and enclosing scopes In-Reply-To: <1438779917.48.0.0299421063838.issue24796@psf.upfronthosting.co.za> Message-ID: <1490242032.56.0.382779965121.issue24796@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +681 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 00:08:31 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 23 Mar 2017 04:08:31 +0000 Subject: [issue24796] Deleting names referencing from enclosed and enclosing scopes In-Reply-To: <1438779917.48.0.0299421063838.issue24796@psf.upfronthosting.co.za> Message-ID: <1490242111.95.0.682804455607.issue24796@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks for the PR, Ivan. Merged and backported to 3.5 and 3.6. ---------- nosy: +Mariatta resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 00:17:38 2017 From: report at bugs.python.org (Nevada Sanchez) Date: Thu, 23 Mar 2017 04:17:38 +0000 Subject: [issue29869] Underscores in numeric literals not supported in lib2to3. In-Reply-To: <1490141545.37.0.710126019998.issue29869@psf.upfronthosting.co.za> Message-ID: <1490242658.89.0.829125048624.issue29869@psf.upfronthosting.co.za> Nevada Sanchez added the comment: Good point. Updated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 00:47:00 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 23 Mar 2017 04:47:00 +0000 Subject: [issue14965] super() and property inheritance behavior In-Reply-To: <1338433441.66.0.975494137492.issue14965@psf.upfronthosting.co.za> Message-ID: <1490244420.02.0.430287120227.issue14965@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 00:57:13 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 23 Mar 2017 04:57:13 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490245033.56.0.499013323904.issue21895@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Letting Python-level signal handlers run in arbitrary threads is an interesting idea, but it's a non-trivial change to Python semantics that may well break some programs (previously it was guaranteed that signal handlers couldn't race with main thread code), and it doesn't fully fix the bug here (because it's common for Python programs to contain threads which don't run Python code, e.g. if they use zmq). I can imagine some potential benefits, but I feel like this needs some substantial rationale? OTOH the pthread_kill-based fix I suggested is like 3 lines and AFAICT fixes the problem exactly. > I dislike the idea of transfering the signal to the main thread from another thread in the C signal handler using pthread_kill(). Most code behave very badly when getting a signal, so getting a signal twice is likely to double the pain. This doesn't make much sense to me... CPython's pretty good at handling EINTR these days, and, well, the only case that's different is when you have a signal handler that needs to be run and the main thread is blocked in a syscall, which is exactly the case that's currently broken? > Moreover, pthread_sigmask() can block signals in the main thread for deliberate reasons. Sure, and with pthread_kill() this would have the effect that the signal would be queued by the kernel and delivered after signal is unmasked. That seems like pretty sensible semantics to me; in fact it's exactly what you get in single-threaded code. Compare that to right now where AFAICT pthread_sigmask() is pretty useless in the presence of threads, because of the thing where if one thread has a signal blocked then the kernel will pick another thread to deliver it to. > From the point of view of the Python signal handler, the current "if (PyThread_get_thread_ident() != main_thread) return 0;" code in the C signal handler is somehow an implicit pthread_sigmask(signal.SIG_BLOCK, range(1, signal.NSIG)) on all threads except of the main thread, whereas Unix gives a fine control on these masks with the pthread_sigmask() function. That code isn't in the C signal handler, it's in the code that the interpreter runs occasionally to check if the C signal handler has been called, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 01:43:51 2017 From: report at bugs.python.org (Christophe Zeitouny) Date: Thu, 23 Mar 2017 05:43:51 +0000 Subject: [issue29884] faulthandler does not properly restore sigaltstack during teardown Message-ID: <1490247829.54.0.456330369246.issue29884@psf.upfronthosting.co.za> New submission from Christophe Zeitouny: Looks like faulthandler is not properly tearing down its sigaltstack, causing potential double-free issues in any application that embeds the Python interpreter. I stumbled upon this when I enabled AddressSanitizer on my application, which sets up and tears down a Python interpreter instance at runtime. AddressSanitizer complained about a double-free of the stack_t::ss_sp memory region. After close inspection, here's what's happening: 1. When a new thread is created, AddressSanitizer sets up its own alternative stack by calling sigaltstack 2. Py_Initialize() is called, which initializes faulthandler, which sets up its own alternative stack, therefore overriding the one installed by AddressSanitizer 3. Py_Finalize() is called, which deinitializes faulthandler, which merely deletes the allocated stack region, but leaves the alternative stack installed. Any signal that occurs after this point will be using a memory region it doesn't own as stack. dangerous stuff. 4. The thread exits, at which point AddressSanitizer queries sigaltstack for the current alternative stack, blindly assumes that it's the same one that it installed, and attempts to free the allocated stack region. Therefore causing a double free issue Regardless of the fact that AddressSanitizer should probably not blindly trust that the currently installed sigaltstack is the same one it installed earlier, the current code in faulthandler leaves the sigaltstack in a very bad state after finalizing. This means that the application that embeds the Python interpreter better hope that no signals are raised after it calls Py_Finalize(). I have a patch that fixes this issue. faulthandler will save the previously installed alternative stack at initialization time. During deinitialization, it will query sigaltstack for the current stack. If it's the same as the one it installed, it will restore the saved previous stack. 'sigaltstack' just sounds like a badly designed API. There is essentially no way to use it 'correctly'. Here's how AddressSanitizer uses it (line 164): http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix_libcdep.cc?view=markup and here's how the Chrome browser uses it: https://chromium.googlesource.com/breakpad/breakpad/+/chrome_43/src/client/linux/handler/exception_handler.cc#149 Notice that my approach is closer to what Chrome does, but in the case where the installed stack is no longer ours, I don't disable whatever stack is installed. This is because I don't believe that will make much difference. Whoever switched out the stack could have saved our stack somewhere and planned on blindly restoring it upon exit. In which case, whatever we do would be overridden. Attached are a tiny reproducer for the issue, along with the complete analysis of what's reported by AddressSanitizer. I'll follow this up by a pull request for my changes. Thanks! Chris ---------- components: Extension Modules files: python_failure.txt messages: 290025 nosy: haypo, tich priority: normal severity: normal status: open title: faulthandler does not properly restore sigaltstack during teardown type: enhancement Added file: http://bugs.python.org/file46754/python_failure.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 01:44:13 2017 From: report at bugs.python.org (Christophe Zeitouny) Date: Thu, 23 Mar 2017 05:44:13 +0000 Subject: [issue29884] faulthandler does not properly restore sigaltstack during teardown In-Reply-To: <1490247829.54.0.456330369246.issue29884@psf.upfronthosting.co.za> Message-ID: <1490247853.22.0.728002233703.issue29884@psf.upfronthosting.co.za> Changes by Christophe Zeitouny : Added file: http://bugs.python.org/file46755/python_reproducer.cpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 01:46:27 2017 From: report at bugs.python.org (Christophe Zeitouny) Date: Thu, 23 Mar 2017 05:46:27 +0000 Subject: [issue29884] faulthandler does not properly restore sigaltstack during teardown In-Reply-To: <1490247829.54.0.456330369246.issue29884@psf.upfronthosting.co.za> Message-ID: <1490247987.53.0.860370290983.issue29884@psf.upfronthosting.co.za> Changes by Christophe Zeitouny : ---------- pull_requests: +682 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 02:35:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 06:35:04 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490250904.94.0.373141473162.issue29881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch contains an example of using _Py_STATICVAR(). But it doesn't use _PY_STATICVAR_INIT(). _PY_STATICVAR_INIT() can be used if extract the code of getting _array_reconstructor into separate function. I like the idea in general, but I want to see more examples. Ideally -- the patch should use a new API for *all* static PyObject* variables. This will help to design good API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 02:35:08 2017 From: report at bugs.python.org (Decorater) Date: Thu, 23 Mar 2017 06:35:08 +0000 Subject: [issue29885] Allow GMT timezones to be used in datetime. Message-ID: <1490250908.5.0.958278371805.issue29885@psf.upfronthosting.co.za> New submission from Decorater: I noticed that there is no ways to convert local times to GMT if I realize that some other object (sometimes from a server) is using GMT and they happen to be ahead of my current time. As such it would be great if one can convert their current time that can be in an datetime object to an GMT time to see how much time has passed since something happened on their zone if so desired (otherwise can cause undesired or undefined consequences). ---------- components: Library (Lib) messages: 290027 nosy: Decorater priority: normal severity: normal status: open title: Allow GMT timezones to be used in datetime. versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 02:37:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 06:37:17 +0000 Subject: [issue29885] Allow GMT timezones to be used in datetime. In-Reply-To: <1490250908.5.0.958278371805.issue29885@psf.upfronthosting.co.za> Message-ID: <1490251037.28.0.637625228617.issue29885@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Use pytz (https://pypi.python.org/pypi/pytz). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 04:16:47 2017 From: report at bugs.python.org (Martin Panter) Date: Thu, 23 Mar 2017 08:16:47 +0000 Subject: [issue29885] Allow GMT timezones to be used in datetime. In-Reply-To: <1490250908.5.0.958278371805.issue29885@psf.upfronthosting.co.za> Message-ID: <1490257007.57.0.692868418834.issue29885@psf.upfronthosting.co.za> Martin Panter added the comment: Does the ?astimezone? method work for you? >>> from datetime import * >>> aedt = timezone(+timedelta(hours=11)) >>> local = datetime.now(aedt) >>> format(local) '2017-03-23 19:14:41.410334+11:00' >>> gmt = local.astimezone(timezone.utc) >>> format(gmt) '2017-03-23 08:14:41.410334+00:00' ---------- nosy: +martin.panter resolution: -> works for me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 04:24:37 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 23 Mar 2017 08:24:37 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490257477.63.0.5817260157.issue21895@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Using set_wakeup_fd would fix them... except that it generates spurious warning messages when the wakeup fd buffer is full, and there's no way to stop it Are you using a pipe or a socket to set_wakeup_fd? Pipes have rather small buffers. In any case, since, as you mention, Tornado and Twisted use it, and they never complained, perhaps your example is too contrived or artificial. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 04:32:58 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 23 Mar 2017 08:32:58 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490257978.45.0.930400209159.issue21895@psf.upfronthosting.co.za> Antoine Pitrou added the comment: That said, the pthread_kill() solution deserves testing as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 05:09:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 09:09:47 +0000 Subject: [issue27572] Support bytes-like objects when base is given to int() In-Reply-To: <1468918576.73.0.596747914515.issue27572@psf.upfronthosting.co.za> Message-ID: <1490260187.72.0.466775332133.issue27572@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +683 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 05:10:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 09:10:55 +0000 Subject: [issue27572] Support bytes-like objects when base is given to int() In-Reply-To: <1468918576.73.0.596747914515.issue27572@psf.upfronthosting.co.za> Message-ID: <1490260255.78.0.46138620136.issue27572@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Created PR 779 for the deprecation. ---------- stage: -> patch review versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 05:35:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 09:35:39 +0000 Subject: [issue16572] Bad multi-inheritance support in some libs like threading or multiprocessing In-Reply-To: <1354138508.41.0.9459136379.issue16572@psf.upfronthosting.co.za> Message-ID: <1490261739.19.0.194522441401.issue16572@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The _Verbose class and verbose arguments for threading classes and functions were removed in issue13550. Thus this is 2.7-only issue now. ---------- nosy: +haypo versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 06:00:58 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 23 Mar 2017 10:00:58 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490263257.99.0.0781840892034.issue29881@psf.upfronthosting.co.za> Nick Coghlan added the comment: I like this idea in principle, and suspect it may be helpful in the implementation of the new thread-specific-storage API proposed in PEP 539 (also see http://bugs.python.org/issue25658 ). How would you feel about calling it _Py_ONCE_VAR? The use case here is quite similar to the concepts behind the pthread_once API (just with the lifecycle tied to Py_Initialize/Py_Finalize rather than the C level process), and it's the "initialise-on-first-use" behaviour that's significant here, moreso than the fact that the typical storage target is a static variable. As far as the linked list goes, the nice aspect of Victor's approach is that it doesn't need to do any additional runtime memory allocations - all the storage involved is still statically allocated in the modules that initialise the values, there are just some extra pointer assignments to link everything together (with the GIL protecting against race conditions). However, the user visible ".obj" indirection could still be avoided at the cost of an additional pointer per entry: typedef struct _Py_OnceVar { struct _Py_OnceVar *next; PyObject **obj_ref; } _Py_OnceVar; #define _Py_ONCE_VAR(var_decl, var) \ var_decl var = NULL; static _Py_OnceVar var ## _once_meta = {.next = NULL, .obj_ref = (PyObject **) &var} Intended declaration: _Py_ONCE_VAR(static PyObject *, array_reconstructor); _Py_ONCE_VAR_INIT would similarly be adjusted to assign the supplied value to "var", while also setting "var_once_meta.next" to hook the value into the linked list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 06:13:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 10:13:07 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1490263987.41.0.207829406754.issue25658@psf.upfronthosting.co.za> STINNER Victor added the comment: Hi people working on the new TLS API: I would like your opinion on a related API, issue #29881: Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit ! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 06:20:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 10:20:02 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490264402.93.0.399179638511.issue29881@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy: "The patch contains an example of using _Py_STATICVAR(). But it doesn't use _PY_STATICVAR_INIT()." I'm not sure that I understand your comment. All modified code use _Py_STATICVAR() to declare the declare. All modified code use _PY_STATICVAR_INIT() to initialize the variable, except of array_array___reduce_ex__() which uses explicitly _PyStaticVar_Set() beause its initialization code is more complex. _PyStaticVar_Set() is the low-level function, I would prefer to avoid it since it fails with an assertion error if it's called twice. _PY_STATICVAR_INIT() helper should be perfer since it makes the code shorter, but it's similar to simple expressions like PyUnicode_FromString("\n"). I tried to include examples of usage of both APIs to give you an idea of the API. I chose to *not* patch the whole Python code base, because I would like to first get a review of a the API. It seems like alternatives have been proposed ;-) > I like the idea in general, but I want to see more examples. Which kind of other examples do you need? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 06:22:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 10:22:01 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490264521.71.0.919134402692.issue29881@psf.upfronthosting.co.za> STINNER Victor added the comment: #define _Py_ONCE_VAR(var_decl, var) \ var_decl var = NULL; static _Py_OnceVar var ## _once_meta = {.next = NULL, .obj_ref = (PyObject **) &var} Yeah, I had a similar idea, but I fear that it will increase the usage of the C stack memory. See the issue #28858: my old _PyObject_CallArg1() macro allocated an implicit array on the stack and increased the stack usage, whereas the purpose of the macro was to *reduce* the stack usage (just the opposite!). So I removed the macro. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 06:27:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 10:27:16 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490264836.48.0.77731588251.issue29881@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy: "use gc_next/gc_refs for managing a linked list" I'm not sure that I understand your idea. These fields are already used internally by the garbage collector. If I modify one of these fields, it would corrupt the GC, no? Serhiy: "You can use a dynamic array of PyObject** instead of a linked list for collecting references to "static variables"" Ah yes, I like the idea of using a single array to track all variables. An array reduces memory fragmentation and is simple to maintain, since the API only needs two operations: list.append(obj) and list.clear(). The API already requires to check for errors, so another memory allocation failure wouldn't be suprising. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 06:49:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 10:49:41 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490266181.43.0.262535368372.issue29881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: My apologies Victor. It seems that the browser on my netbook shown only the part of changes and I seen only the change in array_array___reduce_ex__(). I like Nick's idea for hiding the indirection, but passing var_decl doesn't look having much sense to me. It should always be "static PyObject *". I don't have a preference for the name, but the purpose of a new API is not just to ensure that a piece of initialization code is executed at most once, but that the object will be destroyed and the reference will be cleared after finalizing the interpreter. Seems this is different from the purpose of pthread_once(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 06:52:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 10:52:32 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490266352.18.0.816108866992.issue29881@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +684 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 06:54:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 10:54:42 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490266482.75.0.76285351757.issue29881@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote a new different API: https://github.com/python/cpython/pull/780 New C API for variables only initialized once to be able to clear them at exit: New macro _Py_ONCEVAR(var) to declare a variable New macro _PY_ONCEVAR_INIT(var, expr) to initialize a variable once New function _PyOnceVar_Set() to explicitly set a variable once to initialize it New _PyOnceVar_Fini() function clearing all variables (initialized once) at exit Variables keep their PyObject* type, but the API hides an internal C array tracking all Python objects to Py_DECREF them at exit in _PyOnceVar_Fini(). I used Nick's naming scheme since it seems like pthread has an existing API which is similar, but different (my API doesn't require an initialization callback). I really prefer the second API using PyObject*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 07:00:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 11:00:40 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490266840.21.0.287648398257.issue29881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > "use gc_next/gc_refs for managing a linked list" Forgot about this idea. Not all objects have the GC header. But if they have it they could be removed from the GC list and added in the separate list since in any case the garbage collector shouldn't destroy objects referenced by static variables. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 07:07:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 11:07:48 +0000 Subject: [issue6532] thread.get_ident() should return unsigned value In-Reply-To: <1248186325.01.0.817161707988.issue6532@psf.upfronthosting.co.za> Message-ID: <1490267268.66.0.659976930577.issue6532@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 07:22:51 2017 From: report at bugs.python.org (Martin Panter) Date: Thu, 23 Mar 2017 11:22:51 +0000 Subject: [issue20631] python readline module crashing on NULL access In-Reply-To: <1392423131.28.0.0178138253347.issue20631@psf.upfronthosting.co.za> Message-ID: <1490268171.17.0.100603603387.issue20631@psf.upfronthosting.co.za> Martin Panter added the comment: Closing in favour of Issue 13501, since the report was apparently about using a non-Apple Editline rather than Gnu Readline. However see also Issue 29854, where the same symptom is seen with Gnu Readline, and it will probably get the same fix. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 07:23:15 2017 From: report at bugs.python.org (Martin Panter) Date: Thu, 23 Mar 2017 11:23:15 +0000 Subject: [issue20631] python readline module crashing on NULL access In-Reply-To: <1392423131.28.0.0178138253347.issue20631@psf.upfronthosting.co.za> Message-ID: <1490268195.23.0.718821778908.issue20631@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 07:24:14 2017 From: report at bugs.python.org (Martin Panter) Date: Thu, 23 Mar 2017 11:24:14 +0000 Subject: [issue20631] python readline module crashing on NULL access In-Reply-To: <1392423131.28.0.0178138253347.issue20631@psf.upfronthosting.co.za> Message-ID: <1490268253.99.0.438735129283.issue20631@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- superseder: -> Make libedit support more generic; port readline / libedit to FreeBSD _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 07:33:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 11:33:57 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490268837.89.0.813338541687.issue29881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The new API rather combines pthread_once() and pthread_cleanup_push(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 07:57:57 2017 From: report at bugs.python.org (Martin Panter) Date: Thu, 23 Mar 2017 11:57:57 +0000 Subject: [issue29854] Segfault when readline history is more then 2 * history size In-Reply-To: <1489961724.11.0.51675334909.issue29854@psf.upfronthosting.co.za> Message-ID: <1490270277.57.0.89023427131.issue29854@psf.upfronthosting.co.za> Martin Panter added the comment: Gnu Readline comes includes its own documentation (e.g. /usr/share/info/history.info.gz on my computer). It is also at . Perhaps the history_base value is relevant; see some of the comments starting at . It would be interesting to see if Apple Editline is affected. According to the comment in the get_history_item function, history_get might crash before returning the null pointer. Is there some other workaround that avoids calling history_get? ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 08:28:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 12:28:46 +0000 Subject: [issue26657] Directory traversal with http.server and SimpleHTTPServer on windows In-Reply-To: <1459179015.77.0.509336394494.issue26657@psf.upfronthosting.co.za> Message-ID: <1490272126.63.0.920076262953.issue26657@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 08:48:00 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 23 Mar 2017 12:48:00 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490273280.72.0.566968293469.issue29881@psf.upfronthosting.co.za> Nick Coghlan added the comment: Passing var_decl was based on not knowing the answer to two questions: * do we ever declare non-statics this way? (OTOH, if we do, this could be an opportunity to hide them behind read-only accessor functions) * do we ever declare more specific types than PyObject * this way? (OTOH, if that's the uncommon case, requiring a cast to the more specific type probably wouldn't hurt) As far as stack usage goes, all _Py_OnceVar instances should be in the data segment when using the linked list approach, so they shouldn't impact stack usage, and doing so retains the benefit of avoiding dynamic memory allocation just to track the static variable declarations. Since the macro is dereferencing the address of a static variable in the initialiser of another static variable, that shouldn't require any runtime stack space either. OTOH, I haven't actually ever tried compiling a macro like that, so it's entirely possible compilers won't like it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 09:07:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 13:07:11 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490274431.05.0.200398725258.issue29881@psf.upfronthosting.co.za> STINNER Victor added the comment: > * do we ever declare non-statics this way? (OTOH, if we do, this could be an opportunity to hide them behind read-only accessor functions) > * do we ever declare more specific types than PyObject * this way? (OTOH, if that's the uncommon case, requiring a cast to the more specific type probably wouldn't hurt) Well, with my 2nd API, I'm not sure that the macro to declare a variable is very simple: +/* Declare a static PyObject* variable which is only initialized once. + _PyOnceVar_Fini() will clear the variable at Python finalization. */ +#define _Py_ONCEVAR(var) \ + static PyObject* var = NULL Technically, the variable doesn't have to be static. But do we want to use this API for global variables initialized once? It would increase the memory usage, whereas currently we have specialized code like _PyUnicode_Fini() which clears its unicode_empty singleton. I don't want to touch this code. At least, not yet. If you want to support other types than PyObject*, _PY_ONCEVAR_INIT() macro can cast the first argument to PyObject*. I would prefer to start with something simpler, and discuss case by case for other variables. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 09:07:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 13:07:57 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490274477.58.0.89366036954.issue29881@psf.upfronthosting.co.za> STINNER Victor added the comment: About the pull request: to be clear, I know that some modified local variables should use _Py_IDENTIFIER() rather than _Py_ONCEVAR(), but I chose to use _Py_ONCEVAR() just to give examples of the API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 09:39:44 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 23 Mar 2017 13:39:44 +0000 Subject: [issue29640] _PyThreadState_Init and fork race leads to inconsistent key list In-Reply-To: <1487927038.37.0.851881550844.issue29640@psf.upfronthosting.co.za> Message-ID: <1490276384.11.0.780734743153.issue29640@psf.upfronthosting.co.za> Changes by Charalampos Stratakis : ---------- pull_requests: +687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 09:55:19 2017 From: report at bugs.python.org (=?utf-8?q?Charles_Bouchard-L=C3=A9gar=C3=A9?=) Date: Thu, 23 Mar 2017 13:55:19 +0000 Subject: [issue29879] typing.Text not available in python 3.5.1 In-Reply-To: <1490191885.24.0.466307693119.issue29879@psf.upfronthosting.co.za> Message-ID: <1490277319.31.0.0182729949226.issue29879@psf.upfronthosting.co.za> Changes by Charles Bouchard-L?gar? : ---------- pull_requests: +688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 09:56:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 13:56:45 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490277405.94.0.925201797129.issue29881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think we can get rid of _Py_ONCEVAR(). Just keep current declarations. _PY_ONCEVAR_INIT() can work even with non-static global variables. It could work even with non-PyObject pointers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 10:51:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 14:51:11 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490280671.25.0.454529433701.issue29881@psf.upfronthosting.co.za> STINNER Victor added the comment: 3rd round of the API: static PyObject *assertion_error = NULL; ... if (_PY_ONCEVAR_INIT(assertion_error, PyUnicode_InternFromString("AssertionError"))) { return 0; } ... (Not the best example, _Py_IDENTIFIER() would be more appropriate here ;-)) -- I just added a second commit to remove the next field from _Py_Identifier and reuse _PyOnceVar_Set() in _PyUnicode_FromId(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 10:59:56 2017 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 23 Mar 2017 14:59:56 +0000 Subject: [issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread In-Reply-To: <1404208895.06.0.521807683184.issue21895@psf.upfronthosting.co.za> Message-ID: <1490281196.14.0.00891840547722.issue21895@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 11:14:44 2017 From: report at bugs.python.org (chrysn) Date: Thu, 23 Mar 2017 15:14:44 +0000 Subject: [issue29886] links between binascii.{un,}hexlify / bytes.{,to}hex Message-ID: <1490282084.27.0.505150099985.issue29886@psf.upfronthosting.co.za> New submission from chrysn: The function binascii.{un,}hexlify and bytes.{,to}hex do almost the same things (plus/minus details of whether they accept whitespace, and whether the hex-encoded data is accepted/returned as strings or bytes). I think that it would help users to point that out in the documentation, eg. by adding a "Similar functionality is provided by the ... function." lines at the ends of the functions' documentations. ---------- assignee: docs at python components: Documentation messages: 290050 nosy: chrysn, docs at python priority: normal severity: normal status: open title: links between binascii.{un,}hexlify / bytes.{,to}hex type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 12:20:35 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 23 Mar 2017 16:20:35 +0000 Subject: [issue29886] links between binascii.{un,}hexlify / bytes.{,to}hex In-Reply-To: <1490282084.27.0.505150099985.issue29886@psf.upfronthosting.co.za> Message-ID: <1490286035.41.0.208822849557.issue29886@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +689 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 12:30:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 16:30:26 +0000 Subject: [issue29881] Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490286626.36.0.729120421482.issue29881@psf.upfronthosting.co.za> STINNER Victor added the comment: About _PY_ONCEVAR_INIT() vs _Py_IDENTIFIER. Using _Py_IDENTIFIER works well if you have an API accepting directly a _Py_IDENTIFIER*. If you call functions requesting a PyObject*, you need to call _PyUnicode_FromId() and test for failure. If you start by calling _PyUnicode_FromId() when the object is not initialized yet, above you have to use var.object, whereas previously Serhiy and Nick weren't confortable with this specific case. I prefer to use _PY_ONCEVAR_INIT() to keep a regular PyObject* variable and makes the code simpler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 12:57:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 16:57:10 +0000 Subject: [issue29887] test_normalization doesn't work Message-ID: <1490288230.58.0.523545383484.issue29887@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: It needs to fetch http://www.pythontest.net/unicode/9.0.0/NormalizationTest.txt (8.0.0 in 3.5) but get the 404 error. ---------- components: Tests messages: 290053 nosy: serhiy.storchaka priority: normal severity: normal status: open title: test_normalization doesn't work type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:05:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 17:05:29 +0000 Subject: [issue20554] Use specific asserts in optparse test In-Reply-To: <1391808859.25.0.0531028969207.issue20554@psf.upfronthosting.co.za> Message-ID: <1490288729.23.0.645876849354.issue20554@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +691 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:06:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 17:06:04 +0000 Subject: [issue20545] Use specific asserts in unicode tests In-Reply-To: <1391804725.49.0.807419128336.issue20545@psf.upfronthosting.co.za> Message-ID: <1490288764.58.0.33752040919.issue20545@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +692 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:06:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 17:06:27 +0000 Subject: [issue20548] Use specific asserts in warnings and exceptions tests In-Reply-To: <1391804772.02.0.729156315156.issue20548@psf.upfronthosting.co.za> Message-ID: <1490288787.7.0.676664537557.issue20548@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +693 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:07:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 17:07:11 +0000 Subject: [issue20550] Use specific asserts in collections tests In-Reply-To: <1391804816.95.0.0835407946311.issue20550@psf.upfronthosting.co.za> Message-ID: <1490288831.94.0.0346887866576.issue20550@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +694 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:07:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 17:07:46 +0000 Subject: [issue20552] Use specific asserts in bytes tests In-Reply-To: <1391804856.25.0.0710909652112.issue20552@psf.upfronthosting.co.za> Message-ID: <1490288866.02.0.523795990091.issue20552@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:10:09 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 23 Mar 2017 17:10:09 +0000 Subject: [issue20552] Use specific asserts in bytes tests In-Reply-To: <1391804856.25.0.0710909652112.issue20552@psf.upfronthosting.co.za> Message-ID: <1490289009.2.0.703255030017.issue20552@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: I think this should only go to 3.7 now. ---------- nosy: +Mariatta versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:10:14 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 23 Mar 2017 17:10:14 +0000 Subject: [issue29883] asyncio: Windows Proactor Event Loop UDP Support In-Reply-To: <1490210881.18.0.553215827239.issue29883@psf.upfronthosting.co.za> Message-ID: <1490289014.46.0.0976395381561.issue29883@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +giampaolo.rodola, haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:21:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 17:21:30 +0000 Subject: [issue20547] Use specific asserts in bigmem tests In-Reply-To: <1391804756.75.0.781107542362.issue20547@psf.upfronthosting.co.za> Message-ID: <1490289690.54.0.375442823469.issue20547@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:33:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 17:33:46 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1490290426.87.0.218687088069.issue16510@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:36:10 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 23 Mar 2017 17:36:10 +0000 Subject: [issue23699] Add a macro to ease writing rich comparisons In-Reply-To: <1426686202.27.0.781464549576.issue23699@psf.upfronthosting.co.za> Message-ID: <1490290570.04.0.42257488883.issue23699@psf.upfronthosting.co.za> Changes by Charalampos Stratakis : ---------- pull_requests: +698 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:37:14 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 23 Mar 2017 17:37:14 +0000 Subject: [issue23699] Add a macro to ease writing rich comparisons In-Reply-To: <1426686202.27.0.781464549576.issue23699@psf.upfronthosting.co.za> Message-ID: <1490290634.32.0.704409511601.issue23699@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Sent a PR against the master branch. What do you think about it? Would it make sense as well for python 3.6 now? ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:46:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 17:46:46 +0000 Subject: [issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490291206.43.0.134813423423.issue29881@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Add a new private API for "static C variables" (_PyStaticVar) to clear them at exit -> Add a new private API clear private variables, which are initialized once, at Python shutdown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 13:49:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 23 Mar 2017 17:49:34 +0000 Subject: [issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490291374.65.0.961951587868.issue29881@psf.upfronthosting.co.za> STINNER Victor added the comment: I modified more modules to use the new API. I'm not sure that using the API in modules is safe. It's safe to use the API in functions which begins with trying to initialize the variable. In such case, if the variable is cleared, calling the function later initialize again the variable and it's fine. When for module variables only initialized when the module is initialized, there is a risk that a module function tries to access a variable which has been cleared previously during Python shutdown. See for example changes in the _datetime module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 14:04:23 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Thu, 23 Mar 2017 18:04:23 +0000 Subject: [issue29888] The link referring to "Python download page" is broken Message-ID: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> New submission from Kinebuchi Tomohiko: The download page [1]_ contains a link intended to refer to the release page of the corresponding Python version [2]_. .. [1] `Download Python 2.7.13 Documentation `_ .. [2] e.g. `Python 2.7.8 Release `_ Although, this link is broken for three reasons. 1. Wrong template syntax `Present code `_::

{% trans download_page="https://www.python.org/download/releases/{{ release[:5] }}/" %}HTML Help (.chm) files are made available in the "Windows" section on the Python download page.{% endtrans %}

Fixed code::

{% trans download_page="https://www.python.org/download/releases/" + release[:5] + "/" %}HTML Help (.chm) files are made available in the "Windows" section on the Python download page.{% endtrans %}

2. Unexpected version number The URL contains a Python version string (i.e. ``release[:5]``), but for Python 2.7.13, ``release[:5]`` evaluates to ``'2.7.1'`` which obviously wrong as a version string. 3. Non-existent release pages for some versions www.python.org has pages which URLs are https://www.python.org/download/releases// with = 2.7.1--8, although has no pages with = 2.7.9 and so on. Is https://www.python.org/downloads/release/python-2713/ an appropriate page to refer? ---------- assignee: docs at python components: Documentation messages: 290057 nosy: cocoatomo, docs at python priority: normal severity: normal status: open title: The link referring to "Python download page" is broken versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 14:35:37 2017 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 23 Mar 2017 18:35:37 +0000 Subject: [issue20554] Use specific asserts in optparse test In-Reply-To: <1391808859.25.0.0531028969207.issue20554@psf.upfronthosting.co.za> Message-ID: <1490294137.74.0.79027438751.issue20554@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 14:36:20 2017 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 23 Mar 2017 18:36:20 +0000 Subject: [issue20548] Use specific asserts in warnings and exceptions tests In-Reply-To: <1391804772.02.0.729156315156.issue20548@psf.upfronthosting.co.za> Message-ID: <1490294180.09.0.500561956481.issue20548@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 14:36:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 18:36:58 +0000 Subject: [issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490294218.68.0.298732326103.issue29881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Some code (_PyUnicode_FromId, bool_repr, create_filter) could be simpler if make _PY_ONCEVAR_INIT returning the value (NULL in case of error). The signature of _PY_ONCEVAR_INIT() is the same as of _Py_SETREF(). If var == NULL both `_PY_ONCEVAR_INIT(var, expr)` and `_Py_SETREF(var, expr)` are equivalent to just `var = expr`. Maybe rename _PY_ONCEVAR_INIT to _Py_SET_ONCE? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 14:37:04 2017 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 23 Mar 2017 18:37:04 +0000 Subject: [issue16510] Using appropriate checks in tests In-Reply-To: <1353321858.76.0.504726837876.issue16510@psf.upfronthosting.co.za> Message-ID: <1490294224.83.0.158367702651.issue16510@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 17:30:44 2017 From: report at bugs.python.org (Thomas Knox) Date: Thu, 23 Mar 2017 21:30:44 +0000 Subject: [issue29889] test_asyncio fails always Message-ID: <1490304644.24.0.581268594683.issue29889@psf.upfronthosting.co.za> New submission from Thomas Knox: Downloaded Python 3.6.1 source code onto CentOS 7.3 (64 bit), Fedora 25 (64 bit), Ubuntu 16.10 (64 bit) and Raspberry Pi 8.0 (32 bit). Configured with ./configure --enable-shared --enable-optimizations --enable-loadable-sqlite-extensions --disable-ipv6 --with-system-expat --with-system-ffi --with-threads On every platform, when running the profile generation code, test_asyncio fails with this error message: 0:06:45 [ 25/405] test_asyncio Executing .start() done, defined at /home/pi/Source/Python-3.6.1/Lib/test/test_asyncio/test_pep492.py:150> result=None created at /home/pi/Source/Python-3.6.1/Lib/asyncio/base_events.py:446> took 2.106 seconds 0:13:11 [ 26/405] test_asyncore -- test_asyncio failed in 6 min 27 sec ---------- components: Tests messages: 290059 nosy: Thomas Knox priority: normal severity: normal status: open title: test_asyncio fails always type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 17:40:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 23 Mar 2017 21:40:07 +0000 Subject: [issue22005] datetime.__setstate__ fails decoding python2 pickle In-Reply-To: <1405687792.76.0.689943587668.issue22005@psf.upfronthosting.co.za> Message-ID: <1490305207.9.0.992763412842.issue22005@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +699 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 17:43:59 2017 From: report at bugs.python.org (Ned Deily) Date: Thu, 23 Mar 2017 21:43:59 +0000 Subject: [issue29889] test_asyncio fails always In-Reply-To: <1490304644.24.0.581268594683.issue29889@psf.upfronthosting.co.za> Message-ID: <1490305439.92.0.994181759641.issue29889@psf.upfronthosting.co.za> Ned Deily added the comment: There have been other reports (e.g. Issue29712) of failures when using --enable-optimizations with --enable-shared. Can you see if removing --enable-shared makes a difference for your configurations? ---------- components: +asyncio -Tests nosy: +haypo, ned.deily, yselivanov type: compile error -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 17:56:13 2017 From: report at bugs.python.org (Ilya Kulakov) Date: Thu, 23 Mar 2017 21:56:13 +0000 Subject: [issue22962] ipaddress: Add optional prefixlen argument to ip_interface and ip_network In-Reply-To: <1417164846.5.0.804919214198.issue22962@psf.upfronthosting.co.za> Message-ID: <1490306173.89.0.147663021329.issue22962@psf.upfronthosting.co.za> Ilya Kulakov added the comment: You can initialize ip_interface via a tuple of 2 elements: IP address and a prefix (prefixlen or string representation of a netmask). I believe the issue can be closed now. ---------- nosy: +Ilya.Kulakov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 17:59:48 2017 From: report at bugs.python.org (Ilya Kulakov) Date: Thu, 23 Mar 2017 21:59:48 +0000 Subject: [issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation Message-ID: <1490306388.92.0.69250411121.issue29890@psf.upfronthosting.co.za> New submission from Ilya Kulakov: As per documentation, it should understand the same arguments as IPv*Network. Unfortunately it does not recognize netmask in string form. Hence the following code will fail: ipaddress.ip_interface(('192.168.1.10', '255.255.255.0')) while the following will work: ipaddress.ip_network(('192.168.1.10', '255.255.255.0'), strict=False) ---------- messages: 290062 nosy: Ilya.Kulakov priority: normal severity: normal status: open title: Constructor of ipaddress.IPv*Interface does not follow documentation type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 18:03:56 2017 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 23 Mar 2017 22:03:56 +0000 Subject: [issue29891] urllib.request.Request accepts but doesn't check bytes headers Message-ID: <1490306636.78.0.894703905259.issue29891@psf.upfronthosting.co.za> New submission from Ezio Melotti: urllib.request.Request allows the user to create a request object like: req = Request(url, headers={b'Content-Type': b'application/json'}) When calling urlopen(req, data), urllib will check if a 'Content-Type' header is present and fail to recognize b'Content-Type' because it's bytes. urrlib will therefore add the default Content-Type 'application/x-www-form-urlencoded', and the request will then be sent with both Content-Types. This will result in difficult-to-debug errors because the server will sometimes pick one and sometimes the other, depending on the order. urllib should either reject bytes headers, or check for both bytes and strings. The docs also don't seem to specify that the headers should be strings. ---------- components: Library (Lib) messages: 290063 nosy: ezio.melotti, orsenthil priority: normal severity: normal stage: test needed status: open title: urllib.request.Request accepts but doesn't check bytes headers type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 18:10:40 2017 From: report at bugs.python.org (Andrei Fokau) Date: Thu, 23 Mar 2017 22:10:40 +0000 Subject: [issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files? In-Reply-To: <1487954925.89.0.910316575912.issue29642@psf.upfronthosting.co.za> Message-ID: <1490307040.28.0.851086760131.issue29642@psf.upfronthosting.co.za> Andrei Fokau added the comment: I was wrong. The ticket can be closed now. ---------- nosy: +Andrei Fokau2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 18:17:07 2017 From: report at bugs.python.org (Maciej Szulik) Date: Thu, 23 Mar 2017 22:17:07 +0000 Subject: [issue29891] urllib.request.Request accepts but doesn't check bytes headers In-Reply-To: <1490306636.78.0.894703905259.issue29891@psf.upfronthosting.co.za> Message-ID: <1490307427.37.0.238075542801.issue29891@psf.upfronthosting.co.za> Changes by Maciej Szulik : ---------- nosy: +maciej.szulik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 18:40:03 2017 From: report at bugs.python.org (Ned Deily) Date: Thu, 23 Mar 2017 22:40:03 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1490308803.63.0.227651731871.issue29804@psf.upfronthosting.co.za> Ned Deily added the comment: Technically speaking, we do not officially support arm64 in our release process as we have no arm64 buildbots nor an identified core developer for the platform; see PEP 11 for the policy details. So there is no place to test a fix if there was one identified. That said, it would be good to fix the problem if someone is willing to provide a fix and test it or determine that the issue here is a libffi problem. It would be even better if we could make arm64 an officially supported platform as outlined. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 18:46:05 2017 From: report at bugs.python.org (Thomas Knox) Date: Thu, 23 Mar 2017 22:46:05 +0000 Subject: [issue29889] test_asyncio fails always In-Reply-To: <1490304644.24.0.581268594683.issue29889@psf.upfronthosting.co.za> Message-ID: <1490309165.78.0.416229630115.issue29889@psf.upfronthosting.co.za> Thomas Knox added the comment: I changed the configuration flags to be: pi at pi3:~/Source/Python-3.6.1 $ ./configure --enable-optimizations --enable-loadable-sqlite-extensions --disable-ipv6 --with-system-expat --with-system-ffi --with-threads The profiling filed again with: 0:04:47 [ 25/405] test_asyncio Executing .start() done, defined at /home/pi/Source/Python-3.6.1/Lib/test/test_asyncio/test_pep492.py:150> result=None created at /home/pi/Source/Python-3.6.1/Lib/asyncio/base_events.py:446> took 1.187 seconds 0:08:45 [ 26/405] test_asyncore -- test_asyncio failed in 3 min 59 sec But at least it failed 2.5 minutes faster. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 18:51:32 2017 From: report at bugs.python.org (Zachary Ware) Date: Thu, 23 Mar 2017 22:51:32 +0000 Subject: [issue29889] test_asyncio fails always In-Reply-To: <1490304644.24.0.581268594683.issue29889@psf.upfronthosting.co.za> Message-ID: <1490309492.92.0.199997371704.issue29889@psf.upfronthosting.co.za> Zachary Ware added the comment: Does the build fail, or just the test in the profile generation? ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 18:57:41 2017 From: report at bugs.python.org (Thomas Knox) Date: Thu, 23 Mar 2017 22:57:41 +0000 Subject: [issue29889] test_asyncio fails always In-Reply-To: <1490304644.24.0.581268594683.issue29889@psf.upfronthosting.co.za> Message-ID: <1490309861.95.0.767454172873.issue29889@psf.upfronthosting.co.za> Thomas Knox added the comment: The build succeeds, but the profile generation fails (only the test_asyncio portion fails), then does a new profiled build after the profiling run completes which succeeds. Then, when doing a 'make install', it builds the entire thing again and runs another profile generation run which also fails, then a new profiled build. Possibly because the first profile run failed? On an RPi, this is exceedingly painful as a build/profile/build cycle takes about 10 hours. So doing it twice is double-unfun. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 19:01:53 2017 From: report at bugs.python.org (Mark Becwar) Date: Thu, 23 Mar 2017 23:01:53 +0000 Subject: [issue28041] Inconsistent behavior: Get st_nlink from os.stat() and os.scandir() In-Reply-To: <1473413094.07.0.556978499762.issue28041@psf.upfronthosting.co.za> Message-ID: <1490310113.52.0.139645340431.issue28041@psf.upfronthosting.co.za> Changes by Mark Becwar : ---------- pull_requests: +700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 19:05:52 2017 From: report at bugs.python.org (Ned Batchelder) Date: Thu, 23 Mar 2017 23:05:52 +0000 Subject: [issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files? In-Reply-To: <1487954925.89.0.910316575912.issue29642@psf.upfronthosting.co.za> Message-ID: <1490310352.87.0.352456345788.issue29642@psf.upfronthosting.co.za> Changes by Ned Batchelder : ---------- nosy: +nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 19:43:13 2017 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 23 Mar 2017 23:43:13 +0000 Subject: [issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation In-Reply-To: <1490306388.92.0.69250411121.issue29890@psf.upfronthosting.co.za> Message-ID: <1490312593.61.0.586021991058.issue29890@psf.upfronthosting.co.za> Eric V. Smith added the comment: This should be easy enough to fix, at least in IPv4Interface.__init__. It needs to copy some of IPv4Network.__init__, dealing with address[1] and calling _make_netmask(). Currently, it just calls int(address[1]). I haven't looked at IPv6Interface. Tests are also needed, of course. ---------- keywords: +easy nosy: +eric.smith stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 19:46:18 2017 From: report at bugs.python.org (OSAMU NAKAMURA) Date: Thu, 23 Mar 2017 23:46:18 +0000 Subject: [issue29892] change statement for open() is splited into two part in middle of sentence. Message-ID: <1490312778.71.0.779732227064.issue29892@psf.upfronthosting.co.za> New submission from OSAMU NAKAMURA: In https://docs.python.org/3.6/library/functions.html#open , Following sentence is wrongly separated by extra asterisk. ``` FileExistsError is now raised if the file opened in exclusive creation mode ('x') already exists. ``` This mistake is introduced by https://github.com/python/cpython/commit/3929499914d47365ae744df312e16da8955c90ac#diff-30d76a3dc0c885f86917b7d307ccf279 ---------- assignee: docs at python components: Documentation messages: 290070 nosy: OSAMU.NAKAMURA, docs at python priority: normal severity: normal status: open title: change statement for open() is splited into two part in middle of sentence. versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 20:16:52 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Fri, 24 Mar 2017 00:16:52 +0000 Subject: [issue29892] change statement for open() is splited into two part in middle of sentence. In-Reply-To: <1490312778.71.0.779732227064.issue29892@psf.upfronthosting.co.za> Message-ID: <1490314612.74.0.780490684673.issue29892@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Indeed, nice catch! Submit a PR for it if you want to (if not, someone else will pick it up soon :-) ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 20:58:30 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 24 Mar 2017 00:58:30 +0000 Subject: [issue28041] Inconsistent behavior: Get st_nlink from os.stat() and os.scandir() In-Reply-To: <1473413094.07.0.556978499762.issue28041@psf.upfronthosting.co.za> Message-ID: <1490317110.15.0.277547049832.issue28041@psf.upfronthosting.co.za> Josh Rosenberg added the comment: This is documented behavior. Per the docs for os.DirEntry's stat method (the objects yielded by os.scandir): >On Windows, the st_ino, st_dev and st_nlink attributes of the stat_result are always set to zero. Call os.stat() to get these attributes. It might be nice if those values could be cached on read (through a lazily initialized value on property access or the like), but this is not a bug, it's working as documented. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 21:54:25 2017 From: report at bugs.python.org (Case Van Horsen) Date: Fri, 24 Mar 2017 01:54:25 +0000 Subject: [issue29882] Add an efficient popcount method for integers In-Reply-To: <1490203842.58.0.276315183014.issue29882@psf.upfronthosting.co.za> Message-ID: <1490320465.24.0.724158503595.issue29882@psf.upfronthosting.co.za> Case Van Horsen added the comment: I like the name bit_count and I'll gladly add it to gmpy2 with the appropriate changes to exceptions, etc. ---------- nosy: +casevh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 22:26:36 2017 From: report at bugs.python.org (Mandeep) Date: Fri, 24 Mar 2017 02:26:36 +0000 Subject: [issue29862] Fix grammar typo in importlib.reload() exception In-Reply-To: <1490036928.42.0.0658763709681.issue29862@psf.upfronthosting.co.za> Message-ID: <1490322396.43.0.384904246575.issue29862@psf.upfronthosting.co.za> Mandeep added the comment: Hi Brett, I'd like to take this on as my first contribution to CPython if that's okay with you. ---------- nosy: +mandeepb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 23:51:21 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 03:51:21 +0000 Subject: [issue29889] test_asyncio fails always In-Reply-To: <1490304644.24.0.581268594683.issue29889@psf.upfronthosting.co.za> Message-ID: <1490327481.39.0.279489248909.issue29889@psf.upfronthosting.co.za> Xiang Zhang added the comment: > Then, when doing a 'make install', it builds the entire thing again and runs another profile generation run which also fails, then a new profiled build. Possibly because the first profile run failed? This is a known issue. Some build commands always clear the environment and rebuild. See #29243. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 23 23:53:41 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 03:53:41 +0000 Subject: [issue29243] --enable-optimizations makes common build commands always need to compile from scratch In-Reply-To: <1484151314.82.0.308427338149.issue29243@psf.upfronthosting.co.za> Message-ID: <1490327620.99.0.934964742121.issue29243@psf.upfronthosting.co.za> Xiang Zhang added the comment: Another complaint from #29889. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 01:20:17 2017 From: report at bugs.python.org (Torrin Jones) Date: Fri, 24 Mar 2017 05:20:17 +0000 Subject: [issue29893] create_subprocess_exec doc doesn't match software Message-ID: <1490332817.83.0.92510042207.issue29893@psf.upfronthosting.co.za> New submission from Torrin Jones: The documentation for asyncio.create_subprocess_exec says this is the definition . . . asyncio.create_subprocess_exec(*args, stdin=None, stdout=None, stderr=None, loop=None, limit=None, **kwds) The actual definition is this . . . def create_subprocess_exec(program, *args, stdin=None, stdout=None, stderr=None, loop=None, limit=streams._DEFAULT_LIMIT, **kwds) Notice the first argument (program) at the start of the actual definition. ---------- components: asyncio messages: 290077 nosy: Torrin Jones, yselivanov priority: normal severity: normal status: open title: create_subprocess_exec doc doesn't match software versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 01:26:32 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 05:26:32 +0000 Subject: [issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490333192.5.0.364110830576.issue29881@psf.upfronthosting.co.za> Nick Coghlan added the comment: The main potential benefit I see to keeping the special variable declaration is that it may help avoid a certain category of error: calling _Py_ONCE_VAR_INIT on a stack local pointer reference (which would leave the global array with a reference to nonsense). While we don't care if the once_vars are static or not, we do care that they're not allocated on the call stack, as otherwise they won't be around for Py_Finalize() to clean up. On the other hand, _Py_SET_ONCE is nice and easy to explain "it's similar to _Py_SETREF, but: 1) doesn't do anything if the reference is already set; and 2) registers the reference to be cleaned up in Py_Finalize" Also interesting is the fact that you can still use _Py_SETREF to change a reference that was initialized with _Py_SET_ONCE without breaking anything. From that point of view, a better name might be _Py_SET_FINALIZED, emphasising the fact that it registers the pointer for finalization over the fact that it's a no-op when run on an already set pointer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 01:33:25 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 05:33:25 +0000 Subject: [issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490333605.92.0.158815482883.issue29881@psf.upfronthosting.co.za> Nick Coghlan added the comment: For module level variables, I'd expect this API to need to be used in tandem with switching the module over to PEP 489 multi-phase initialization. By calling the new API in their _Py_mod_exec slot implementation, extension modules should be able to handle multiple initialize/finalize cycles correctly: https://www.python.org/dev/peps/pep-0489/#subinterpreters-and-interpreter-reloading ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 04:27:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 08:27:24 +0000 Subject: [issue29894] Deprecate returning a subclass of complex from __complex__ Message-ID: <1490344044.5.0.0943427930901.issue29894@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: This is similar to issue26983, but complex() always returned exact complex. A deprecation warning is added just for uniformity with __float__ and __int__. ---------- components: Interpreter Core messages: 290080 nosy: mark.dickinson, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Deprecate returning a subclass of complex from __complex__ type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 04:32:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 08:32:48 +0000 Subject: [issue29894] Deprecate returning a subclass of complex from __complex__ In-Reply-To: <1490344044.5.0.0943427930901.issue29894@psf.upfronthosting.co.za> Message-ID: <1490344368.11.0.806398645003.issue29894@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 04:33:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 08:33:06 +0000 Subject: [issue29894] Deprecate returning a subclass of complex from __complex__ In-Reply-To: <1490344044.5.0.0943427930901.issue29894@psf.upfronthosting.co.za> Message-ID: <1490344386.44.0.334070838362.issue29894@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 05:52:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 09:52:21 +0000 Subject: [issue19930] os.makedirs('dir1/dir2', 0) always fails In-Reply-To: <1386500945.84.0.693179822476.issue19930@psf.upfronthosting.co.za> Message-ID: <1490349141.08.0.234293584179.issue19930@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +702 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 07:18:10 2017 From: report at bugs.python.org (Christophe Zeitouny) Date: Fri, 24 Mar 2017 11:18:10 +0000 Subject: [issue29884] faulthandler does not properly restore sigaltstack during teardown In-Reply-To: <1490247829.54.0.456330369246.issue29884@psf.upfronthosting.co.za> Message-ID: <1490354290.72.0.523366889785.issue29884@psf.upfronthosting.co.za> Changes by Christophe Zeitouny : ---------- pull_requests: +703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 07:19:24 2017 From: report at bugs.python.org (Christophe Zeitouny) Date: Fri, 24 Mar 2017 11:19:24 +0000 Subject: [issue29884] faulthandler does not properly restore sigaltstack during teardown In-Reply-To: <1490247829.54.0.456330369246.issue29884@psf.upfronthosting.co.za> Message-ID: <1490354364.89.0.827943442633.issue29884@psf.upfronthosting.co.za> Changes by Christophe Zeitouny : ---------- pull_requests: +704 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 07:27:30 2017 From: report at bugs.python.org (Andrew Nester) Date: Fri, 24 Mar 2017 11:27:30 +0000 Subject: [issue29649] struct.pack_into check boundary error message ignores offset In-Reply-To: <1488030784.09.0.674246877605.issue29649@psf.upfronthosting.co.za> Message-ID: <1490354850.66.0.0610578410873.issue29649@psf.upfronthosting.co.za> Andrew Nester added the comment: any updates on this issue? looks like PR is ready to go ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 07:27:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 11:27:44 +0000 Subject: [issue19930] os.makedirs('dir1/dir2', 0) always fails In-Reply-To: <1386500945.84.0.693179822476.issue19930@psf.upfronthosting.co.za> Message-ID: <1490354864.75.0.874354605852.issue19930@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e304e33c16e060932d1e2cc8a030d42b02b429b5 by Serhiy Storchaka in branch 'master': bpo-19930: The mode argument of os.makedirs() no longer affects the file (#799) https://github.com/python/cpython/commit/e304e33c16e060932d1e2cc8a030d42b02b429b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 07:27:48 2017 From: report at bugs.python.org (Andrew Nester) Date: Fri, 24 Mar 2017 11:27:48 +0000 Subject: [issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted In-Reply-To: <1487193679.14.0.35599130933.issue29573@psf.upfronthosting.co.za> Message-ID: <1490354868.45.0.138076848112.issue29573@psf.upfronthosting.co.za> Andrew Nester added the comment: any updates? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 07:28:27 2017 From: report at bugs.python.org (Andrew Nester) Date: Fri, 24 Mar 2017 11:28:27 +0000 Subject: [issue29553] Argparser does not display closing parentheses in nested mutex groups In-Reply-To: <1487084393.73.0.392893421751.issue29553@psf.upfronthosting.co.za> Message-ID: <1490354907.36.0.224390236635.issue29553@psf.upfronthosting.co.za> Andrew Nester added the comment: any updates? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 07:28:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 11:28:49 +0000 Subject: [issue19930] os.makedirs('dir1/dir2', 0) always fails In-Reply-To: <1386500945.84.0.693179822476.issue19930@psf.upfronthosting.co.za> Message-ID: <1490354929.92.0.76643765887.issue19930@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 07:42:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 11:42:13 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1490355733.26.0.448753528317.issue27425@psf.upfronthosting.co.za> STINNER Victor added the comment: In the master branch, .gitattributes now contains: --- *.pck binary Lib/test/cjkencodings/* binary Lib/test/decimaltestdata/*.decTest binary Lib/test/sndhdrdata/sndhdr.* binary Lib/test/test_email/data/msg_26.txt binary Lib/test/xmltestdata/* binary Lib/venv/scripts/nt/* binary Lib/test/coding20731.py binary --- History of the file: --- $ git log --follow .gitattributes commit 060d2d776a29341c079cce37220324f9775140ba Author: INADA Naoki Date: Sun Mar 5 08:49:45 2017 +0900 remove merge=union attribute for Misc/NEWS (GH-460) Github doesn't support it (ref. isaacs/github#487). So it can't ease conflict on Github. Additionally, it can make trouble when cherry-pick. (ref. GH-212) commit 2771304357607aa62801a67acc1e3c7c8ec489ce Author: Benjamin Peterson Date: Wed Feb 22 22:38:48 2017 -0800 mark various test data binary (#233) commit 2c700af5a761f83f303cc7295b660ac31f7d4ed1 Author: INADA Naoki Date: Tue Feb 21 18:39:41 2017 +0900 .gitattribute -> .gitattributes (GH-213) commit 3f3d0364a91aa8b89e175a49f93ad04dd4676186 Author: INADA Naoki Date: Tue Feb 21 18:17:06 2017 +0900 Reduce conflict on Misc/NEWS (GH-212) use "union" merge strategy for Misc/NEWS. --- test_random and test_sax now pass on my Windows VM... but still fail on the "AMD64 Windows8 3.x" buildbot :-( http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/461/steps/test/logs/stdio Is it possible that Git on this buildbot ignores .gitattributes? Maybe the Git version is too old? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 08:52:13 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 24 Mar 2017 12:52:13 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1490359933.42.0.915981947471.issue29861@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 8988945cdc27ffa86ba8c624e095b51c459f5154 by Antoine Pitrou in branch 'master': bpo-29861: release references to multiprocessing Pool tasks (#743) https://github.com/python/cpython/commit/8988945cdc27ffa86ba8c624e095b51c459f5154 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 09:05:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 13:05:22 +0000 Subject: [issue29694] race condition in pathlib mkdir with flags parents=True In-Reply-To: <1488462813.87.0.464471853988.issue29694@psf.upfronthosting.co.za> Message-ID: <1490360722.09.0.540056325678.issue29694@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can you provide tests? ---------- nosy: +serhiy.storchaka stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 09:09:32 2017 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 24 Mar 2017 13:09:32 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1490360972.17.0.820418776572.issue2771@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- Removed message: http://bugs.python.org/msg286498 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 09:15:28 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 24 Mar 2017 13:15:28 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1490361328.77.0.319890923695.issue29861@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 09:30:30 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 24 Mar 2017 13:30:30 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1490362230.5.0.184194567276.issue29861@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 09:45:36 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 24 Mar 2017 13:45:36 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1490363136.79.0.114092632493.issue29861@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset cc3331fec8b7a61c3f06c097eac85bfa38490758 by Antoine Pitrou in branch '3.6': bpo-29861: release references to multiprocessing Pool tasks (#743) (#800) https://github.com/python/cpython/commit/cc3331fec8b7a61c3f06c097eac85bfa38490758 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 10:19:20 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 24 Mar 2017 14:19:20 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1490365160.63.0.482301854674.issue29861@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 80cb6ed4db9bae09de1e9ad6001d11cb45a4c1cc by Antoine Pitrou in branch '3.5': bpo-29861: release references to multiprocessing Pool tasks (#743) (#801) https://github.com/python/cpython/commit/80cb6ed4db9bae09de1e9ad6001d11cb45a4c1cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 10:24:13 2017 From: report at bugs.python.org (OSAMU NAKAMURA) Date: Fri, 24 Mar 2017 14:24:13 +0000 Subject: [issue29892] change statement for open() is splited into two part in middle of sentence. In-Reply-To: <1490312778.71.0.779732227064.issue29892@psf.upfronthosting.co.za> Message-ID: <1490365453.85.0.378480652913.issue29892@psf.upfronthosting.co.za> Changes by OSAMU NAKAMURA : ---------- pull_requests: +707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 10:24:33 2017 From: report at bugs.python.org (Tommy Carpenter) Date: Fri, 24 Mar 2017 14:24:33 +0000 Subject: [issue29895] Distutils blows up with an incorrect pypirc, should be caught Message-ID: <1490365473.69.0.662081207985.issue29895@psf.upfronthosting.co.za> New submission from Tommy Carpenter: Full details and stacktrace are at: http://stackoverflow.com/questions/43001446/python-pypi-configparser-blowing-up-when-pointing-to-certain-repo/43001770#43001770 Essentially, I had an index-servers section that listed a repo, that was not listed in the remainder of the .pypirc file. Instead of distutils catching this, it blows up in an obscure ConfigParsing error. ---------- components: Distutils messages: 290090 nosy: Tommy Carpenter, dstufft, merwok priority: normal severity: normal status: open title: Distutils blows up with an incorrect pypirc, should be caught type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 10:34:38 2017 From: report at bugs.python.org (Vasiliy Faronov) Date: Fri, 24 Mar 2017 14:34:38 +0000 Subject: [issue29896] ElementTree.fromstring raises undocumented UnicodeError Message-ID: <1490366078.02.0.633799101454.issue29896@psf.upfronthosting.co.za> New submission from Vasiliy Faronov: >>> from xml.etree import ElementTree as ET >>> ET.fromstring(b'<\xC4/>') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/xml/etree/ElementTree.py", line 1314, in XML parser.feed(text) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 0: invalid continuation byt e The documentation for xml.etree.ElementTree does not mention that it can raise UnicodeError, only ParseError. I think that either the above error should be wrapped in a ParseError, or the documentation should be amended. This happens at least on 3.6, 3.5 and 2.7. ---------- messages: 290091 nosy: vfaronov priority: normal severity: normal status: open title: ElementTree.fromstring raises undocumented UnicodeError type: behavior versions: Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 10:53:25 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 24 Mar 2017 14:53:25 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1490367205.88.0.65735308089.issue29861@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +708 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 11:03:48 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 24 Mar 2017 15:03:48 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1490367828.91.0.0719483157058.issue29861@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 5084ff7ddfe68969d95af12075016f309718aea8 by Antoine Pitrou in branch '2.7': bpo-29861: release references to multiprocessing Pool tasks (#743) (#803) https://github.com/python/cpython/commit/5084ff7ddfe68969d95af12075016f309718aea8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 11:04:38 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 24 Mar 2017 15:04:38 +0000 Subject: [issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long In-Reply-To: <1490033654.49.0.302428807584.issue29861@psf.upfronthosting.co.za> Message-ID: <1490367878.96.0.597748939755.issue29861@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:09:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 16:09:40 +0000 Subject: [issue22319] mailbox.MH chokes on directories without .mh_sequences In-Reply-To: <1409532286.19.0.0096423454666.issue22319@psf.upfronthosting.co.za> Message-ID: <1490371780.99.0.772957338392.issue22319@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +709 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:16:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 16:16:01 +0000 Subject: [issue22319] mailbox.MH chokes on directories without .mh_sequences In-Reply-To: <1409532286.19.0.0096423454666.issue22319@psf.upfronthosting.co.za> Message-ID: <1490372161.41.0.0739553125189.issue22319@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I consider this issue as a new feature. PR 804 makes get_sequences() and set_sequences() working when the ".mh_sequences" file does not exist. The open question is what to do with lock(). Currently it fails if the ".mh_sequences" file does not exist. Is it correct to create the ".mh_sequences" file in lock() or this invalidates the lock? Is it safe to change the file open mode in set_sequences() from "r+" to "w" (the file is truncated later)? ---------- nosy: +serhiy.storchaka type: behavior -> enhancement versions: +Python 3.7 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:17:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 16:17:16 +0000 Subject: [issue17651] Errno checking replaced by concrete classes inherited from OSError In-Reply-To: <1365354742.46.0.363482089834.issue17651@psf.upfronthosting.co.za> Message-ID: <1490372236.04.0.335814674345.issue17651@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:17:27 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 Mar 2017 16:17:27 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1490372247.36.0.946910725533.issue27425@psf.upfronthosting.co.za> Steve Dower added the comment: More likely it needs a fresh clone to fix up those files, unless they've changed since the attributes file was added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:22:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 16:22:12 +0000 Subject: [issue22744] os.mkdir on Windows silently strips trailing blanks from directory names In-Reply-To: <1414433052.69.0.696616373755.issue22744@psf.upfronthosting.co.za> Message-ID: <1490372532.71.0.224161068568.issue22744@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:25:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 16:25:00 +0000 Subject: [issue10631] ZipFile and current directory change In-Reply-To: <1291567761.41.0.659026181219.issue10631@psf.upfronthosting.co.za> Message-ID: <1490372700.61.0.575137940376.issue10631@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- priority: normal -> low versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:26:23 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 16:26:23 +0000 Subject: [issue29892] change statement for open() is splited into two part in middle of sentence. In-Reply-To: <1490312778.71.0.779732227064.issue29892@psf.upfronthosting.co.za> Message-ID: <1490372783.62.0.903164679312.issue29892@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:29:34 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 16:29:34 +0000 Subject: [issue29884] faulthandler does not properly restore sigaltstack during teardown In-Reply-To: <1490247829.54.0.456330369246.issue29884@psf.upfronthosting.co.za> Message-ID: <1490372974.56.0.658125988465.issue29884@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: PR was merged and backported into 3.5 and 3.6, so I'm closing this. Thanks, Christophe :) ---------- nosy: +Mariatta resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:29:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 16:29:59 +0000 Subject: [issue18713] Clearly document the use of PYTHONIOENCODING to set surrogateescape In-Reply-To: <1376320774.07.0.703505392881.issue18713@psf.upfronthosting.co.za> Message-ID: <1490372999.64.0.582477264108.issue18713@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> duplicate status: open -> pending superseder: -> The documentation for the print function should explain/point to how to control the sys.stdout encoding _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:32:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 16:32:00 +0000 Subject: [issue6532] thread.get_ident() should return unsigned value In-Reply-To: <1248186325.01.0.817161707988.issue6532@psf.upfronthosting.co.za> Message-ID: <1490373120.45.0.232603023245.issue6532@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset aefa7ebf0ff0f73feee7ab24f4cdcb2014d83ee5 by Victor Stinner (Serhiy Storchaka) in branch 'master': bpo-6532: Make the thread id an unsigned integer. (#781) https://github.com/python/cpython/commit/aefa7ebf0ff0f73feee7ab24f4cdcb2014d83ee5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:33:43 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 16:33:43 +0000 Subject: [issue29728] Expose TCP_NOTSENT_LOWAT In-Reply-To: <1488740878.04.0.852546577047.issue29728@psf.upfronthosting.co.za> Message-ID: <1490373223.99.0.100073229753.issue29728@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 1e2147b9d75a64df370a9393c2b5b9d170dc0afd by Mariatta (Nathaniel J. Smith) in branch 'master': bpo-29728: Provide socket.TCP_NOTSENT_LOWAT (#477) https://github.com/python/cpython/commit/1e2147b9d75a64df370a9393c2b5b9d170dc0afd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:34:10 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 16:34:10 +0000 Subject: [issue28331] "CPython implementation detail:" removed when content translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1490373250.73.0.770471125168.issue28331@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 906118d8c68160ed4a3d15cec803d1ee57836517 by INADA Naoki in branch '3.6': bpo-28331: fix impl-detail label is removed when content is translated. (GH-769) https://github.com/python/cpython/commit/906118d8c68160ed4a3d15cec803d1ee57836517 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:34:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 16:34:15 +0000 Subject: [issue1117601] os.path.exists returns false negatives in MAC environments. Message-ID: <1490373255.85.0.327018760269.issue1117601@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 12:36:44 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 16:36:44 +0000 Subject: [issue29862] Fix grammar typo in importlib.reload() exception In-Reply-To: <1490036928.42.0.0658763709681.issue29862@psf.upfronthosting.co.za> Message-ID: <1490373404.81.0.622642857333.issue29862@psf.upfronthosting.co.za> Brett Cannon added the comment: Go for it, Mandeep! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 13:19:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 17:19:54 +0000 Subject: [issue25803] pathlib.Path('/').mkdir() raises wrong error type In-Reply-To: <1449287292.61.0.915471984931.issue25803@psf.upfronthosting.co.za> Message-ID: <1490375994.0.0.615849603902.issue25803@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +710 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 13:21:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 17:21:39 +0000 Subject: [issue25803] pathlib.Path('/').mkdir() raises wrong error type In-Reply-To: <1449287292.61.0.915471984931.issue25803@psf.upfronthosting.co.za> Message-ID: <1490376099.78.0.520509630315.issue25803@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I can't test on Windows and OSX but I suppose PR 805 fixes both issues. ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> patch review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 13:22:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 17:22:55 +0000 Subject: [issue6532] thread.get_ident() should return unsigned value In-Reply-To: <1248186325.01.0.817161707988.issue6532@psf.upfronthosting.co.za> Message-ID: <1490376175.09.0.996419485481.issue6532@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 13:45:07 2017 From: report at bugs.python.org (Olivier Vielpeau) Date: Fri, 24 Mar 2017 17:45:07 +0000 Subject: [issue29738] Fix memory leak in SSLSocket.getpeercert() In-Reply-To: <1488831011.78.0.556870534746.issue29738@psf.upfronthosting.co.za> Message-ID: <1490377507.78.0.00104279086727.issue29738@psf.upfronthosting.co.za> Olivier Vielpeau added the comment: I've attached the PR on Github and signed the CLA, is there anything else needed from me to get this reviewed? Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 13:45:12 2017 From: report at bugs.python.org (Armin Rigo) Date: Fri, 24 Mar 2017 17:45:12 +0000 Subject: [issue29694] race condition in pathlib mkdir with flags parents=True In-Reply-To: <1488462813.87.0.464471853988.issue29694@psf.upfronthosting.co.za> Message-ID: <1490377512.81.0.825592904627.issue29694@psf.upfronthosting.co.za> Armin Rigo added the comment: It's a mess to write a test, because the exact semantics of .mkdir() are not defined as far as I can tell. This patch is a best-effort attempt at making .mkdir() work in the presence of common parallel filesystem changes, that is, other processes that would create the same directories at the same time. This patch is by no means an attempt at being a complete solution for similar problems. The exact semantics have probably never been discussed at all. For example, what should occur if a parent directory is removed just after .mkdir() created it? I'm not suggesting to discuss these issues now, but to simply leave them open. I'm trying instead to explain why writing a test is a mess (more than "just" creating another thread and creating/removing directories very fast while the main thread calls .mkdir()), because we have no exact notion of what should work and what shouldn't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 14:17:04 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Fri, 24 Mar 2017 18:17:04 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490379424.36.0.371230639875.issue29888@psf.upfronthosting.co.za> Kinebuchi Tomohiko added the comment: According to the table on the Downloads page [1]_, relations between Python versions and version specific release pages are listed as follows: 2.7.0 -> https://www.python.org/download/releases/2.7/ 2.7.1 -> https://www.python.org/download/releases/2.7.1/ 2.7.2 -> https://www.python.org/download/releases/2.7.2/ 2.7.3 -> https://www.python.org/download/releases/2.7.3/ 2.7.4 -> https://www.python.org/download/releases/2.7.4/ 2.7.5 -> https://www.python.org/download/releases/2.7.5/ 2.7.6 -> https://www.python.org/download/releases/2.7.6/ 2.7.7 -> https://www.python.org/download/releases/2.7.7/ 2.7.8 -> https://www.python.org/downloads/release/python-278/ 2.7.9 -> https://www.python.org/downloads/release/python-279/ 2.7.10 -> https://www.python.org/downloads/release/python-2710/ 2.7.11 -> https://www.python.org/downloads/release/python-2711/ 2.7.12 -> https://www.python.org/downloads/release/python-2712/ 2.7.13 -> https://www.python.org/downloads/release/python-2713/ 3.0.0 -> https://www.python.org/download/releases/3.0/ 3.0.1 -> https://www.python.org/download/releases/3.0.1/ 3.1.0 -> https://www.python.org/download/releases/3.1/ 3.1.1 -> https://www.python.org/download/releases/3.1.1/ 3.1.2 -> https://www.python.org/download/releases/3.1.2/ 3.1.3 -> https://www.python.org/download/releases/3.1.3/ 3.1.4 -> https://www.python.org/download/releases/3.1.4/ 3.1.5 -> https://www.python.org/downloads/release/python-315/ 3.2.0 -> https://www.python.org/download/releases/3.2/ 3.2.1 -> https://www.python.org/download/releases/3.2.1/ 3.2.2 -> https://www.python.org/download/releases/3.2.2/ 3.2.3 -> https://www.python.org/download/releases/3.2.3/ 3.2.4 -> https://www.python.org/download/releases/3.2.4/ 3.2.5 -> https://www.python.org/download/releases/3.2.5/ 3.2.6 -> https://www.python.org/downloads/release/python-326/ 3.3.0 -> https://www.python.org/download/releases/3.3.0/ 3.3.1 -> https://www.python.org/download/releases/3.3.1/ 3.3.2 -> https://www.python.org/download/releases/3.3.2/ 3.3.3 -> https://www.python.org/download/releases/3.3.3/ 3.3.4 -> https://www.python.org/download/releases/3.3.4/ 3.3.5 -> https://www.python.org/download/releases/3.3.5/ 3.3.6 -> https://www.python.org/downloads/release/python-336/ 3.4.0 -> https://www.python.org/download/releases/3.4.0/ 3.4.1 -> https://www.python.org/downloads/release/python-341/ 3.4.2 -> https://www.python.org/downloads/release/python-342/ 3.4.3 -> https://www.python.org/downloads/release/python-343/ 3.4.4 -> https://www.python.org/downloads/release/python-344/ 3.4.5 -> https://www.python.org/downloads/release/python-345/ 3.4.6 -> https://www.python.org/downloads/release/python-346/ 3.5.0 -> https://www.python.org/downloads/release/python-350/ 3.5.1 -> https://www.python.org/downloads/release/python-351/ 3.5.2 -> https://www.python.org/downloads/release/python-352/ 3.5.3 -> https://www.python.org/downloads/release/python-353/ 3.6.0 -> https://www.python.org/downloads/release/python-360/ 3.6.1 -> https://www.python.org/downloads/release/python-361/ .. [1] https://www.python.org/downloads/ I will create a pull request for Python 2.7, 3.5 and 3.6. ---------- versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 14:33:26 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 18:33:26 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490380406.71.0.551105839937.issue29888@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for noticing this. The change in URLs was due to the introduction of the "new" python.org website a few years ago; the canonical form of the URL for releases introduced after the move to the new web site is indeed https://www.python.org/downloads/release/python-xyz/ so that should be the URL form used for current and future releases. Another approach would be to add aliases on the web site to redirect from /releases/x.y.z to /release/python-xyz/ but, at this point, I don't think that's necessary. A PR to fix the generated docs would be great. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 14:38:31 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 18:38:31 +0000 Subject: [issue29892] change statement for open() is splited into two part in middle of sentence. In-Reply-To: <1490312778.71.0.779732227064.issue29892@psf.upfronthosting.co.za> Message-ID: <1490380711.59.0.496911720794.issue29892@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- assignee: docs at python -> Mariatta nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 14:51:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 18:51:55 +0000 Subject: [issue25803] pathlib.Path('/').mkdir() raises wrong error type In-Reply-To: <1449287292.61.0.915471984931.issue25803@psf.upfronthosting.co.za> Message-ID: <1490381515.39.0.30628592598.issue25803@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset af7b9ec5c855366feef4c67dc492d64b3baf84ca by Serhiy Storchaka in branch 'master': bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) (#805) https://github.com/python/cpython/commit/af7b9ec5c855366feef4c67dc492d64b3baf84ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 15:00:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 19:00:24 +0000 Subject: [issue25803] pathlib.Path('/').mkdir() raises wrong error type In-Reply-To: <1449287292.61.0.915471984931.issue25803@psf.upfronthosting.co.za> Message-ID: <1490382024.38.0.0830153385097.issue25803@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +711 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 15:14:26 2017 From: report at bugs.python.org (Michael Seifert) Date: Fri, 24 Mar 2017 19:14:26 +0000 Subject: [issue29897] itertools.chain behaves strangly when copied with copy.copy Message-ID: <1490382866.15.0.806348806156.issue29897@psf.upfronthosting.co.za> New submission from Michael Seifert: When using `copy.copy` to copy an `itertools.chain` instance the results can be weird. For example >>> from itertools import chain >>> from copy import copy >>> a = chain([1,2,3], [4,5,6]) >>> b = copy(a) >>> next(a) # looks okay 1 >>> next(b) # jumps to the second iterable, not okay? 4 >>> tuple(a) (2, 3) >>> tuple(b) (5, 6) I don't really want to "copy.copy" such an iterator (I would either use `a, b = itertools.tee(a, 2)` or `b = a` depending on the use-case). This just came up because I investigated how pythons iterators behave when copied, deepcopied or pickled because I want to make the iterators in my extension module behave similarly. ---------- components: Library (Lib) messages: 290106 nosy: MSeifert priority: normal severity: normal status: open title: itertools.chain behaves strangly when copied with copy.copy type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 15:15:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 19:15:33 +0000 Subject: [issue25803] pathlib.Path('/').mkdir() raises wrong error type In-Reply-To: <1449287292.61.0.915471984931.issue25803@psf.upfronthosting.co.za> Message-ID: <1490382933.08.0.615770798163.issue25803@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 15:18:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 24 Mar 2017 19:18:34 +0000 Subject: [issue29838] Check that sq_length and mq_length return non-negative result In-Reply-To: <1489779592.24.0.829471920216.issue29838@psf.upfronthosting.co.za> Message-ID: <1490383114.53.0.983533157149.issue29838@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The changes appear consistent within themselves (ie, no apparent typos), and the one for builtin len appears to fix a bug that would allow negative length. Can tests be written in Python that fail without the patch? Or would mis-behaving classes have to be written in C? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 15:28:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 19:28:45 +0000 Subject: [issue29894] Deprecate returning a subclass of complex from __complex__ In-Reply-To: <1490344044.5.0.0943427930901.issue29894@psf.upfronthosting.co.za> Message-ID: <1490383725.47.0.823744186768.issue29894@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 671079ef6063fe227460a6c3114625fb6282bbd0 by Serhiy Storchaka in branch 'master': bpo-29894: Deprecate returning an instance of complex subclass from __complex__. (#798) https://github.com/python/cpython/commit/671079ef6063fe227460a6c3114625fb6282bbd0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 15:34:42 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 24 Mar 2017 19:34:42 +0000 Subject: [issue29839] Avoid raising OverflowError in len() when __len__() returns negative large value In-Reply-To: <1489780334.51.0.943711507872.issue29839@psf.upfronthosting.co.za> Message-ID: <1490384082.09.0.232619406078.issue29839@psf.upfronthosting.co.za> Terry J. Reedy added the comment: https://docs.python.org/3/library/functions.html#len * does not specify the exception. In such cases, we occasionally change exception in x.y.0 releases without prior notice other than News and What's New. Also, I think unnecessarily exposing a compile-switch dependent internal detail, as now, is almost a bug. So +1 to applying in 3.7 * The doc does not specify that 'length' cannot be non-negative. Perhaps it should, so no-one will think that they can hijack '__len__' to return something that is not a length, as usually understood. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 15:38:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 19:38:47 +0000 Subject: [issue29838] Check that sq_length and mq_length return non-negative result In-Reply-To: <1489779592.24.0.829471920216.issue29838@psf.upfronthosting.co.za> Message-ID: <1490384327.12.0.396978949699.issue29838@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Mis-behaving classes have to be written in C. If the __len__ method in Python class returns a negative value, ValueError is raised in slot_sq_length(). PySequence_GetItem() already contains an assertion that sq_length returns negative value only when an exception is set. The patch just extends this to other cases of calling sq_length and mq_length. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 15:44:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 19:44:17 +0000 Subject: [issue29838] Check that sq_length and mq_length return non-negative result In-Reply-To: <1489779592.24.0.829471920216.issue29838@psf.upfronthosting.co.za> Message-ID: <1490384657.4.0.763752266934.issue29838@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The alternate approach is raising SystemError rather than crashing in debug build on assertion. Since this check is used in exceptional case (when a raised exception is expected) it doesn't slow down working code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 15:46:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 19:46:27 +0000 Subject: [issue25803] pathlib.Path('/').mkdir() raises wrong error type In-Reply-To: <1449287292.61.0.915471984931.issue25803@psf.upfronthosting.co.za> Message-ID: <1490384787.29.0.0425655045109.issue25803@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8c8785b2f8e4048cef350f89c686266f4519b67c by Serhiy Storchaka in branch '3.6': bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True)? (#806) https://github.com/python/cpython/commit/8c8785b2f8e4048cef350f89c686266f4519b67c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 15:46:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 19:46:48 +0000 Subject: [issue25803] pathlib.Path('/').mkdir() raises wrong error type In-Reply-To: <1449287292.61.0.915471984931.issue25803@psf.upfronthosting.co.za> Message-ID: <1490384808.31.0.705831931469.issue25803@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1fc1f8d7f737f80a1ee5ea37b9781c0a790102b2 by Serhiy Storchaka in branch '3.5': bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) (#805) (#807) https://github.com/python/cpython/commit/1fc1f8d7f737f80a1ee5ea37b9781c0a790102b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 15:50:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 19:50:36 +0000 Subject: [issue25803] pathlib.Path('/').mkdir() raises wrong error type In-Reply-To: <1449287292.61.0.915471984931.issue25803@psf.upfronthosting.co.za> Message-ID: <1490385036.01.0.35682278338.issue25803@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:08:33 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 20:08:33 +0000 Subject: [issue29876] Check for null return value [_elementtree.c : subelement] In-Reply-To: <1490161944.61.0.295678924414.issue29876@psf.upfronthosting.co.za> Message-ID: <1490386113.87.0.6875887012.issue29876@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 9c0408d9b68d8f65aad22ca0767f154d6b9f526c by Xiang Zhang in branch '2.7': bpo-29876: fix DECREF for NULL value in subelement() (GH-760) https://github.com/python/cpython/commit/9c0408d9b68d8f65aad22ca0767f154d6b9f526c ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:09:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 20:09:04 +0000 Subject: [issue29864] Misuse of Py_SIZE in dict.fromkey() In-Reply-To: <1490076133.0.0.154466123244.issue29864@psf.upfronthosting.co.za> Message-ID: <1490386144.01.0.939675779271.issue29864@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset af839fe2fef12dbbc8083fc7f01daee48a85a916 by Serhiy Storchaka in branch '3.6': bpo-29864: Don't use Py_SIZE for dict object. (#747) (#750) https://github.com/python/cpython/commit/af839fe2fef12dbbc8083fc7f01daee48a85a916 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:09:15 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 20:09:15 +0000 Subject: [issue29874] Need a look for return value checking [selectmodule.c] In-Reply-To: <1490156056.24.0.758776369262.issue29874@psf.upfronthosting.co.za> Message-ID: <1490386155.9.0.805118928589.issue29874@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset e6a55dd8391651a7d3a97b6215e70e48e628d3d7 by Xiang Zhang in branch '2.7': bpo-29874: fix INCREF for possible NULL values in select_select() (GH-758) https://github.com/python/cpython/commit/e6a55dd8391651a7d3a97b6215e70e48e628d3d7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:09:24 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 20:09:24 +0000 Subject: [issue29873] Need a look for return value checking [_elementtree.c] In-Reply-To: <1490153975.41.0.412355658191.issue29873@psf.upfronthosting.co.za> Message-ID: <1490386164.22.0.769492570495.issue29873@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 827c78326aa850257ca40991b401b3db298c54fb by Xiang Zhang in branch '2.7': bpo-29873: fix INCREF for possible NULL value in element_getattr() (GH-757) https://github.com/python/cpython/commit/827c78326aa850257ca40991b401b3db298c54fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:09:32 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 20:09:32 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1490386172.8.0.492935817693.issue29719@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 0acdea79cba3883c5e7035c7336fb0ce54435c03 by Ned Deily (INADA Naoki) in branch '3.6': bpo-29719: Remove Date and Release field in whatsnew/3.6 (GH-500) https://github.com/python/cpython/commit/0acdea79cba3883c5e7035c7336fb0ce54435c03 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:09:32 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 20:09:32 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1490386172.95.0.683589935921.issue29723@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 75345c552d0889f4f63039d6063f371846c8f41f by Ned Deily (Nick Coghlan) in branch '3.6': [3.6] bpo-29723: Consistently configure sys.path[0] (#636) https://github.com/python/cpython/commit/75345c552d0889f4f63039d6063f371846c8f41f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:09:33 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 20:09:33 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1490386173.17.0.890449365764.issue29319@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 75345c552d0889f4f63039d6063f371846c8f41f by Ned Deily (Nick Coghlan) in branch '3.6': [3.6] bpo-29723: Consistently configure sys.path[0] (#636) https://github.com/python/cpython/commit/75345c552d0889f4f63039d6063f371846c8f41f ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:09:33 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 20:09:33 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490386173.41.0.638984544808.issue27593@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 8c18fbeed1c7721b67f1726a6e9c41acef823135 by Ned Deily in branch '3.6': bpo-27593: Revise git SCM build info. (#744) (#745) https://github.com/python/cpython/commit/8c18fbeed1c7721b67f1726a6e9c41acef823135 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:09:45 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 20:09:45 +0000 Subject: [issue29859] Return code of pthread_* in thread_pthread.h is not used for perror In-Reply-To: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za> Message-ID: <1490386185.91.0.887720044808.issue29859@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset fe30339534c602af1123e1402e44a1463f91f2e5 by INADA Naoki in branch '3.6': bpo-29859: Fix error messages from return codes for pthread_* calls (GH-753) https://github.com/python/cpython/commit/fe30339534c602af1123e1402e44a1463f91f2e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:10:11 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 20:10:11 +0000 Subject: [issue29859] Return code of pthread_* in thread_pthread.h is not used for perror In-Reply-To: <1490011699.61.0.174999793884.issue29859@psf.upfronthosting.co.za> Message-ID: <1490386211.37.0.561282812494.issue29859@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset d7fa6b259e00fca04dbf816bfcf4115fdda14bb7 by INADA Naoki (Daniel Birnstiel) in branch 'master': bpo-29859: Fix error messages from return codes for pthread_* calls (GH-741) https://github.com/python/cpython/commit/d7fa6b259e00fca04dbf816bfcf4115fdda14bb7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:10:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 20:10:26 +0000 Subject: [issue29865] Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types In-Reply-To: <1490077192.4.0.970659730607.issue29865@psf.upfronthosting.co.za> Message-ID: <1490386226.12.0.170681122111.issue29865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset fff9a31a91283c39c363af219e595eab7d4da6f7 by Serhiy Storchaka in branch 'master': bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. (#748) https://github.com/python/cpython/commit/fff9a31a91283c39c363af219e595eab7d4da6f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:17:13 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 20:17:13 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490386633.28.0.262704213626.issue27593@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset ed512cba78af211da4d83cbb7cc533c39176f374 by Ned Deily in branch '3.5': bpo-27593: Revise git SCM build info. (#744) (#746) https://github.com/python/cpython/commit/ed512cba78af211da4d83cbb7cc533c39176f374 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:17:20 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 20:17:20 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490386640.82.0.474989653022.issue27593@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset e9213d929d7b0075539e87416f6a6fb86c27454b by Ned Deily in branch '3.6': bpo-27593: Revise git SCM build info. (#744) (#745) https://github.com/python/cpython/commit/e9213d929d7b0075539e87416f6a6fb86c27454b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:17:30 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 20:17:30 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490386650.34.0.337782833117.issue27593@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 554626ada769abf82a5dabe6966afa4265acb6a6 by Ned Deily in branch 'master': bpo-27593: Revise git SCM build info. (#744) https://github.com/python/cpython/commit/554626ada769abf82a5dabe6966afa4265acb6a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:17:41 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 20:17:41 +0000 Subject: [issue29849] fix memory leak in import_from In-Reply-To: <1489863596.03.0.14582514818.issue29849@psf.upfronthosting.co.za> Message-ID: <1490386661.34.0.308039584446.issue29849@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 4830f581af57dd305c02c1fd72299ecb5b090eca by Xiang Zhang in branch 'master': bpo-29849: fix a memory leak in import_from (GH-712) https://github.com/python/cpython/commit/4830f581af57dd305c02c1fd72299ecb5b090eca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:18:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 20:18:15 +0000 Subject: [issue28876] bool of large range raises OverflowError In-Reply-To: <1480930662.45.0.497603219066.issue28876@psf.upfronthosting.co.za> Message-ID: <1490386695.67.0.164448235322.issue28876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4276068fe57e93b4c8d428f0b1cde8ca04b8fb99 by Serhiy Storchaka in branch '3.5': bpo-28876: bool of large range raises OverflowError (#699) (#735) https://github.com/python/cpython/commit/4276068fe57e93b4c8d428f0b1cde8ca04b8fb99 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:18:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 20:18:24 +0000 Subject: [issue28876] bool of large range raises OverflowError In-Reply-To: <1480930662.45.0.497603219066.issue28876@psf.upfronthosting.co.za> Message-ID: <1490386704.35.0.828940422085.issue28876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6fad4090ec9a27f8572bb00661b9890f01fb62f7 by Serhiy Storchaka in branch '3.6': bpo-28876: bool of large range raises OverflowError (#699) (#734) https://github.com/python/cpython/commit/6fad4090ec9a27f8572bb00661b9890f01fb62f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:18:34 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 24 Mar 2017 20:18:34 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1490386714.77.0.65668297275.issue20087@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset df8280838f52d6ec45ba03ef734b0dec8a9c43fb by Benjamin Peterson in branch 'master': bpo-20087: Revert "make the glibc alias table take precedence over the X11 one (#422)" (#713) https://github.com/python/cpython/commit/df8280838f52d6ec45ba03ef734b0dec8a9c43fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:18:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 20:18:43 +0000 Subject: [issue28876] bool of large range raises OverflowError In-Reply-To: <1480930662.45.0.497603219066.issue28876@psf.upfronthosting.co.za> Message-ID: <1490386723.34.0.264968627476.issue28876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e46fb8611867fa3b407a813f53137929b7cb4a10 by Serhiy Storchaka (4kir4) in branch 'master': bpo-28876: bool of large range raises OverflowError (#699) https://github.com/python/cpython/commit/e46fb8611867fa3b407a813f53137929b7cb4a10 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:18:51 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 20:18:51 +0000 Subject: [issue29856] curses online documentation typo In-Reply-To: <1489978351.51.0.185284735277.issue29856@psf.upfronthosting.co.za> Message-ID: <1490386731.63.0.633150493806.issue29856@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 7cc071c96b95e7422f64cb436d547c952e0ca52f by Mariatta in branch '3.5': bpo-29856: Fix typo in curses documentation (GH-730) (GH-732) https://github.com/python/cpython/commit/7cc071c96b95e7422f64cb436d547c952e0ca52f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:18:58 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 20:18:58 +0000 Subject: [issue29856] curses online documentation typo In-Reply-To: <1489978351.51.0.185284735277.issue29856@psf.upfronthosting.co.za> Message-ID: <1490386738.09.0.075655617221.issue29856@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 91f79db02acb9f82c738bb0b2f7bfc3260b90930 by Mariatta in branch '2.7': bpo-29856: Fix typo in curses documentation (GH-730) (GH-733) https://github.com/python/cpython/commit/91f79db02acb9f82c738bb0b2f7bfc3260b90930 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:19:04 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 20:19:04 +0000 Subject: [issue29856] curses online documentation typo In-Reply-To: <1489978351.51.0.185284735277.issue29856@psf.upfronthosting.co.za> Message-ID: <1490386744.75.0.949522415316.issue29856@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset d1f566f6bddc67e9870eaa75ae477208b9a199be by Mariatta in branch '3.6': bpo-29856: Fix typo in curses documentation (GH-730) (GH-731) https://github.com/python/cpython/commit/d1f566f6bddc67e9870eaa75ae477208b9a199be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:19:12 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 20:19:12 +0000 Subject: [issue29856] curses online documentation typo In-Reply-To: <1489978351.51.0.185284735277.issue29856@psf.upfronthosting.co.za> Message-ID: <1490386752.32.0.473183626195.issue29856@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 64508780d72769e4c7afc67a511c057261c578f6 by Mariatta in branch 'master': bpo-29856: Fix typo in curses documentation (GH-730) https://github.com/python/cpython/commit/64508780d72769e4c7afc67a511c057261c578f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:19:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 20:19:24 +0000 Subject: [issue25455] Some repr implementations don't check for self-referential structures In-Reply-To: <1445455038.6.0.824380060049.issue25455@psf.upfronthosting.co.za> Message-ID: <1490386764.65.0.548870920691.issue25455@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 08612ed6a91003cdba7617dee7787c26495c50d9 by Serhiy Storchaka in branch '3.5': bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. (#514) (#727) https://github.com/python/cpython/commit/08612ed6a91003cdba7617dee7787c26495c50d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:26:50 2017 From: report at bugs.python.org (paul j3) Date: Fri, 24 Mar 2017 20:26:50 +0000 Subject: [issue29553] Argparser does not display closing parentheses in nested mutex groups In-Reply-To: <1487084393.73.0.392893421751.issue29553@psf.upfronthosting.co.za> Message-ID: <1490387210.36.0.824539001646.issue29553@psf.upfronthosting.co.za> paul j3 added the comment: How would you rank this issue relative to other `argparse` ones? Currently I'm following 123 open issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:46:50 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 24 Mar 2017 20:46:50 +0000 Subject: [issue29841] errors raised by bytes() and bytearray() for invalid size argument In-Reply-To: <1489782795.95.0.350894370649.issue29841@psf.upfronthosting.co.za> Message-ID: <1490388410.76.0.773865078257.issue29841@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: errors raised by bytes and bytearray constructors for invalid size argument -> errors raised by bytes() and bytearray() for invalid size argument _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:47:05 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 24 Mar 2017 20:47:05 +0000 Subject: [issue29841] errors raised by bytes() and bytearray() for invalid size argument In-Reply-To: <1489782795.95.0.350894370649.issue29841@psf.upfronthosting.co.za> Message-ID: <1490388425.66.0.0195938345218.issue29841@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:49:53 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 24 Mar 2017 20:49:53 +0000 Subject: [issue29840] Avoid raising OverflowError in bool() In-Reply-To: <1489782446.56.0.355449112547.issue29840@psf.upfronthosting.co.za> Message-ID: <1490388593.49.0.730597412657.issue29840@psf.upfronthosting.co.za> Terry J. Reedy added the comment: https://docs.python.org/3/library/functions.html#bool refers to https://docs.python.org/3/library/stdtypes.html#truth The latter says that values are true ("All other values are considered true") unless one of certain conditions holds. For user-defined classes, the condition is that the class defines a __bool__() or __len__() method and that the first of those methods returns the bool False or integer zero. I easily interpret this as meaning that bool(x) (should) *always* return True or False. In particular, for user classes, any exception in user-coded __bool__ or __len__ (should be) included in "does not return integer zero or bool value False". This would mean that 'True' would truly be the default return for Bool(). There is currently an unstated exception for raised Exceptions. This issue proposes an exception to the exception for OverflowErrors (once negative lengths consistently raise ValueErrors and never OverflowErrors). While this sensible in itself, I am completely happy with the added complication. I would like to either reconsider the exception for Exceptions or make it explicit. Patch has new text and What's New entry. Added logic in object.c looks correct. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:49:57 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 24 Mar 2017 20:49:57 +0000 Subject: [issue29897] itertools.chain behaves strangly when copied with copy.copy In-Reply-To: <1490382866.15.0.806348806156.issue29897@psf.upfronthosting.co.za> Message-ID: <1490388597.58.0.209468041687.issue29897@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 16:59:18 2017 From: report at bugs.python.org (Brian Curtin) Date: Fri, 24 Mar 2017 20:59:18 +0000 Subject: [issue29553] Argparser does not display closing parentheses in nested mutex groups In-Reply-To: <1487084393.73.0.392893421751.issue29553@psf.upfronthosting.co.za> Message-ID: <1490389158.62.0.862635086687.issue29553@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 17:05:06 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 21:05:06 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1490389506.48.0.564153087454.issue28810@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 8f9e1bbf2dbdf46a0bf920279568a31460043376 by Brett Cannon (Ivan Levkivskyi) in branch 'master': bpo-28810: Document remaining bytecode changes in 3.6 (GH-651) https://github.com/python/cpython/commit/8f9e1bbf2dbdf46a0bf920279568a31460043376 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 17:06:17 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 21:06:17 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1490389577.18.0.735492155184.issue28810@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- pull_requests: +713 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 17:18:56 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 21:18:56 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1490390336.1.0.871985903284.issue28810@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 74bfcc314b188e1e8c90e442270e36d6510755ee by Brett Cannon in branch '3.6': bpo-28810: Document remaining bytecode changes in 3.6 (GH-651) (GH-808) https://github.com/python/cpython/commit/74bfcc314b188e1e8c90e442270e36d6510755ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 17:19:30 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 21:19:30 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1490390370.85.0.392618101904.issue28810@psf.upfronthosting.co.za> Brett Cannon added the comment: Is there anything left to do for this Ivan? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 17:19:37 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 24 Mar 2017 21:19:37 +0000 Subject: [issue29897] itertools.chain behaves strangly when copied with copy.copy In-Reply-To: <1490382866.15.0.806348806156.issue29897@psf.upfronthosting.co.za> Message-ID: <1490390377.08.0.380485200808.issue29897@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Humph, that is definitely not the expected result. The itertools copy/reduce support has been a never-ending source of bugs and headaches. It looks like the problem is that __reduce__ is returning the existing tuple iterator rather than a new one: >>> a = chain([1,2,3], [4,5,6]) >>> b = copy(a) >>> next(a) 1 >>> a.__reduce__() (, (), (, )) >>> b.__reduce__() (, (), (,)) ---------- nosy: +kristjan.jonsson, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 17:23:01 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 24 Mar 2017 21:23:01 +0000 Subject: [issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted In-Reply-To: <1487193679.14.0.35599130933.issue29573@psf.upfronthosting.co.za> Message-ID: <1490390581.92.0.790017371791.issue29573@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Deleting non-existent files in /tmp is an indicator > of a security hole. Christian, what is your take on this? ---------- nosy: +christian.heimes, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 17:27:05 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 24 Mar 2017 21:27:05 +0000 Subject: [issue29838] Check that sq_length and mq_length return non-negative result In-Reply-To: <1489779592.24.0.829471920216.issue29838@psf.upfronthosting.co.za> Message-ID: <1490390825.79.0.719081343651.issue29838@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Please don't add more code to critical paths. There is no demonstrated need for an additional check here. The current code has worked well for millions of users for many years. Also, there are too many checks in common paths and some of them are redundant. We need less of this, not more. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 17:30:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 21:30:17 +0000 Subject: [issue29897] itertools.chain behaves strangly when copied with copy.copy In-Reply-To: <1490382866.15.0.806348806156.issue29897@psf.upfronthosting.co.za> Message-ID: <1490391017.41.0.168034820978.issue29897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: chain(x) is a shortcut for chain.from_iterable(iter(x)). Neither copy.copy() nor __reduce__ don't have particular relation to this. Consider following example: >>> from itertools import chain >>> i = iter([[1, 2, 3], [4, 5, 6]]) >>> a = chain.from_iterable(i) >>> b = chain.from_iterable(i) >>> next(a) 1 >>> next(b) 4 >>> tuple(a) (2, 3) >>> tuple(b) (5, 6) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 17:32:35 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 24 Mar 2017 21:32:35 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1490391155.35.0.548085927827.issue28810@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Thanks Brett! I think this could be closed now. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 17:38:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 21:38:38 +0000 Subject: [issue29838] Check that sq_length and mq_length return non-negative result In-Reply-To: <1489779592.24.0.829471920216.issue29838@psf.upfronthosting.co.za> Message-ID: <1490391518.21.0.768237146246.issue29838@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: assert() is no-op in release build and that are not critical parts. Actually the patch decreases the number of checks in release build. Runtime check PyErr_Occurred() is moved into assert() in builtin_len(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 17:54:26 2017 From: report at bugs.python.org (Pedro) Date: Fri, 24 Mar 2017 21:54:26 +0000 Subject: [issue29632] argparse values for action in add_argument() should be flags instead of (or in addition to) strings In-Reply-To: <1487856667.94.0.619514979386.issue29632@psf.upfronthosting.co.za> Message-ID: <1490392466.52.0.668619511344.issue29632@psf.upfronthosting.co.za> Pedro added the comment: I guess I'm a little allergic to magic strings. I think there is value in greater consistency across modules, but agree it's not a big deal because the Action classes are already accessible that way. I was unaware of the details behind `action` and actually just found an opportunity to use an Action subclass, so thank you for clarifying. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 17:55:01 2017 From: report at bugs.python.org (Pedro) Date: Fri, 24 Mar 2017 21:55:01 +0000 Subject: [issue29632] argparse values for action in add_argument() should be flags instead of (or in addition to) strings In-Reply-To: <1487856667.94.0.619514979386.issue29632@psf.upfronthosting.co.za> Message-ID: <1490392501.08.0.562484945542.issue29632@psf.upfronthosting.co.za> Changes by Pedro : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:03:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 24 Mar 2017 22:03:38 +0000 Subject: [issue29883] asyncio: Windows Proactor Event Loop UDP Support In-Reply-To: <1490210881.18.0.553215827239.issue29883@psf.upfronthosting.co.za> Message-ID: <1490393018.3.0.589449051341.issue29883@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> test needed versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:05:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:05:07 +0000 Subject: [issue29845] Mark tests that use _testcapi as CPython-only In-Reply-To: <1489845141.37.0.776933976205.issue29845@psf.upfronthosting.co.za> Message-ID: <1490393107.22.0.334922358501.issue29845@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bb67f10179011c50805a942cb6f2701c84854888 by Serhiy Storchaka in branch '3.5': bpo-29845: Mark tests that use _testcapi as CPython-only (#711) (#726) https://github.com/python/cpython/commit/bb67f10179011c50805a942cb6f2701c84854888 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:05:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:05:24 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1490393124.6.0.149150972902.issue29116@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2c5b2c3832d4d2af7b60333a5a8f73dd51ef6245 by Serhiy Storchaka in branch '3.5': bpo-29116: Fix error messages for concatenating bytes and bytearray with unsupported type. (#709) (#724) https://github.com/python/cpython/commit/2c5b2c3832d4d2af7b60333a5a8f73dd51ef6245 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:05:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:05:31 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1490393131.74.0.0282609049842.issue29116@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3d258b1eb453bcbc412d6b252f5bdceae0303f07 by Serhiy Storchaka in branch '3.6': bpo-29116: Fix error messages for concatenating bytes and bytearray with unsupported type. (#709) (#723) https://github.com/python/cpython/commit/3d258b1eb453bcbc412d6b252f5bdceae0303f07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:05:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:05:48 +0000 Subject: [issue29845] Mark tests that use _testcapi as CPython-only In-Reply-To: <1489845141.37.0.776933976205.issue29845@psf.upfronthosting.co.za> Message-ID: <1490393148.09.0.857060225392.issue29845@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset da88596a19d2cad0e85a2b3c3290b5b1d97a793d by Serhiy Storchaka in branch '3.6': bpo-29845: Mark tests that use _testcapi as CPython-only (#711) (#725) https://github.com/python/cpython/commit/da88596a19d2cad0e85a2b3c3290b5b1d97a793d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:06:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:06:03 +0000 Subject: [issue25455] Some repr implementations don't check for self-referential structures In-Reply-To: <1445455038.6.0.824380060049.issue25455@psf.upfronthosting.co.za> Message-ID: <1490393163.35.0.469001068514.issue25455@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset fca705d533970011e50b3f278aab81cead39b00d by Serhiy Storchaka in branch '3.6': bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. (#514) (#722) https://github.com/python/cpython/commit/fca705d533970011e50b3f278aab81cead39b00d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:06:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:06:17 +0000 Subject: [issue28749] Fixed the documentation of the mapping codec APIs In-Reply-To: <1479637798.25.0.994184606714.issue28749@psf.upfronthosting.co.za> Message-ID: <1490393177.77.0.0898044098095.issue28749@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 88b32eb7b317dd7c7943433f980e17e34e50f8f8 by Serhiy Storchaka in branch '3.5': bpo-28749: Fixed the documentation of the mapping codec APIs. (#487) (#715) https://github.com/python/cpython/commit/88b32eb7b317dd7c7943433f980e17e34e50f8f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:06:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:06:26 +0000 Subject: [issue28749] Fixed the documentation of the mapping codec APIs In-Reply-To: <1479637798.25.0.994184606714.issue28749@psf.upfronthosting.co.za> Message-ID: <1490393186.3.0.981465689929.issue28749@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 69eab3123ed1de4bed4b7dedecabe415f6139bb6 by Serhiy Storchaka in branch '3.6': bpo-28749: Fixed the documentation of the mapping codec APIs. (#487) (#714) https://github.com/python/cpython/commit/69eab3123ed1de4bed4b7dedecabe415f6139bb6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:06:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:06:37 +0000 Subject: [issue29845] Mark tests that use _testcapi as CPython-only In-Reply-To: <1489845141.37.0.776933976205.issue29845@psf.upfronthosting.co.za> Message-ID: <1490393197.39.0.765874556159.issue29845@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 24c738a9e91b8f46da6166663d8ce7ec18cec784 by Serhiy Storchaka in branch 'master': bpo-29845: Mark tests that use _testcapi as CPython-only (#711) https://github.com/python/cpython/commit/24c738a9e91b8f46da6166663d8ce7ec18cec784 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:06:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:06:51 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1490393211.73.0.109240467236.issue29116@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae by Serhiy Storchaka in branch 'master': bpo-29116: Fix error messages for concatenating bytes and bytearray with unsupported type. (#709) https://github.com/python/cpython/commit/6b5a9ec4788770c652bac3bf5d5a0a3b710b82ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:07:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:07:04 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1490393224.77.0.403856252006.issue29116@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 004e03fb0c2febe2ec8afbd28ffcb3e980c63228 by Serhiy Storchaka in branch 'master': bpo-29116: Improve error message for concatenating str with non-str. (#710) https://github.com/python/cpython/commit/004e03fb0c2febe2ec8afbd28ffcb3e980c63228 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:07:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:07:12 +0000 Subject: [issue29748] Argument Clinic: slice index converter In-Reply-To: <1488892007.86.0.01356022303.issue29748@psf.upfronthosting.co.za> Message-ID: <1490393232.77.0.764036344663.issue29748@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 80ec8364f15857c405ef0ecb1e758c8fc6b332f7 by Serhiy Storchaka in branch 'master': bpo-29748: Added the slice index converter in Argument Clinic. (#549) https://github.com/python/cpython/commit/80ec8364f15857c405ef0ecb1e758c8fc6b332f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:08:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:08:12 +0000 Subject: [issue25455] Some repr implementations don't check for self-referential structures In-Reply-To: <1445455038.6.0.824380060049.issue25455@psf.upfronthosting.co.za> Message-ID: <1490393292.84.0.740897192624.issue25455@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a5af6e1af77ee0f9294c5776478a9c24d9fbab94 by Serhiy Storchaka in branch 'master': bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. (#514) https://github.com/python/cpython/commit/a5af6e1af77ee0f9294c5776478a9c24d9fbab94 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:08:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:08:44 +0000 Subject: [issue29793] Convert some builtin types constructors to Argument Clinic In-Reply-To: <1489239993.83.0.329707117156.issue29793@psf.upfronthosting.co.za> Message-ID: <1490393324.63.0.129863763684.issue29793@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 18b250f844bf8b2d1a81c2d2dcc74e850364fe35 by Serhiy Storchaka in branch 'master': bpo-29793: Convert some builtin types constructors to Argument Clinic. (#615) https://github.com/python/cpython/commit/18b250f844bf8b2d1a81c2d2dcc74e850364fe35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:08:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:08:52 +0000 Subject: [issue20186] Derby #18: Convert 31 sites to Argument Clinic across 23 files In-Reply-To: <1389140586.13.0.921060348978.issue20186@psf.upfronthosting.co.za> Message-ID: <1490393332.5.0.339256948624.issue20186@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0b5615926a573c19c887a701a2f7047f4fd06de6 by Serhiy Storchaka in branch 'master': bpo-20186: Convert tuple object implementation to Argument Clinic. (#614) https://github.com/python/cpython/commit/0b5615926a573c19c887a701a2f7047f4fd06de6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:08:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:08:59 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1490393339.75.0.944557926095.issue20185@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5c643a028ee86c613d7168ca5bcb8fc94477a09e by Serhiy Storchaka in branch 'master': bpo-20185: Convert typeobject.c to Argument Clinic. (#544) https://github.com/python/cpython/commit/5c643a028ee86c613d7168ca5bcb8fc94477a09e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:09:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:09:17 +0000 Subject: [issue29776] Modernize properties In-Reply-To: <1489079402.47.0.435152463031.issue29776@psf.upfronthosting.co.za> Message-ID: <1490393357.12.0.0699939969551.issue29776@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bdf6b910f9ea75609caee498a975af03b6d23f67 by Serhiy Storchaka in branch 'master': bpo-29776: Use decorator syntax for properties. (#585) https://github.com/python/cpython/commit/bdf6b910f9ea75609caee498a975af03b6d23f67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:09:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:09:27 +0000 Subject: [issue28749] Fixed the documentation of the mapping codec APIs In-Reply-To: <1479637798.25.0.994184606714.issue28749@psf.upfronthosting.co.za> Message-ID: <1490393367.01.0.866439254004.issue28749@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c85a26628ceb9624c96c3064e8b99033c026d8a3 by Serhiy Storchaka in branch 'master': bpo-28749: Fixed the documentation of the mapping codec APIs. (#487) https://github.com/python/cpython/commit/c85a26628ceb9624c96c3064e8b99033c026d8a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:12:02 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 22:12:02 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1490393522.18.0.765787433719.issue27200@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 909a6f626ff343937cd3f06fda996870e7890724 by Berker Peksag (Marco Buttu) in branch 'master': bpo-27200: Fix doctests in programming.rst and datetime.rst (#401) https://github.com/python/cpython/commit/909a6f626ff343937cd3f06fda996870e7890724 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:12:26 2017 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 24 Mar 2017 22:12:26 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1490393546.71.0.388313645765.issue29808@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset e59af55c28b657cdf57c71a7b0837c9e9f4b2a31 by Vinay Sajip in branch '3.5': bpo-29808: Do not fail in SysLogHandler constructor if syslog isn't available. (#695) https://github.com/python/cpython/commit/e59af55c28b657cdf57c71a7b0837c9e9f4b2a31 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:12:34 2017 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 24 Mar 2017 22:12:34 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1490393554.17.0.476952006679.issue29808@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset 46e81d3345b979f835740a228857906dca0f59c0 by Vinay Sajip in branch '3.6': bpo-29808: Do not fail in SysLogHandler constructor if syslog isn't available. (#696) https://github.com/python/cpython/commit/46e81d3345b979f835740a228857906dca0f59c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:13:27 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 22:13:27 +0000 Subject: [issue29836] Remove nturl2path from test_sundry and amend its docstring In-Reply-To: <1489764926.92.0.485440810457.issue29836@psf.upfronthosting.co.za> Message-ID: <1490393607.43.0.664844126844.issue29836@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset cb5297a9e6b51c736ab8564b1a123577ba0dd2ad by Brett Cannon (Jim Fasarakis-Hilliard) in branch 'master': bpo-29836: Remove nturl2path from test_sundry and amend the module docstring (GH-694) https://github.com/python/cpython/commit/cb5297a9e6b51c736ab8564b1a123577ba0dd2ad ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:13:40 2017 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 24 Mar 2017 22:13:40 +0000 Subject: [issue29808] SyslogHandler: should not raise exception in constructor if connection fails In-Reply-To: <1489484201.47.0.147684605376.issue29808@psf.upfronthosting.co.za> Message-ID: <1490393620.39.0.620823336491.issue29808@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset 1b038e073807ecb6fd176edaf3386a8e3205416e by Vinay Sajip (????????? ????) in branch 'master': bpo-29808: SysLogHandler: Do not fail if initial connect to syslog failed (#663) (#663) https://github.com/python/cpython/commit/1b038e073807ecb6fd176edaf3386a8e3205416e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:14:12 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 22:14:12 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1490393652.35.0.40681780817.issue16355@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 948171bf999cf8b3e12048851041d2e04ae3a78c by Berker Peksag in branch '3.6': bpo-16355: Clarify when inspect.getcomments() returns None (#428) (#690) https://github.com/python/cpython/commit/948171bf999cf8b3e12048851041d2e04ae3a78c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:14:19 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 22:14:19 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1490393659.72.0.0580468346466.issue16355@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 41b4a2189f29daae008e57f799a30890643d191f by Berker Peksag in branch '3.5': bpo-16355: Clarify when inspect.getcomments() returns None (#428) (#691) https://github.com/python/cpython/commit/41b4a2189f29daae008e57f799a30890643d191f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:15:43 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 22:15:43 +0000 Subject: [issue16355] inspect.getcomments() does not work in the interactive shell In-Reply-To: <1351511930.82.0.59071323276.issue16355@psf.upfronthosting.co.za> Message-ID: <1490393743.1.0.0618324437986.issue16355@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 3f2155ffe683080f2a1b28408fa48d43ba92f943 by Berker Peksag (Marco Buttu) in branch 'master': bpo-16355: Clarify when inspect.getcomments() returns None (#428) https://github.com/python/cpython/commit/3f2155ffe683080f2a1b28408fa48d43ba92f943 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:17:20 2017 From: report at bugs.python.org (Harmandeep Singh) Date: Fri, 24 Mar 2017 22:17:20 +0000 Subject: [issue29862] Fix grammar typo in importlib.reload() exception In-Reply-To: <1490036928.42.0.0658763709681.issue29862@psf.upfronthosting.co.za> Message-ID: <1490393840.91.0.269706756816.issue29862@psf.upfronthosting.co.za> Changes by Harmandeep Singh : ---------- pull_requests: +714 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:17:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 24 Mar 2017 22:17:41 +0000 Subject: [issue29887] test_normalization doesn't work In-Reply-To: <1490288230.58.0.523545383484.issue29887@psf.upfronthosting.co.za> Message-ID: <1490393861.16.0.766725778273.issue29887@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Fetching the file requires '-u urlfetch' or '-u all'. For me, the test 'works' by skipping test_main. Loading www.pythontest.net refers one to https://github.com/python/pythontestdotnet/. Pinging contributors there. ---------- nosy: +benjamin.peterson, berker.peksag, brett.cannon, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:17:55 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:17:55 +0000 Subject: [issue29820] Broken link to "GUI Programming with Python: QT Edition" book In-Reply-To: <1489591760.97.0.349566849467.issue29820@psf.upfronthosting.co.za> Message-ID: <1490393875.24.0.558945599109.issue29820@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 3fce38c540681a736b7e5ca7611758f7bc159c9e by Mariatta in branch '3.6': bpo-29820: othergui.rst: Remove outdated information (GH-685) (GH-688) https://github.com/python/cpython/commit/3fce38c540681a736b7e5ca7611758f7bc159c9e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:18:00 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:18:00 +0000 Subject: [issue29820] Broken link to "GUI Programming with Python: QT Edition" book In-Reply-To: <1489591760.97.0.349566849467.issue29820@psf.upfronthosting.co.za> Message-ID: <1490393880.7.0.812080781873.issue29820@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 091d90f9a429b81b046cb83582062941f8ded9da by Mariatta in branch '3.5': bpo-29820: othergui.rst: Remove outdated information (GH-685) (GH-689) https://github.com/python/cpython/commit/091d90f9a429b81b046cb83582062941f8ded9da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:18:08 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:18:08 +0000 Subject: [issue29820] Broken link to "GUI Programming with Python: QT Edition" book In-Reply-To: <1489591760.97.0.349566849467.issue29820@psf.upfronthosting.co.za> Message-ID: <1490393888.78.0.56888411982.issue29820@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 1bb0f3762ec5104014aeed0ae6e9d64598d8fcac by Mariatta (Marco Buttu) in branch 'master': bpo-29820: othergui.rst: Remove outdated information (GH-685) https://github.com/python/cpython/commit/1bb0f3762ec5104014aeed0ae6e9d64598d8fcac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:18:28 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 24 Mar 2017 22:18:28 +0000 Subject: [issue29581] __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta) In-Reply-To: <1487271247.7.0.447487107459.issue29581@psf.upfronthosting.co.za> Message-ID: <1490393908.75.0.935599464882.issue29581@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset bd583ef9857d99f9145ad0bb2c4424cc0baa63fc by ?ukasz Langa (Nate) in branch 'master': bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (#527) https://github.com/python/cpython/commit/bd583ef9857d99f9145ad0bb2c4424cc0baa63fc ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:18:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:18:49 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1490393929.02.0.126519220116.issue29800@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0641ada9b78b6a06f539d4bde42c1ad1b90579a7 by Serhiy Storchaka (Michael Seifert) in branch '3.5': bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords are not strings (#649) (#672) https://github.com/python/cpython/commit/0641ada9b78b6a06f539d4bde42c1ad1b90579a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:18:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:18:58 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1490393938.84.0.564955296262.issue29800@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 53b2667dcf2a7d13af466a5fb91844f5125a920d by Serhiy Storchaka (Michael Seifert) in branch '3.6': bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords are not strings (#649) (#671) https://github.com/python/cpython/commit/53b2667dcf2a7d13af466a5fb91844f5125a920d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:19:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:19:14 +0000 Subject: [issue29800] functools.partial segfaults in repr when keywords attribute is abused In-Reply-To: <1489353014.2.0.721319606303.issue29800@psf.upfronthosting.co.za> Message-ID: <1490393954.57.0.270343363014.issue29800@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6c3d5274687c97f9c13800ad50e73e15b54f629d by Serhiy Storchaka (Michael Seifert) in branch 'master': bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords are not strings (#649) https://github.com/python/cpython/commit/6c3d5274687c97f9c13800ad50e73e15b54f629d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:19:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 22:19:27 +0000 Subject: [issue29735] Optimize functools.partial() for positional arguments In-Reply-To: <1488806566.01.0.913410050089.issue29735@psf.upfronthosting.co.za> Message-ID: <1490393967.06.0.637256932145.issue29735@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0f7b0b397e12514ee213bc727c9939b66585cbe2 by Victor Stinner in branch 'master': bpo-29735: Optimize partial_call(): avoid tuple (#516) https://github.com/python/cpython/commit/0f7b0b397e12514ee213bc727c9939b66585cbe2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:19:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:19:36 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1490393976.68.0.933742973979.issue28810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9135275cba680902e6caf29461f0423dc570190d by Serhiy Storchaka (Ivan Levkivskyi) in branch 'master': bpo-28810: Update lnotab_notes.txt (#665) https://github.com/python/cpython/commit/9135275cba680902e6caf29461f0423dc570190d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:19:52 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 22:19:52 +0000 Subject: [issue29592] abs_paths() in site.py is slow In-Reply-To: <1487348382.21.0.191353478088.issue29592@psf.upfronthosting.co.za> Message-ID: <1490393992.95.0.0960843435412.issue29592@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 2e4e011795d26cab1a3843383d0539c12fea2458 by INADA Naoki in branch 'master': bpo-29592: site: skip abs_paths() when it's redundant (GH-167) https://github.com/python/cpython/commit/2e4e011795d26cab1a3843383d0539c12fea2458 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:20:08 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 22:20:08 +0000 Subject: [issue29548] Recommend PyObject_Call* APIs over PyEval_Call*() APIs In-Reply-To: <1487007412.2.0.380189857134.issue29548@psf.upfronthosting.co.za> Message-ID: <1490394008.3.0.554281516436.issue29548@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset aa289a59ff6398110e1122877c073c9354ee53db by INADA Naoki in branch 'master': bpo-29548: Recommend PyObject_Call APIs over PyEval_Call APIs. (GH-75) https://github.com/python/cpython/commit/aa289a59ff6398110e1122877c073c9354ee53db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:20:14 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:20:14 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1490394014.97.0.0946494003095.issue28856@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset faa2cc63e45bc7d7ffab84bebe5a9f4fe065bd96 by Xiang Zhang in branch '3.6': bpo-28856: Let %b format for bytes support objects that follow the buffer protocol (GH-664) https://github.com/python/cpython/commit/faa2cc63e45bc7d7ffab84bebe5a9f4fe065bd96 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:20:23 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:20:23 +0000 Subject: [issue28856] %b format for bytes does not support objects that follow the buffer protocol In-Reply-To: <1480645844.32.0.506545914898.issue28856@psf.upfronthosting.co.za> Message-ID: <1490394023.36.0.940097063731.issue28856@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 7e2a54cdd977078b40b82182e46b201f8163f659 by Xiang Zhang in branch 'master': bpo-28856: Let %b format for bytes support objects that follow the buffer protocol (GH-546) https://github.com/python/cpython/commit/7e2a54cdd977078b40b82182e46b201f8163f659 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:20:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:20:37 +0000 Subject: [issue27880] cPickle fails on large objects (still - 2011 and counting) In-Reply-To: <1472325384.28.0.119216785398.issue27880@psf.upfronthosting.co.za> Message-ID: <1490394037.74.0.512006506596.issue27880@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1aa1803b3df2af9481628b8896babbd686d314ff by Serhiy Storchaka in branch '2.7': bpo-27880: Fixed integer overflow in cPickle when pickle large strings or (#662) https://github.com/python/cpython/commit/1aa1803b3df2af9481628b8896babbd686d314ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:20:59 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:20:59 +0000 Subject: [issue29756] Improve documentation for list methods that compare items by equality In-Reply-To: <1488981833.28.0.455455965624.issue29756@psf.upfronthosting.co.za> Message-ID: <1490394058.99.0.655887872355.issue29756@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset b2d77175d1317494b4238b4e07426d310fbf1d19 by Xiang Zhang in branch 'master': bpo-29756: Improve documentation for list methods that compare items by equality (GH-572) https://github.com/python/cpython/commit/b2d77175d1317494b4238b4e07426d310fbf1d19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:21:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:21:13 +0000 Subject: [issue29730] unoptimal calls to PyNumber_Check In-Reply-To: <1488755478.86.0.364261574579.issue29730@psf.upfronthosting.co.za> Message-ID: <1490394073.21.0.039079317571.issue29730@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 004251059b9c5e48d47cb30b94bcb92cb44d3adf by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-29730: replace some calls to PyNumber_Check and improve some error messages (#650) https://github.com/python/cpython/commit/004251059b9c5e48d47cb30b94bcb92cb44d3adf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:21:21 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 24 Mar 2017 22:21:21 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1490394081.4.0.422030052864.issue29742@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset db522dc86294a99f46a63cd5b54c7c4ab8017c96 by Yury Selivanov in branch '3.5': bpo-29742: asyncio get_extra_info() throws exception (#525) (#646) https://github.com/python/cpython/commit/db522dc86294a99f46a63cd5b54c7c4ab8017c96 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:21:26 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 24 Mar 2017 22:21:26 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1490394086.48.0.528722654843.issue29742@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 99f8d33a94c8951fd6b2d5f079d20be698150993 by Yury Selivanov in branch '3.6': bpo-29742: asyncio get_extra_info() throws exception (#525) (#645) https://github.com/python/cpython/commit/99f8d33a94c8951fd6b2d5f079d20be698150993 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:21:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 24 Mar 2017 22:21:27 +0000 Subject: [issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation In-Reply-To: <1490306388.92.0.69250411121.issue29890@psf.upfronthosting.co.za> Message-ID: <1490394087.32.0.442069372038.issue29890@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +pmoody _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:21:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:21:37 +0000 Subject: [issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None In-Reply-To: <1269807316.51.0.487538621224.issue8256@psf.upfronthosting.co.za> Message-ID: <1490394097.12.0.160464030618.issue8256@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a16894ebf8823f0e09036aacde9288c00e8d9058 by Serhiy Storchaka in branch '3.5': [3.5] bpo-8256: Fixed possible failing or crashing input() (#642) https://github.com/python/cpython/commit/a16894ebf8823f0e09036aacde9288c00e8d9058 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:21:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:21:44 +0000 Subject: [issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None In-Reply-To: <1269807316.51.0.487538621224.issue8256@psf.upfronthosting.co.za> Message-ID: <1490394104.29.0.502484979566.issue8256@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset aac875fa2f03cab61ceeaa2621c4c5534c7bcfc2 by Serhiy Storchaka in branch '3.6': [3.6] bpo-8256: Fixed possible failing or crashing input() (#641) https://github.com/python/cpython/commit/aac875fa2f03cab61ceeaa2621c4c5534c7bcfc2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:21:52 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 24 Mar 2017 22:21:52 +0000 Subject: [issue29742] asyncio get_extra_info() throws exception In-Reply-To: <1488839743.56.0.670449147303.issue29742@psf.upfronthosting.co.za> Message-ID: <1490394112.72.0.774208214209.issue29742@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 2b27e2e6a35c3d3e369612b984017fe0d1bfcf0c by Yury Selivanov (Nikolay Kim) in branch 'master': bpo-29742: asyncio get_extra_info() throws exception (#525) https://github.com/python/cpython/commit/2b27e2e6a35c3d3e369612b984017fe0d1bfcf0c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:22:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:22:11 +0000 Subject: [issue28667] FD_SETSIZE is unsigned on FreeBSD In-Reply-To: <1478872990.6.0.256289601446.issue28667@psf.upfronthosting.co.za> Message-ID: <1490394131.43.0.0490372877933.issue28667@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 783d0c1a1c723733adcdf4249240246fc35a5bcb by Serhiy Storchaka in branch 'master': bpo-28667: Fix a compile warning on FreeBSD when compare with FD_SETSIZE. (#501) https://github.com/python/cpython/commit/783d0c1a1c723733adcdf4249240246fc35a5bcb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:22:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:22:25 +0000 Subject: [issue15695] Correct __sizeof__ support for StgDict In-Reply-To: <1345144416.71.0.984691068113.issue15695@psf.upfronthosting.co.za> Message-ID: <1490394145.85.0.343324691171.issue15695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bc44f045e6a801903bd7530a4fc5474e657832da by Serhiy Storchaka in branch 'master': bpo-15695: Add PyAPI_FUNC() to _PyDict_SizeOf() declaration. (#639) https://github.com/python/cpython/commit/bc44f045e6a801903bd7530a4fc5474e657832da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:22:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:22:53 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1490394173.66.0.487667745457.issue26121@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4125e5c60e24ffcff8031817dc60984335917f59 by Serhiy Storchaka in branch 'master': bpo-26121: Revert to using the own implementations of lgamma and gamma on all platforms. (#637) https://github.com/python/cpython/commit/4125e5c60e24ffcff8031817dc60984335917f59 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:23:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:23:04 +0000 Subject: [issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None In-Reply-To: <1269807316.51.0.487538621224.issue8256@psf.upfronthosting.co.za> Message-ID: <1490394184.16.0.284319948465.issue8256@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c2cf12857187aa147c268651f10acd6da2c9cb74 by Serhiy Storchaka in branch 'master': bpo-8256: Fixed possible failing or crashing input() (#517) https://github.com/python/cpython/commit/c2cf12857187aa147c268651f10acd6da2c9cb74 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:23:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:23:16 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1490394196.28.0.402038655633.issue26121@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4dadcd4ed7824c7904add78577e6a05864cfe493 by Serhiy Storchaka in branch 'master': bpo-26121: Use C library implementation for math functions erf() and erfc() on Windows. (#632) https://github.com/python/cpython/commit/4dadcd4ed7824c7904add78577e6a05864cfe493 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:23:31 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:23:31 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1490394211.08.0.091372414558.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset c60948464fb0ec116ea227f6bce8a4bb8fb75257 by Nick Coghlan in branch '3.6': [3.6] bpo-29723: Consistently configure sys.path[0] (#636) https://github.com/python/cpython/commit/c60948464fb0ec116ea227f6bce8a4bb8fb75257 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:23:31 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:23:31 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1490394211.19.0.855968597494.issue29319@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset c60948464fb0ec116ea227f6bce8a4bb8fb75257 by Nick Coghlan in branch '3.6': [3.6] bpo-29723: Consistently configure sys.path[0] (#636) https://github.com/python/cpython/commit/c60948464fb0ec116ea227f6bce8a4bb8fb75257 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:23:36 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:23:36 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1490394216.68.0.469240018125.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 27abb0e533a6f7ad195bd56b064c32164296a56e by Nick Coghlan in branch 'master': bpo-29723: Add missing NEWS entry (#638) https://github.com/python/cpython/commit/27abb0e533a6f7ad195bd56b064c32164296a56e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:23:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:23:46 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1490394226.57.0.225849964834.issue20185@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1989763f0d0858ce6274f5e1d725b5b8da91a780 by Serhiy Storchaka in branch 'master': bpo-20185: Convert the resource moduel to Argument Clinic. (#545) https://github.com/python/cpython/commit/1989763f0d0858ce6274f5e1d725b5b8da91a780 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:24:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:24:01 +0000 Subject: [issue28692] gettext: deprecate selecting plural form by fractional numbers In-Reply-To: <1479148679.54.0.229445108959.issue28692@psf.upfronthosting.co.za> Message-ID: <1490394241.4.0.635458929775.issue28692@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f6595983e08fe20cf06a2535d74d912c6dbb044f by Serhiy Storchaka in branch 'master': bpo-28692: Deprecate using non-integer value for selecting a plural form in gettext. (#507) https://github.com/python/cpython/commit/f6595983e08fe20cf06a2535d74d912c6dbb044f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:24:09 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:24:09 +0000 Subject: [issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not In-Reply-To: <1488720708.95.0.279516549191.issue29723@psf.upfronthosting.co.za> Message-ID: <1490394249.11.0.869361022715.issue29723@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset d2977a3ae2cc6802921b1e3b6e9d13fcfbda872d by Nick Coghlan in branch 'master': bpo-29723: Consistently configure sys.path[0] (#575) https://github.com/python/cpython/commit/d2977a3ae2cc6802921b1e3b6e9d13fcfbda872d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:24:09 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:24:09 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1490394249.22.0.0726435150711.issue29319@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset d2977a3ae2cc6802921b1e3b6e9d13fcfbda872d by Nick Coghlan in branch 'master': bpo-29723: Consistently configure sys.path[0] (#575) https://github.com/python/cpython/commit/d2977a3ae2cc6802921b1e3b6e9d13fcfbda872d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:24:16 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:24:16 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" In-Reply-To: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> Message-ID: <1490394256.5.0.793391525518.issue29798@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 61a82a5fbf1a674b91764652ab70f5dbb9ba50f2 by Nick Coghlan in branch '3.6': bpo-29798: Handle git worktree in `make patchcheck` (#629) (#633) https://github.com/python/cpython/commit/61a82a5fbf1a674b91764652ab70f5dbb9ba50f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:24:22 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:24:22 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" In-Reply-To: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> Message-ID: <1490394262.94.0.384980651318.issue29798@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset a6aac8c87036c3180916b893d66b1e257b5e2ec2 by Nick Coghlan in branch '3.5': bpo-29798: Handle git worktree in `make patchcheck` (#629) (#634) https://github.com/python/cpython/commit/a6aac8c87036c3180916b893d66b1e257b5e2ec2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:24:29 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:24:29 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" In-Reply-To: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> Message-ID: <1490394269.5.0.298599682866.issue29798@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset ee10fb9c5b0ae8706bcf7ab70d8d65604f2517a7 by Nick Coghlan in branch '2.7': bpo-29798: Handle git worktree in `make patchcheck` (#629) (#635) https://github.com/python/cpython/commit/ee10fb9c5b0ae8706bcf7ab70d8d65604f2517a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:24:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:24:41 +0000 Subject: [issue15695] Correct __sizeof__ support for StgDict In-Reply-To: <1345144416.71.0.984691068113.issue15695@psf.upfronthosting.co.za> Message-ID: <1490394281.14.0.724468307621.issue15695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8999caeb003ed292011e98b8a30746cce787a125 by Serhiy Storchaka in branch 'master': bpo-15695: Implemented StgDict.__sizeof__(). (#509) https://github.com/python/cpython/commit/8999caeb003ed292011e98b8a30746cce787a125 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:24:47 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:24:47 +0000 Subject: [issue29656] Change "make patchcheck" to be branch aware In-Reply-To: <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za> Message-ID: <1490394287.06.0.608243768854.issue29656@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset c8869af89e9b62fbfd066c01da1f502b0fd2ed3f by Nick Coghlan in branch '2.7': [2.7] bpo-29656: Handle PR branches in 'make patchcheck' (#302) (#628) https://github.com/python/cpython/commit/c8869af89e9b62fbfd066c01da1f502b0fd2ed3f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:24:55 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:24:55 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" In-Reply-To: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> Message-ID: <1490394295.92.0.450151916077.issue29798@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 6a6d090612dd7deaac2bc0399fad743e5e2db606 by Nick Coghlan in branch 'master': bpo-29798: Handle git worktree in `make patchcheck` (#629) https://github.com/python/cpython/commit/6a6d090612dd7deaac2bc0399fad743e5e2db606 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:25:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:25:08 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1490394308.85.0.524419693502.issue20185@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0767ad40bfe83525d2ba290cc6eb7c97ce01cdd6 by Serhiy Storchaka in branch 'master': bpo-20185: Convert the marshal module to Argument Clinic. (#541) https://github.com/python/cpython/commit/0767ad40bfe83525d2ba290cc6eb7c97ce01cdd6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:25:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:25:16 +0000 Subject: [issue29746] Update marshal docs to Python 3 In-Reply-To: <1488883267.82.0.811271477172.issue29746@psf.upfronthosting.co.za> Message-ID: <1490394316.45.0.186889931595.issue29746@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4652d82a51e6530a4f820588a6209d3295963bdb by Serhiy Storchaka in branch '3.6': bpo-29746: Update marshal docs to Python 3. (#547) (#631) https://github.com/python/cpython/commit/4652d82a51e6530a4f820588a6209d3295963bdb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:25:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:25:23 +0000 Subject: [issue29746] Update marshal docs to Python 3 In-Reply-To: <1488883267.82.0.811271477172.issue29746@psf.upfronthosting.co.za> Message-ID: <1490394323.64.0.609526174319.issue29746@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f12f820ef887b009ce70e67e71b8690f30c605ee by Serhiy Storchaka in branch '3.5': bpo-29746: Update marshal docs to Python 3. (#547) (#630) https://github.com/python/cpython/commit/f12f820ef887b009ce70e67e71b8690f30c605ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:25:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:25:30 +0000 Subject: [issue24037] Argument Clinic: add the boolint converter In-Reply-To: <1429785188.86.0.806042190219.issue24037@psf.upfronthosting.co.za> Message-ID: <1490394330.49.0.886866962388.issue24037@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 202fda55c2dffe27125703225e5af92254602dc6 by Serhiy Storchaka in branch 'master': bpo-24037: Add Argument Clinic converter `bool(accept={int})`. (#485) https://github.com/python/cpython/commit/202fda55c2dffe27125703225e5af92254602dc6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:25:35 2017 From: report at bugs.python.org (Torrin Jones) Date: Fri, 24 Mar 2017 22:25:35 +0000 Subject: [issue29893] create_subprocess_exec doc doesn't match software In-Reply-To: <1490332817.83.0.92510042207.issue29893@psf.upfronthosting.co.za> Message-ID: <1490394335.12.0.059676639132.issue29893@psf.upfronthosting.co.za> Changes by Torrin Jones : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:25:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:25:38 +0000 Subject: [issue29746] Update marshal docs to Python 3 In-Reply-To: <1488883267.82.0.811271477172.issue29746@psf.upfronthosting.co.za> Message-ID: <1490394338.9.0.517672829174.issue29746@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c611a5b1d4fab0123bf622f06c3bfa510221dc32 by Serhiy Storchaka in branch 'master': bpo-29746: Update marshal docs to Python 3. (#547) https://github.com/python/cpython/commit/c611a5b1d4fab0123bf622f06c3bfa510221dc32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:25:51 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:25:51 +0000 Subject: [issue29656] Change "make patchcheck" to be branch aware In-Reply-To: <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za> Message-ID: <1490394351.34.0.395535600674.issue29656@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset be31a837304f81842b13dbabdaaa14bb9bbe64af by Nick Coghlan in branch '3.5': bpo-29656: Handle PR branches in 'make patchcheck' (#302) (#627) https://github.com/python/cpython/commit/be31a837304f81842b13dbabdaaa14bb9bbe64af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:26:12 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:26:12 +0000 Subject: [issue29656] Change "make patchcheck" to be branch aware In-Reply-To: <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za> Message-ID: <1490394372.13.0.79775519758.issue29656@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 2f386254e2cf054cc7ee5103b54c1cf16d9fa979 by Nick Coghlan in branch '3.6': bpo-29656: Handle PR branches in 'make patchcheck' (#302) (#626) https://github.com/python/cpython/commit/2f386254e2cf054cc7ee5103b54c1cf16d9fa979 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:26:35 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 24 Mar 2017 22:26:35 +0000 Subject: [issue29763] test_site failing on AppVeyor In-Reply-To: <1489009179.7.0.320606146583.issue29763@psf.upfronthosting.co.za> Message-ID: <1490394395.26.0.781105781047.issue29763@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset 7c6d6e056460753c916348feee0e4916a97d7c86 by Zachary Ware in branch '3.6': bpo-29763: Use support.unlink instead of os.unlink (GH-624) (GH-625) https://github.com/python/cpython/commit/7c6d6e056460753c916348feee0e4916a97d7c86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:26:43 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 24 Mar 2017 22:26:43 +0000 Subject: [issue29763] test_site failing on AppVeyor In-Reply-To: <1489009179.7.0.320606146583.issue29763@psf.upfronthosting.co.za> Message-ID: <1490394403.21.0.205314974893.issue29763@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset 93710c152e6bcfffdf2f1f15bb5f75b013aef422 by Zachary Ware in branch 'master': bpo-29763: Use support.unlink instead of os.unlink (GH-624) https://github.com/python/cpython/commit/93710c152e6bcfffdf2f1f15bb5f75b013aef422 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:26:50 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:26:50 +0000 Subject: [issue29656] Change "make patchcheck" to be branch aware In-Reply-To: <1488084737.09.0.284465642742.issue29656@psf.upfronthosting.co.za> Message-ID: <1490394410.44.0.441401937791.issue29656@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 482f7a274fa52b7ba34ff308cd9acdcac9f41ba5 by Nick Coghlan in branch 'master': bpo-29656: Handle PR branches in 'make patchcheck' (#302) https://github.com/python/cpython/commit/482f7a274fa52b7ba34ff308cd9acdcac9f41ba5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:27:02 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 24 Mar 2017 22:27:02 +0000 Subject: [issue26121] Use C99 functions in math if available In-Reply-To: <1452858135.55.0.233335376493.issue26121@psf.upfronthosting.co.za> Message-ID: <1490394422.87.0.39600131314.issue26121@psf.upfronthosting.co.za> Mark Dickinson added the comment: New changeset 97553fdf9daa8231eb05a1ca9933a2b03b0bdad0 by Mark Dickinson (Serhiy Storchaka) in branch 'master': bpo-26121: Use C library implementation for math functions: (#515) https://github.com/python/cpython/commit/97553fdf9daa8231eb05a1ca9933a2b03b0bdad0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:27:26 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:27:26 +0000 Subject: [issue29770] Executable help output (--help) at commandline is wrong for option -B In-Reply-To: <1489063792.65.0.00439171993212.issue29770@psf.upfronthosting.co.za> Message-ID: <1490394446.07.0.636396996421.issue29770@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset ce222c87706b1062f7fc03867d1867aa4848dd7b by Xiang Zhang in branch '3.5': bpo-29770: remove outdated PYO related info (GH-590) (GH-613) https://github.com/python/cpython/commit/ce222c87706b1062f7fc03867d1867aa4848dd7b ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:27:31 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:27:31 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1490394451.12.0.400713794993.issue20185@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset fdd42c481edba4261f861fc1dfe24bbd79b5a17a by Serhiy Storchaka in branch 'master': bpo-20185: Convert list object implementation to Argument Clinic. (#542) https://github.com/python/cpython/commit/fdd42c481edba4261f861fc1dfe24bbd79b5a17a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:27:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:27:39 +0000 Subject: [issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files In-Reply-To: <1389140539.55.0.106381625615.issue20185@psf.upfronthosting.co.za> Message-ID: <1490394459.37.0.004044541306.issue20185@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b5c51d3dd95bbfde533655fb86ac0f96f771ba7b by Serhiy Storchaka in branch 'master': bpo-20185: Convert float object implementation to Argument Clinic. (#543) https://github.com/python/cpython/commit/b5c51d3dd95bbfde533655fb86ac0f96f771ba7b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:27:46 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:27:46 +0000 Subject: [issue29770] Executable help output (--help) at commandline is wrong for option -B In-Reply-To: <1489063792.65.0.00439171993212.issue29770@psf.upfronthosting.co.za> Message-ID: <1490394466.34.0.838941982206.issue29770@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 16416c22f9b8d9e067506d3a98f661756c80389c by Xiang Zhang in branch '3.6': bpo-29770: remove outdated PYO related info (GH-590) (GH-612) https://github.com/python/cpython/commit/16416c22f9b8d9e067506d3a98f661756c80389c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:27:57 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:27:57 +0000 Subject: [issue29770] Executable help output (--help) at commandline is wrong for option -B In-Reply-To: <1489063792.65.0.00439171993212.issue29770@psf.upfronthosting.co.za> Message-ID: <1490394477.71.0.611466713515.issue29770@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 0710d754255e731e6fcc3f206b51db6156da17c8 by Xiang Zhang in branch 'master': bpo-29770: remove outdated PYO related info (GH-590) https://github.com/python/cpython/commit/0710d754255e731e6fcc3f206b51db6156da17c8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:28:07 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:28:07 +0000 Subject: [issue29784] Erroneous link in shutil.copy description In-Reply-To: <1489157151.86.0.545519035584.issue29784@psf.upfronthosting.co.za> Message-ID: <1490394487.69.0.498129564607.issue29784@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 701f13ab930b62a634579951dc610f737f461135 by Mariatta in branch '3.6': bpo-29784: Fix the reference to shutil.copy in the docs (GH-602) (GH-608) https://github.com/python/cpython/commit/701f13ab930b62a634579951dc610f737f461135 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:28:13 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:28:13 +0000 Subject: [issue29784] Erroneous link in shutil.copy description In-Reply-To: <1489157151.86.0.545519035584.issue29784@psf.upfronthosting.co.za> Message-ID: <1490394493.6.0.309462356072.issue29784@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 518d8fcb89896dd30fbf11c667ee4e6b509e4dd9 by Mariatta in branch '3.5': bpo-29784: Fix the reference to shutil.copy in the docs (GH-602) (GH-609) https://github.com/python/cpython/commit/518d8fcb89896dd30fbf11c667ee4e6b509e4dd9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:28:26 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:28:26 +0000 Subject: [issue29784] Erroneous link in shutil.copy description In-Reply-To: <1489157151.86.0.545519035584.issue29784@psf.upfronthosting.co.za> Message-ID: <1490394506.59.0.00570090108419.issue29784@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 70ee0cd5c2a3dba82cb8e0c0742c012f9134c040 by Mariatta in branch 'master': bpo-29784: Fix the reference to shutil.copy in the docs (GH-602) https://github.com/python/cpython/commit/70ee0cd5c2a3dba82cb8e0c0742c012f9134c040 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:28:35 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 22:28:35 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1490394515.19.0.429239207903.issue28810@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 4807fa8386f825d0c71192c59f7e33b99a94bebe by Brett Cannon in branch '3.6': bpo-28810: Document changes to CALL_FUNCTION opcodes (GH-607) https://github.com/python/cpython/commit/4807fa8386f825d0c71192c59f7e33b99a94bebe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:28:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:28:44 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1490394524.83.0.828535251596.issue29741@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 740025478dcd0e9e4028507f32375c85f849fb07 by Serhiy Storchaka (orenmn) in branch 'master': bpo-29741: Clean up C implementations of BytesIO and StringIO. (#606) https://github.com/python/cpython/commit/740025478dcd0e9e4028507f32375c85f849fb07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:28:50 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 22:28:50 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1490394530.39.0.440836709373.issue28810@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 4b2a2a425a906c8e4eb8daee14ab1793e225f726 by Brett Cannon (Ivan Levkivskyi) in branch 'master': bpo-28810: Document changes to CALL_FUNCTION opcodes (GH-250) https://github.com/python/cpython/commit/4b2a2a425a906c8e4eb8daee14ab1793e225f726 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:28:57 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 22:28:57 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1490394537.22.0.341101225138.issue28810@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 68c5e4c592495f1e0f4f60acb3483beb6aa87be1 by Brett Cannon in branch '3.6': bpo-28810: Document BUILD_TUPLE_UNPACK_WITH_CALL bytecode (GH-605) https://github.com/python/cpython/commit/68c5e4c592495f1e0f4f60acb3483beb6aa87be1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:29:10 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 22:29:10 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1490394550.3.0.821958900036.issue28810@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 7e52c3e7aefb4cdaa0662fc01ff68a5e976b77ca by Brett Cannon (Ivan Levkivskyi) in branch 'master': bpo-28810: Document BUILD_TUPLE_UNPACK_WITH_CALL bytecode added in 3.6 (GH-239) https://github.com/python/cpython/commit/7e52c3e7aefb4cdaa0662fc01ff68a5e976b77ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:31:52 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:31:52 +0000 Subject: [issue29862] Fix grammar typo in importlib.reload() exception In-Reply-To: <1490036928.42.0.0658763709681.issue29862@psf.upfronthosting.co.za> Message-ID: <1490394712.36.0.909217514479.issue29862@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Does this need backport to 3.5/3.6? ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:31:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:31:54 +0000 Subject: [issue28692] gettext: deprecate selecting plural form by fractional numbers In-Reply-To: <1479148679.54.0.229445108959.issue28692@psf.upfronthosting.co.za> Message-ID: <1490394714.29.0.222762535915.issue28692@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:34:03 2017 From: report at bugs.python.org (Eryk Sun) Date: Fri, 24 Mar 2017 22:34:03 +0000 Subject: [issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented Message-ID: <1490394843.09.0.467635996133.issue29898@psf.upfronthosting.co.za> New submission from Eryk Sun: The environment variable PYTHONLEGACYWINDOWSIOENCODING is documented here: https://docs.python.org/3/using/cmdline.html#envvar-PYTHONLEGACYWINDOWSIOENCODING but not actually implemented. Also, I think setting PYTHONIOENCODING to anything except UTF-8 should disable using io._WindowsConsoleIO. ---------- components: IO, Unicode, Windows messages: 290240 nosy: eryksun, ezio.melotti, haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: test needed status: open title: PYTHONLEGACYWINDOWSIOENCODING isn't implemented type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:36:50 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:36:50 +0000 Subject: [issue28739] PEP 498: docstrings as f-strings In-Reply-To: <1479501831.35.0.531195928426.issue28739@psf.upfronthosting.co.za> Message-ID: <1490395010.05.0.976261022899.issue28739@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset ff6f3716279e75b2519133a82b9de0c3601963d9 by Mariatta in branch '3.6': bpo-28739: Document that f-strings cannot be used as docstring (GH-592) (GH-600) https://github.com/python/cpython/commit/ff6f3716279e75b2519133a82b9de0c3601963d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:37:02 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:37:02 +0000 Subject: [issue28739] PEP 498: docstrings as f-strings In-Reply-To: <1479501831.35.0.531195928426.issue28739@psf.upfronthosting.co.za> Message-ID: <1490395022.92.0.479444408853.issue28739@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset d4e89287b397c7382c12d3f3d9fd901fd8243b3c by Mariatta in branch 'master': bpo-28739: Document that f-strings cannot be used as docstring (GH-592) https://github.com/python/cpython/commit/d4e89287b397c7382c12d3f3d9fd901fd8243b3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:37:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:37:28 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1490395048.47.0.722991651312.issue28298@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e2c88bdd6bb3efbc81389958d62daf6dd0d6eda7 by Serhiy Storchaka (orenmn) in branch '3.5': bpo-28298: make array 'Q', 'L' and 'I' accept big intables as elements https://github.com/python/cpython/commit/e2c88bdd6bb3efbc81389958d62daf6dd0d6eda7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:37:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:37:36 +0000 Subject: [issue29773] Additional float-from-string tests In-Reply-To: <1489072142.51.0.122050091916.issue29773@psf.upfronthosting.co.za> Message-ID: <1490395056.56.0.010003831411.issue29773@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5fad493dc6634635bc6ba951b39b4d1bf552ef84 by Serhiy Storchaka in branch '3.5': [3.5] bpo-29773: Add more cases for testing string to float conversion errors. (#587) https://github.com/python/cpython/commit/5fad493dc6634635bc6ba951b39b4d1bf552ef84 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:37:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:37:42 +0000 Subject: [issue29773] Additional float-from-string tests In-Reply-To: <1489072142.51.0.122050091916.issue29773@psf.upfronthosting.co.za> Message-ID: <1490395062.77.0.508103963032.issue29773@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 80dfbe30b734f14f76a4e25c7fa8fdb7bdd3936a by Serhiy Storchaka in branch '3.6': [3.6] bpo-29773: Add more cases for testing string to float conversion errors. (#586) https://github.com/python/cpython/commit/80dfbe30b734f14f76a4e25c7fa8fdb7bdd3936a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:37:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:37:51 +0000 Subject: [issue29773] Additional float-from-string tests In-Reply-To: <1489072142.51.0.122050091916.issue29773@psf.upfronthosting.co.za> Message-ID: <1490395071.09.0.714324405355.issue29773@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9e6ac83acae31de2b072e665e177db9fcdf7c049 by Serhiy Storchaka in branch 'master': bpo-29773: Add more cases for testing string to float conversion errors. (#580) https://github.com/python/cpython/commit/9e6ac83acae31de2b072e665e177db9fcdf7c049 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:37:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 22:37:58 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1490395078.57.0.370300461003.issue29619@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 68d29809405dc766966b2b973b8597212fbc3dbd by Victor Stinner in branch '3.6': bpo-29619: Convert st_ino using unsigned integer (#557) (#584) https://github.com/python/cpython/commit/68d29809405dc766966b2b973b8597212fbc3dbd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:38:11 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 24 Mar 2017 22:38:11 +0000 Subject: [issue29772] Unintentionally deleted line on library/collections.rst In-Reply-To: <1489070696.66.0.394233240398.issue29772@psf.upfronthosting.co.za> Message-ID: <1490395091.59.0.927552865806.issue29772@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 309fb90f6895c47e7b41df3d739db45e8ec136c9 by Raymond Hettinger (cocoatomo) in branch '2.7': Insert the line which should not have been deleted (#581) https://github.com/python/cpython/commit/309fb90f6895c47e7b41df3d739db45e8ec136c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:38:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 22:38:20 +0000 Subject: [issue29774] Improve zipfile handling of corrupted extra field In-Reply-To: <1489073255.72.0.694063401806.issue29774@psf.upfronthosting.co.za> Message-ID: <1490395100.5.0.656607136351.issue29774@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset feccdb2a249a71be330765be77dee57121866779 by Victor Stinner (Serhiy Storchaka) in branch 'master': bpo-29774: Improve error reporting for corrupted extra field in ZIP file. (#583) https://github.com/python/cpython/commit/feccdb2a249a71be330765be77dee57121866779 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:38:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 22:38:32 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1490395112.44.0.747218326772.issue29619@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0f6d73343d342c106cda2219ebb8a6f0c4bd9b3c by Victor Stinner in branch 'master': bpo-29619: Convert st_ino using unsigned integer (#557) https://github.com/python/cpython/commit/0f6d73343d342c106cda2219ebb8a6f0c4bd9b3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:38:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:38:40 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1490395120.51.0.0288349278092.issue28298@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 26d013e00f9d4adbcf3e084bbc890c799ff70407 by Serhiy Storchaka (orenmn) in branch '3.6': [3.6] bpo-28298: make array 'Q', 'L' and 'I' accept big intables as elements (#579) https://github.com/python/cpython/commit/26d013e00f9d4adbcf3e084bbc890c799ff70407 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:38:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:38:54 +0000 Subject: [issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I' In-Reply-To: <1475057375.91.0.35024252276.issue28298@psf.upfronthosting.co.za> Message-ID: <1490395134.26.0.456317577878.issue28298@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 964281af59d7a17d923c4d72357e48832b774e39 by Serhiy Storchaka (orenmn) in branch 'master': bpo-28298: make array 'Q', 'L' and 'I' accept big intables as elements (#570) https://github.com/python/cpython/commit/964281af59d7a17d923c4d72357e48832b774e39 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:38:56 2017 From: report at bugs.python.org (prayerslayer) Date: Fri, 24 Mar 2017 22:38:56 +0000 Subject: [issue29595] Expose max_queue_size in ThreadPoolExecutor In-Reply-To: <1487369423.42.0.265838648983.issue29595@psf.upfronthosting.co.za> Message-ID: <1490395136.44.0.721409922451.issue29595@psf.upfronthosting.co.za> prayerslayer added the comment: Ping. That's really a two-line change, can be easily reviewed in 15 minutes :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:39:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:39:04 +0000 Subject: [issue29768] Fix expact version check In-Reply-To: <1489038204.73.0.479111635922.issue29768@psf.upfronthosting.co.za> Message-ID: <1490395144.69.0.11361934428.issue29768@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9cef253ae3251b22d2fbb475fcb7a28805b78c86 by Serhiy Storchaka in branch '3.6': [3.6] bpo-29768: Fixed compile-time check for expat version. (#576) https://github.com/python/cpython/commit/9cef253ae3251b22d2fbb475fcb7a28805b78c86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:39:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:39:12 +0000 Subject: [issue29768] Fix expact version check In-Reply-To: <1489038204.73.0.479111635922.issue29768@psf.upfronthosting.co.za> Message-ID: <1490395151.99.0.23260594813.issue29768@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 952b7cb78046f4bc3bf28cb7de84d1c6bcec45d7 by Serhiy Storchaka in branch '3.5': bpo-29768: Fixed compile-time check for expat version. (#574) (#578) https://github.com/python/cpython/commit/952b7cb78046f4bc3bf28cb7de84d1c6bcec45d7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:39:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:39:18 +0000 Subject: [issue29768] Fix expact version check In-Reply-To: <1489038204.73.0.479111635922.issue29768@psf.upfronthosting.co.za> Message-ID: <1490395158.02.0.302238627031.issue29768@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0c2ed76fda39e95b9c3ebebefa20d7e03db5dde1 by Serhiy Storchaka in branch '2.7': [2.7] bpo-29768: Fixed compile-time check for expat version. (#577) https://github.com/python/cpython/commit/0c2ed76fda39e95b9c3ebebefa20d7e03db5dde1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:39:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:39:30 +0000 Subject: [issue29768] Fix expact version check In-Reply-To: <1489038204.73.0.479111635922.issue29768@psf.upfronthosting.co.za> Message-ID: <1490395170.08.0.521986145762.issue29768@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 22e707fa04476710ba5cc7e2206e4ac66743931b by Serhiy Storchaka in branch 'master': bpo-29768: Fixed compile-time check for expat version. (#574) https://github.com/python/cpython/commit/22e707fa04476710ba5cc7e2206e4ac66743931b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:40:12 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 22:40:12 +0000 Subject: [issue29749] Outdated int() docstring In-Reply-To: <1488894289.51.0.465519491821.issue29749@psf.upfronthosting.co.za> Message-ID: <1490395212.77.0.745569689979.issue29749@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 390a0969c1206a37c86961ebf7ef3050681ed8dd by Brett Cannon (svelankar) in branch 'master': bpo-29749: Update int() docstring (GH-565) https://github.com/python/cpython/commit/390a0969c1206a37c86961ebf7ef3050681ed8dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:40:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 22:40:38 +0000 Subject: [issue29176] /tmp does not exist on Android and is used by curses.window.putwin() In-Reply-To: <1483699620.77.0.827616599041.issue29176@psf.upfronthosting.co.za> Message-ID: <1490395238.24.0.505618276537.issue29176@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 7253aded71df8d4bf8684fc78d11c596079211b3 by Victor Stinner (Mariatta) in branch '3.6': bpo-29176: Fix name of the _curses.window class (#52) (#532) https://github.com/python/cpython/commit/7253aded71df8d4bf8684fc78d11c596079211b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:40:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:40:47 +0000 Subject: [issue29645] webbrowser module import has heavy side effects In-Reply-To: <1488014818.45.0.347439137836.issue29645@psf.upfronthosting.co.za> Message-ID: <1490395247.57.0.697488289008.issue29645@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a7cba27aea138311117e2ab1d91584efcfeac4ec by Serhiy Storchaka in branch 'master': bpo-29645: Speed up importing the webbrowser module. (#484) https://github.com/python/cpython/commit/a7cba27aea138311117e2ab1d91584efcfeac4ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:40:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:40:59 +0000 Subject: [issue28231] zipfile does not support pathlib In-Reply-To: <1474445503.11.0.219964117103.issue28231@psf.upfronthosting.co.za> Message-ID: <1490395259.11.0.544899642563.issue28231@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset eb65edd1029876a4a5bb70b009aeb914088ac749 by Serhiy Storchaka in branch '3.6': [3.6] bpo-28231: The zipfile module now accepts path-like objects for external paths. (#561) https://github.com/python/cpython/commit/eb65edd1029876a4a5bb70b009aeb914088ac749 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:41:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:41:06 +0000 Subject: [issue28231] zipfile does not support pathlib In-Reply-To: <1474445503.11.0.219964117103.issue28231@psf.upfronthosting.co.za> Message-ID: <1490395266.93.0.372826077374.issue28231@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8606e9524a7a4065042f7f228dc57eb74f88e4d3 by Serhiy Storchaka in branch 'master': bpo-28231: The zipfile module now accepts path-like objects for external paths. (#511) https://github.com/python/cpython/commit/8606e9524a7a4065042f7f228dc57eb74f88e4d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:41:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:41:14 +0000 Subject: [issue29655] Certain errors during IMPORT_STAR can leak a reference In-Reply-To: <1488058013.56.0.788869646449.issue29655@psf.upfronthosting.co.za> Message-ID: <1490395274.73.0.61387979405.issue29655@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9fbb65e6464b56c6d677090e185c9fe16a80ed96 by Serhiy Storchaka in branch '2.7': bpo-29655: Fixed possible reference leaks in `import *`. (#301) (#510) https://github.com/python/cpython/commit/9fbb65e6464b56c6d677090e185c9fe16a80ed96 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:41:21 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:41:21 +0000 Subject: [issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5 In-Reply-To: <1486909734.86.0.721049479861.issue29537@psf.upfronthosting.co.za> Message-ID: <1490395281.77.0.637070799745.issue29537@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 0410bee6e6c87f37e91f6cae3627d8e3704075f1 by Nick Coghlan in branch '3.5': bpo-29537: Also cover 3.5.2 in NEWS entry https://github.com/python/cpython/commit/0410bee6e6c87f37e91f6cae3627d8e3704075f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:41:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:41:28 +0000 Subject: [issue28230] tarfile does not support pathlib In-Reply-To: <1476104684.24.0.949542495586.issue28230@psf.upfronthosting.co.za> Message-ID: <1490395288.75.0.733278464962.issue28230@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 666165fddf499e80d10a5d9263846ec4534f6a2a by Serhiy Storchaka in branch '3.6': [3.6] bpo-28230: Document the pathlib support in tarfile and add tests. (#559) https://github.com/python/cpython/commit/666165fddf499e80d10a5d9263846ec4534f6a2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:41:36 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 22:41:36 +0000 Subject: [issue28331] "CPython implementation detail:" removed when content translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1490395296.83.0.777011982997.issue28331@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset c351ce6a2c923c5016e48ecbf7b1e4833031d154 by INADA Naoki in branch 'master': bpo-28331: fix impl-detail label is removed when content is translated. (GH-195) https://github.com/python/cpython/commit/c351ce6a2c923c5016e48ecbf7b1e4833031d154 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:41:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:41:50 +0000 Subject: [issue28230] tarfile does not support pathlib In-Reply-To: <1476104684.24.0.949542495586.issue28230@psf.upfronthosting.co.za> Message-ID: <1490395310.01.0.409908920598.issue28230@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c45cd167d403d7d98078d5fc4a37b16195dc7a35 by Serhiy Storchaka in branch 'master': bpo-28230: Document the pathlib support in tarfile and add tests. (#512) https://github.com/python/cpython/commit/c45cd167d403d7d98078d5fc4a37b16195dc7a35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:42:04 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 24 Mar 2017 22:42:04 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1490395324.16.0.301237077509.issue29571@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 6a4b04cd337347d074ae0140fb13dca5bd4b11ef by Benjamin Peterson in branch '3.6': Revert "bpo-29571: Use correct locale encoding in test_re (#149)" (#554) (#555) https://github.com/python/cpython/commit/6a4b04cd337347d074ae0140fb13dca5bd4b11ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:42:10 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 24 Mar 2017 22:42:10 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1490395330.9.0.872934979632.issue29571@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 312f7dfb7c669fcfc43020951b7f8ff521200ad7 by Benjamin Peterson in branch '3.5': Revert "bpo-29571: Use correct locale encoding in test_re (#149)" (#554) (#556) https://github.com/python/cpython/commit/312f7dfb7c669fcfc43020951b7f8ff521200ad7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:42:19 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:42:19 +0000 Subject: [issue27286] str object got multiple values for keyword argument In-Reply-To: <1465551431.42.0.267871198404.issue27286@psf.upfronthosting.co.za> Message-ID: <1490395339.18.0.023960672594.issue27286@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 93602e3af70d3b9f98ae2da654b16b3382b68d50 by Nick Coghlan in branch '3.5': [3.5] bpo-29537: Tolerate legacy invalid bytecode (#169) https://github.com/python/cpython/commit/93602e3af70d3b9f98ae2da654b16b3382b68d50 ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:42:19 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 22:42:19 +0000 Subject: [issue29537] Alternative fix for BUILD_MAP_UNPACK_WITH_CALL opcode in 3.5 In-Reply-To: <1486909734.86.0.721049479861.issue29537@psf.upfronthosting.co.za> Message-ID: <1490395339.37.0.494533599556.issue29537@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 93602e3af70d3b9f98ae2da654b16b3382b68d50 by Nick Coghlan in branch '3.5': [3.5] bpo-29537: Tolerate legacy invalid bytecode (#169) https://github.com/python/cpython/commit/93602e3af70d3b9f98ae2da654b16b3382b68d50 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:42:26 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 24 Mar 2017 22:42:26 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1490395345.99.0.173699974791.issue29571@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 21a74312f2d1ddee71fade709af49d078085ec30 by Benjamin Peterson in branch 'master': Revert "bpo-29571: Use correct locale encoding in test_re (#149)" (#554) https://github.com/python/cpython/commit/21a74312f2d1ddee71fade709af49d078085ec30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:42:45 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 24 Mar 2017 22:42:45 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1490395365.46.0.518428939612.issue20087@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 02371e0ed1ee82ec73e7d363bcf2ed40cde1397a by Benjamin Peterson in branch 'master': make the glibc alias table take precedence over the X11 one (#422) https://github.com/python/cpython/commit/02371e0ed1ee82ec73e7d363bcf2ed40cde1397a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:42:54 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:42:54 +0000 Subject: [issue24329] __qualname__ and __slots__ In-Reply-To: <1432930157.09.0.507147768187.issue24329@psf.upfronthosting.co.za> Message-ID: <1490395374.63.0.573127880306.issue24329@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset c393ee858932f79bd6dabf31550f9a53ea90bc68 by Xiang Zhang in branch 'master': bpo-24329: allow __qualname__ and __classcell__ in __slots__ (GH-495) https://github.com/python/cpython/commit/c393ee858932f79bd6dabf31550f9a53ea90bc68 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:43:01 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:43:01 +0000 Subject: [issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc In-Reply-To: <1462256356.96.0.954300432794.issue26915@psf.upfronthosting.co.za> Message-ID: <1490395381.03.0.827950395487.issue26915@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 78ad039bcf1a8c494cbc8e18380cc30665869c3e by Xiang Zhang in branch '3.6': bpo-26915: Test identity first in index() and count() of collections.abc.Sequence (GH-553) https://github.com/python/cpython/commit/78ad039bcf1a8c494cbc8e18380cc30665869c3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:43:13 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:43:13 +0000 Subject: [issue29568] undefined parsing behavior with the old style string formatting In-Reply-To: <1487170382.81.0.823573985019.issue29568@psf.upfronthosting.co.za> Message-ID: <1490395393.75.0.0665289878185.issue29568@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 9f8ad3f39e0a92ed37d012b9dd237399524f0d51 by Xiang Zhang (Serhiy Storchaka) in branch 'master': bpo-29568: Disable any characters between two percents for escaped percent "%%" in the format string for classic string formatting. (GH-513) https://github.com/python/cpython/commit/9f8ad3f39e0a92ed37d012b9dd237399524f0d51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:43:22 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:43:22 +0000 Subject: [issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc In-Reply-To: <1462256356.96.0.954300432794.issue26915@psf.upfronthosting.co.za> Message-ID: <1490395402.13.0.543634715348.issue26915@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset d5d3249e8a37936d32266fa06ac20017307a1f70 by Xiang Zhang in branch 'master': bpo-26915: Test identity first in membership operation in index() and count() methods of collections.abc.Sequence (GH-503) https://github.com/python/cpython/commit/d5d3249e8a37936d32266fa06ac20017307a1f70 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:43:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:43:36 +0000 Subject: [issue28682] Bytes support in os.fwalk() In-Reply-To: <1479029050.5.0.426622691368.issue28682@psf.upfronthosting.co.za> Message-ID: <1490395416.69.0.0206405879052.issue28682@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8f6b344d368c15c3fe56c65c2f2776e7766fef55 by Serhiy Storchaka in branch 'master': bpo-28682: Added support for bytes paths in os.fwalk(). (#489) https://github.com/python/cpython/commit/8f6b344d368c15c3fe56c65c2f2776e7766fef55 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:44:01 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:44:01 +0000 Subject: [issue29680] gdb/libpython.py does not work with gdb 7.2 In-Reply-To: <1488335804.47.0.122589974382.issue29680@psf.upfronthosting.co.za> Message-ID: <1490395441.93.0.878970336746.issue29680@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 23b26c4e206427a9e0a1d39240c17a049cf8c732 by Mariatta in branch '3.6': Fixes bpo-29680: Older gdb does not have gdb.error. (GH-363) (GH-534) https://github.com/python/cpython/commit/23b26c4e206427a9e0a1d39240c17a049cf8c732 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:44:21 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 22:44:21 +0000 Subject: [issue29676] C method is not profiled by lsprof In-Reply-To: <1488281664.18.0.494134456081.issue29676@psf.upfronthosting.co.za> Message-ID: <1490395461.75.0.912910063221.issue29676@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 93fac8dd358cd0e85e7b59115db226ce685d3f6f by INADA Naoki in branch 'master': bpo-29676: fix lsprof can't profile C method call. (GH523) https://github.com/python/cpython/commit/93fac8dd358cd0e85e7b59115db226ce685d3f6f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:46:27 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:46:27 +0000 Subject: [issue28728] test_host_resolution in test_socket fails In-Reply-To: <1479407743.41.0.909577209709.issue28728@psf.upfronthosting.co.za> Message-ID: <1490395587.48.0.101863760212.issue28728@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 284a2ba140cf11216e9804573d8cea6674ab90d9 by Xiang Zhang in branch '3.6': bpo-28728: clarify possible test failure due to ISP (GH-412) (GH-531) https://github.com/python/cpython/commit/284a2ba140cf11216e9804573d8cea6674ab90d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:46:35 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:46:35 +0000 Subject: [issue28728] test_host_resolution in test_socket fails In-Reply-To: <1479407743.41.0.909577209709.issue28728@psf.upfronthosting.co.za> Message-ID: <1490395595.65.0.884591564008.issue28728@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset d36a71637cefdddc02efd884f1b2c204f370afaa by Xiang Zhang in branch 'master': bpo-28728: clarify possible test failure due to ISP (GH-412) https://github.com/python/cpython/commit/d36a71637cefdddc02efd884f1b2c204f370afaa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:46:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:46:55 +0000 Subject: [issue29737] Optimize concatenating empty tuples In-Reply-To: <1488829716.87.0.539974742004.issue29737@psf.upfronthosting.co.za> Message-ID: <1490395615.62.0.389391044178.issue29737@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 98e80c2babac0003182c3482c6c5437ea111e795 by Serhiy Storchaka in branch 'master': bpo-29737: Optimize concatenating with empty tuple. (#524) https://github.com/python/cpython/commit/98e80c2babac0003182c3482c6c5437ea111e795 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:47:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:47:05 +0000 Subject: [issue15954] No error checking after using of the wcsxfrm() In-Reply-To: <1347876874.21.0.668678433738.issue15954@psf.upfronthosting.co.za> Message-ID: <1490395625.35.0.878117384322.issue15954@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset be487a65f18e1be5fde03e2977fff4be53cc2fbf by Serhiy Storchaka in branch 'master': bpo-15954: Check return code of wcsxfrm(). (#508) https://github.com/python/cpython/commit/be487a65f18e1be5fde03e2977fff4be53cc2fbf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:47:17 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 22:47:17 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1490395637.18.0.215908598136.issue29695@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset d908fd9ee1c307f7066023eb2031c0f509036cbc by Brett Cannon (Serhiy Storchaka) in branch 'master': bpo-29695: Fixed tests after removing keyword args support in some basic type constructors. (GH-520) https://github.com/python/cpython/commit/d908fd9ee1c307f7066023eb2031c0f509036cbc ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:49:03 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:49:03 +0000 Subject: [issue29680] gdb/libpython.py does not work with gdb 7.2 In-Reply-To: <1488335804.47.0.122589974382.issue29680@psf.upfronthosting.co.za> Message-ID: <1490395743.96.0.617705212013.issue29680@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: PR has been merged and backported into 3.6. If there is nothing else, please close this :) Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:49:19 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:49:19 +0000 Subject: [issue29557] binhex documentation claims unknown bug In-Reply-To: <1487089244.04.0.406287394607.issue29557@psf.upfronthosting.co.za> Message-ID: <1490395759.56.0.520854562169.issue29557@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 6b7bc45e33ec953c542788420adc305ec026fa40 by Mariatta in branch '3.5': bpo-29557: Remove ambiguous line in binhex docs (GH-90) (GH-474) https://github.com/python/cpython/commit/6b7bc45e33ec953c542788420adc305ec026fa40 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:49:25 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 22:49:25 +0000 Subject: [issue29557] binhex documentation claims unknown bug In-Reply-To: <1487089244.04.0.406287394607.issue29557@psf.upfronthosting.co.za> Message-ID: <1490395765.55.0.0364619212178.issue29557@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 130c4ec5fbeb0878b88ec6aa06e47c9672566c17 by Mariatta in branch '3.6': bpo-29557: Remove ambiguous line in binhex docs (GH-90) (GH-475) https://github.com/python/cpython/commit/130c4ec5fbeb0878b88ec6aa06e47c9672566c17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:49:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:49:54 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1490395794.87.0.465720703472.issue29695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2e5642422f6234fd8d0c082142b27340e588f96e by Serhiy Storchaka in branch 'master': bpo-29695: Remove bad keyword parameters in int(), bool(), float(), list() and tuple(). (#518) https://github.com/python/cpython/commit/2e5642422f6234fd8d0c082142b27340e588f96e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:50:32 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:50:32 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> Message-ID: <1490395832.23.0.904267355295.issue29714@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset df6d7b406f3d1b2e4e2014751bfa25574c4df222 by Xiang Zhang in branch '3.6': [3.6] bpo-29714: Fix a regression that bytes format may fail when containing zero bytes inside. (GH-504) https://github.com/python/cpython/commit/df6d7b406f3d1b2e4e2014751bfa25574c4df222 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:50:43 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:50:43 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> Message-ID: <1490395843.73.0.736291315896.issue29714@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset b76ad5121e2cfa89d6476d700cbcb65b7ffc39ac by Xiang Zhang in branch 'master': bpo-29714: Fix a regression that bytes format may fail when containing zero bytes inside. (GH-499) https://github.com/python/cpython/commit/b76ad5121e2cfa89d6476d700cbcb65b7ffc39ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:50:58 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 22:50:58 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1490395858.85.0.44502210187.issue29719@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 4e1a065c20856a00d0fe88ce022b249170608058 by INADA Naoki in branch '3.6': bpo-29719: Remove Date and Release field in whatsnew/3.6 (GH-500) https://github.com/python/cpython/commit/4e1a065c20856a00d0fe88ce022b249170608058 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:51:34 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 22:51:34 +0000 Subject: [issue29719] "Date" of what's new is confusing In-Reply-To: <1488627745.64.0.63277330553.issue29719@psf.upfronthosting.co.za> Message-ID: <1490395894.59.0.0591816221712.issue29719@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 2225ddaa9e64c086b2b6997b0c9ac50921f7aa85 by INADA Naoki in branch 'master': bpo-29719: Remove Date and Release field in whatsnew/3.6 (GH-494) https://github.com/python/cpython/commit/2225ddaa9e64c086b2b6997b0c9ac50921f7aa85 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:53:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:53:00 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1490395980.71.0.251337515351.issue29695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 58d23e68068996c76cac78887ec67dee68cdbc72 by Serhiy Storchaka in branch 'master': bpo-29695: Deprecated using bad named keyword arguments in builtings: (#486) https://github.com/python/cpython/commit/58d23e68068996c76cac78887ec67dee68cdbc72 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:53:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:53:17 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1490395997.93.0.705756188791.issue29638@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b414e349eb6a6140a81ccec249bae3abe939e836 by Serhiy Storchaka (Ivan Levkivskyi) in branch '3.6': bpo-29638: Fix spurious refleaks after typing is imported (#469) (#483) https://github.com/python/cpython/commit/b414e349eb6a6140a81ccec249bae3abe939e836 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:53:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:53:30 +0000 Subject: [issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported In-Reply-To: <1487893667.97.0.185214523378.issue29638@psf.upfronthosting.co.za> Message-ID: <1490396010.59.0.291851058145.issue29638@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7acffa23c9e7866e5b4b98b8f3c28b14ec1c688c by Serhiy Storchaka (Ivan Levkivskyi) in branch 'master': bpo-29638: Fix spurious refleaks after typing is imported (#469) https://github.com/python/cpython/commit/7acffa23c9e7866e5b4b98b8f3c28b14ec1c688c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:54:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:54:17 +0000 Subject: [issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch In-Reply-To: <1487709025.37.0.198613157816.issue29615@psf.upfronthosting.co.za> Message-ID: <1490396057.92.0.593548438424.issue29615@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c6e199f2e9a2514c3fd220aaa4bd23fa1d6da8c9 by Serhiy Storchaka (Petr Motejlek) in branch '3.5': bpo-29615: backport to 3.5 (#479) https://github.com/python/cpython/commit/c6e199f2e9a2514c3fd220aaa4bd23fa1d6da8c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:54:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 22:54:40 +0000 Subject: [issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch In-Reply-To: <1487709025.37.0.198613157816.issue29615@psf.upfronthosting.co.za> Message-ID: <1490396080.8.0.0639935573056.issue29615@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3405792b024e9c6b70c0d2355c55a23ac84e1e67 by Serhiy Storchaka (Petr Motejlek) in branch '3.6': bpo-29615: backport to 3.6 (#478) https://github.com/python/cpython/commit/3405792b024e9c6b70c0d2355c55a23ac84e1e67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:55:03 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 Mar 2017 22:55:03 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490396103.06.0.335730507961.issue27593@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 6120484e46886fbc798c85a523bfe196faa1f60f by Steve Dower in branch '2.7': bpo-27593: Updates Windows build to use information from git (#262) (#448) https://github.com/python/cpython/commit/6120484e46886fbc798c85a523bfe196faa1f60f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:55:14 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 22:55:14 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1490396114.64.0.262576970564.issue28087@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 1d391f926b37484b8d4b326003a72c0084db19ec by Ned Deily in branch '3.6': [3.6] bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS (#463) https://github.com/python/cpython/commit/1d391f926b37484b8d4b326003a72c0084db19ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:56:08 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 22:56:08 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1490396168.01.0.389644230766.issue28087@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset de04644627f82d9dc48b3423def7ff5b4aa1926a by Ned Deily in branch 'master': bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. (#462) https://github.com/python/cpython/commit/de04644627f82d9dc48b3423def7ff5b4aa1926a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:56:17 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 22:56:17 +0000 Subject: [issue29550] Mac build-installer touch step fails after github conversion In-Reply-To: <1487021086.07.0.216604793795.issue29550@psf.upfronthosting.co.za> Message-ID: <1490396177.95.0.690559030345.issue29550@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 5ddddb166d9979161624c17cce3bdc11e1d9f3b8 by Ned Deily in branch '3.6': bpo-29550: Temporarily skip "make touch" in Mac installer build. (#456) (#458) https://github.com/python/cpython/commit/5ddddb166d9979161624c17cce3bdc11e1d9f3b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:56:26 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 22:56:26 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1490396186.37.0.0825678509282.issue29572@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 343d48379c31f31cb0bcc843c537990c4283703d by Ned Deily in branch '3.6': bpo-29572: Update macOS installer build to OpenSSL 1.0.2k (#457) (#459) https://github.com/python/cpython/commit/343d48379c31f31cb0bcc843c537990c4283703d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:56:34 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 22:56:34 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1490396194.6.0.338399757142.issue29572@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset cfcd76777e35c83d548d8736f5d7dc92fe56d806 by Ned Deily in branch 'master': bpo-29572: Update macOS installer build to OpenSSL 1.0.2k (#457) https://github.com/python/cpython/commit/cfcd76777e35c83d548d8736f5d7dc92fe56d806 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:56:44 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 22:56:44 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490396204.62.0.406342194373.issue27593@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset a2edd3ae4074952ce77d9319da2dbb2a47300c27 by Ned Deily in branch '3.5': [3.5] bpo-27593: Get SCM build info from git instead of hg. (#446) (#454) (#455) https://github.com/python/cpython/commit/a2edd3ae4074952ce77d9319da2dbb2a47300c27 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:56:51 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 22:56:51 +0000 Subject: [issue29550] Mac build-installer touch step fails after github conversion In-Reply-To: <1487021086.07.0.216604793795.issue29550@psf.upfronthosting.co.za> Message-ID: <1490396211.08.0.876371786193.issue29550@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 7cd9b22e98a5b7a99a7539500ea946a7a58e1c8d by Ned Deily in branch 'master': bpo-29550: Temporarily skip "make touch" in Mac installer build. (#456) https://github.com/python/cpython/commit/7cd9b22e98a5b7a99a7539500ea946a7a58e1c8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:56:59 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 22:56:59 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490396219.48.0.0700409066843.issue27593@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 95c50e5aed9e5683676e18349dd94b11901a66b3 by Ned Deily in branch '3.6': [3.6] bpo-27593: Get SCM build info from git instead of hg. (#446) (#454) https://github.com/python/cpython/commit/95c50e5aed9e5683676e18349dd94b11901a66b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:57:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 24 Mar 2017 22:57:00 +0000 Subject: [issue29896] ElementTree.fromstring raises undocumented UnicodeError In-Reply-To: <1490366078.02.0.633799101454.issue29896@psf.upfronthosting.co.za> Message-ID: <1490396220.87.0.359383112871.issue29896@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I disagree. The docs only sporadically mention specific exceptions for specific functions. UnicodeDecodeError can occur any place bytes are decoded to unicode. I think this should be closed. Builtin exceptions are documented in https://docs.python.org/3/library/exceptions.html. Module docs document additional exceptions defined in a module. ParseError is one such. https://docs.python.org/3/library/xml.etree.elementtree.html#exceptions. It is not specifically mentioned in the entry for fromstring or .feed. I also disagree that the decode error should be wrapped as a parse error. It happens before parsing in the data preparation step, and the UnicodeDecodeError message give 3 pieces of information specific to the problem. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, terry.reedy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:58:04 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 22:58:04 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1490396284.36.0.758979580522.issue29619@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:58:49 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 Mar 2017 22:58:49 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490396329.66.0.469197966102.issue27593@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset d3e1e9df724d97ab83113c2d5fa15179d1dcd560 by Steve Dower in branch '3.6': bpo-27593: Updates Windows build to use information from git (#262) (#450) https://github.com/python/cpython/commit/d3e1e9df724d97ab83113c2d5fa15179d1dcd560 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:59:13 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 Mar 2017 22:59:13 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490396353.98.0.482107151821.issue27593@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset cf445f10560483d38485204cf46ff1d0adcb4192 by Steve Dower in branch '3.5': bpo-27593: Updates Windows build to use information from git (#262) (#449) https://github.com/python/cpython/commit/cf445f10560483d38485204cf46ff1d0adcb4192 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:59:26 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 24 Mar 2017 22:59:26 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490396366.15.0.762566684556.issue27593@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 5c4b0d063aba0a68c325073f5f312a2c9f40d178 by Ned Deily in branch 'master': bpo-27593: Get SCM build info from git instead of hg. (#446) https://github.com/python/cpython/commit/5c4b0d063aba0a68c325073f5f312a2c9f40d178 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 18:59:32 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 Mar 2017 22:59:32 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490396372.79.0.701840811157.issue27593@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset a0c07d2edd345d2867f97ac31822c9544f9cbcf0 by Steve Dower in branch 'master': bpo-27593: Updates Windows build to use information from git (#262) https://github.com/python/cpython/commit/a0c07d2edd345d2867f97ac31822c9544f9cbcf0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:00:02 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 23:00:02 +0000 Subject: [issue26213] Document BUILD_*_UNPACK opcodes In-Reply-To: <1453851645.07.0.698993321818.issue26213@psf.upfronthosting.co.za> Message-ID: <1490396402.83.0.534685405365.issue26213@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 4d0630d9d5ff4919caa463a64887f32d671eaab8 by Brett Cannon in branch '3.5': bpo-26213: Document _UNPACK bytecodes and BUILD_MAP changes (GH-441) https://github.com/python/cpython/commit/4d0630d9d5ff4919caa463a64887f32d671eaab8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:00:15 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 24 Mar 2017 23:00:15 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1490396415.55.0.58405993082.issue29572@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset f9a6516117f96397aa9c5bd58ea13b111b86b257 by Zachary Ware in branch '2.7': bpo-29572: Update Windows build to OpenSSL 1.0.2k (GH-444) https://github.com/python/cpython/commit/f9a6516117f96397aa9c5bd58ea13b111b86b257 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:00:26 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 23:00:26 +0000 Subject: [issue26213] Document BUILD_*_UNPACK opcodes In-Reply-To: <1453851645.07.0.698993321818.issue26213@psf.upfronthosting.co.za> Message-ID: <1490396426.17.0.187297419661.issue26213@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 226af23e858e2914cf78dfa6fd441c7b90a4cc91 by Brett Cannon in branch '3.6': bpo-26213: Document _UNPACK bytecodes and BUILD_MAP changes (GH-440) https://github.com/python/cpython/commit/226af23e858e2914cf78dfa6fd441c7b90a4cc91 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:00:42 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 24 Mar 2017 23:00:42 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1490396442.21.0.345546919433.issue29572@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset fc64c351c7757f0ebdb7da65cb74871e494a2add by Zachary Ware in branch 'master': bpo-29572: Update Windows build to OpenSSL 1.0.2k (GH-439) https://github.com/python/cpython/commit/fc64c351c7757f0ebdb7da65cb74871e494a2add ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:00:51 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 24 Mar 2017 23:00:51 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1490396451.2.0.632597150199.issue29572@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset 03f7cb060414b17d88cb406f3e09f26c902d8658 by Zachary Ware in branch '3.6': bpo-29572: Update Windows build to OpenSSL 1.0.2k (GH-442) https://github.com/python/cpython/commit/03f7cb060414b17d88cb406f3e09f26c902d8658 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:00:59 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 24 Mar 2017 23:00:59 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1490396459.1.0.437381342704.issue29572@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset dd2000cbe475da48fdc94e8f05618e9f460077fd by Zachary Ware in branch '3.5': bpo-29572: Update Windows build to OpenSSL 1.0.2k (GH-443) https://github.com/python/cpython/commit/dd2000cbe475da48fdc94e8f05618e9f460077fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:01:45 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 23:01:45 +0000 Subject: [issue26213] Document BUILD_*_UNPACK opcodes In-Reply-To: <1453851645.07.0.698993321818.issue26213@psf.upfronthosting.co.za> Message-ID: <1490396505.76.0.940927601814.issue26213@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 0705f66eb369aa6a6cdb699e24ff61e1ab2e0c56 by Brett Cannon (Ivan Levkivskyi) in branch 'master': bpo-26213: Document _UNPACK bytecodes and BUILD_MAP changes (#238) https://github.com/python/cpython/commit/0705f66eb369aa6a6cdb699e24ff61e1ab2e0c56 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:01:54 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:01:54 +0000 Subject: [issue29709] Short-circuiting not only on False and True In-Reply-To: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> Message-ID: <1490396514.45.0.214709825156.issue29709@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset fc59e5c7073af4d9255644a83933dd5b14c7f722 by Mariatta in branch '2.7': bpo-29709: Improve Boolean Operations documentation (#433) (#438) https://github.com/python/cpython/commit/fc59e5c7073af4d9255644a83933dd5b14c7f722 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:02:08 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:02:08 +0000 Subject: [issue29709] Short-circuiting not only on False and True In-Reply-To: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> Message-ID: <1490396528.65.0.558172685718.issue29709@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 6e965d9e78b278f2f720a932e7b149cb7d88bd72 by Mariatta in branch '3.5': bpo-29709: Improve Boolean Operations documentation (#433) (#436) https://github.com/python/cpython/commit/6e965d9e78b278f2f720a932e7b149cb7d88bd72 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:02:16 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:02:16 +0000 Subject: [issue29709] Short-circuiting not only on False and True In-Reply-To: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> Message-ID: <1490396536.14.0.300823697195.issue29709@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 1936ba93c900d47d0c8c915184ac2fa7773c952e by Mariatta in branch '3.6': bpo-29709: Improve Boolean Operations documentation (#433) (#437) https://github.com/python/cpython/commit/1936ba93c900d47d0c8c915184ac2fa7773c952e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:02:25 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 23:02:25 +0000 Subject: [issue29455] Mention coverage.py in trace module documentation In-Reply-To: <1486352347.76.0.0578982981399.issue29455@psf.upfronthosting.co.za> Message-ID: <1490396545.43.0.369495184185.issue29455@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 9d07aceedabcdc9826489f8b9baffff056283bb3 by Brett Cannon in branch '3.6': bpo-29455: Mention coverage.py in trace module documentation (GH-435) https://github.com/python/cpython/commit/9d07aceedabcdc9826489f8b9baffff056283bb3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:02:35 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:02:35 +0000 Subject: [issue29709] Short-circuiting not only on False and True In-Reply-To: <1488543100.15.0.348225972332.issue29709@psf.upfronthosting.co.za> Message-ID: <1490396554.99.0.797493026427.issue29709@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 8eb531d9db0861e14222445fcaebe1a373bba170 by Mariatta in branch 'master': bpo-29709: Improve Boolean Operations documentation (#433) https://github.com/python/cpython/commit/8eb531d9db0861e14222445fcaebe1a373bba170 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:02:45 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 24 Mar 2017 23:02:45 +0000 Subject: [issue29455] Mention coverage.py in trace module documentation In-Reply-To: <1486352347.76.0.0578982981399.issue29455@psf.upfronthosting.co.za> Message-ID: <1490396565.2.0.181269892052.issue29455@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 5dfccb06dc513ae67fac5fee66356ad58a4de170 by Brett Cannon (Marco Buttu) in branch 'master': bpo-29455: Mention coverage.py in trace module documentation (#261) https://github.com/python/cpython/commit/5dfccb06dc513ae67fac5fee66356ad58a4de170 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:03:53 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:03:53 +0000 Subject: [issue29623] configparser.ConfigParser.read() does not accept Pathlib path as a single argument. In-Reply-To: <1487789335.63.0.00643279339965.issue29623@psf.upfronthosting.co.za> Message-ID: <1490396633.57.0.488642812858.issue29623@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 21ce65aa67f0dc63002ab0a5fb21ef921cf5279e by Berker Peksag in branch '3.6': [3.6] bpo-29623: Make PathLike objects work with ConfigParser.read() (#242) (#432) https://github.com/python/cpython/commit/21ce65aa67f0dc63002ab0a5fb21ef921cf5279e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:04:15 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 24 Mar 2017 23:04:15 +0000 Subject: [issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes In-Reply-To: <1488493463.16.0.114641402405.issue29704@psf.upfronthosting.co.za> Message-ID: <1490396655.89.0.886041993471.issue29704@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset f7f024a721d53978d03129e8eb5111d4f74534a9 by Yury Selivanov (Seth M. Larson) in branch '3.5': bpo-29704: Fix asyncio.SubprocessStreamProtocol closing (#405) https://github.com/python/cpython/commit/f7f024a721d53978d03129e8eb5111d4f74534a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:04:30 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:04:30 +0000 Subject: [issue29623] configparser.ConfigParser.read() does not accept Pathlib path as a single argument. In-Reply-To: <1487789335.63.0.00643279339965.issue29623@psf.upfronthosting.co.za> Message-ID: <1490396670.57.0.0595520604087.issue29623@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 85b8d01c916b482dac937b93ede1e53b1db0361c by Berker Peksag (David Ellis) in branch 'master': bpo-29623: Make PathLike objects work with ConfigParser.read() (#242) https://github.com/python/cpython/commit/85b8d01c916b482dac937b93ede1e53b1db0361c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:05:40 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:05:40 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1490396740.47.0.523182124568.issue9303@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 86a670543ff97d52fd9b8ca0477f8b6d27ee946d by Berker Peksag (Aviv Palivoda) in branch 'master': bpo-9303: Migrate sqlite3 module to _v2 API to enhance performance (#359) https://github.com/python/cpython/commit/86a670543ff97d52fd9b8ca0477f8b6d27ee946d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:05:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 23:05:51 +0000 Subject: [issue29693] DeprecationWarning/SyntaxError in test_import In-Reply-To: <1488461509.07.0.849251480688.issue29693@psf.upfronthosting.co.za> Message-ID: <1490396751.96.0.450880543189.issue29693@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 15aa4c88f6052af6279e6be3fcd2f968f1c53eae by Serhiy Storchaka (Anish Shah) in branch 'master': bpo-29693: Fix for DeprecationWarning in test_import (#421) https://github.com/python/cpython/commit/15aa4c88f6052af6279e6be3fcd2f968f1c53eae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:06:35 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:06:35 +0000 Subject: [issue29026] time.time() documentation should mention UTC timezone In-Reply-To: <1482243889.09.0.538886851254.issue29026@psf.upfronthosting.co.za> Message-ID: <1490396795.97.0.544299459607.issue29026@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 8c851fa3d3044d5bc53e9f931129f5987ece401d by Mariatta in branch '3.5': bpo-29026: Clarify documentation of time.time (GH-34) (GH-418) https://github.com/python/cpython/commit/8c851fa3d3044d5bc53e9f931129f5987ece401d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:06:56 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:06:56 +0000 Subject: [issue29026] time.time() documentation should mention UTC timezone In-Reply-To: <1482243889.09.0.538886851254.issue29026@psf.upfronthosting.co.za> Message-ID: <1490396816.45.0.73584981292.issue29026@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset b8f5d07158f171a18be4d42f9769d3c9c073e748 by Mariatta in branch '3.6': bpo-29026: Clarify documentation of time.time (GH-34) (GH-417) https://github.com/python/cpython/commit/b8f5d07158f171a18be4d42f9769d3c9c073e748 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:07:23 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 24 Mar 2017 23:07:23 +0000 Subject: [issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes In-Reply-To: <1488493463.16.0.114641402405.issue29704@psf.upfronthosting.co.za> Message-ID: <1490396843.37.0.421738537814.issue29704@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 604faba1db724951ee440337099d111e3ecade49 by Yury Selivanov (Seth M. Larson) in branch '3.6': bpo-29704: Fix asyncio.SubprocessStreamProtocol closing (#405) https://github.com/python/cpython/commit/604faba1db724951ee440337099d111e3ecade49 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:07:30 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 24 Mar 2017 23:07:30 +0000 Subject: [issue28963] Use-after-free in _asyncio_Future_remove_done_callback() of _asynciomodule.c In-Reply-To: <1481657201.46.0.37032067172.issue28963@psf.upfronthosting.co.za> Message-ID: <1490396850.53.0.748176076517.issue28963@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 84af903f3bc6780cb4e73ff05ad2e242d3966417 by Yury Selivanov in branch 'master': bpo-28963: Fix out of bound iteration in asyncio.Future.remove_done_callback/C (#408) https://github.com/python/cpython/commit/84af903f3bc6780cb4e73ff05ad2e242d3966417 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:08:27 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 24 Mar 2017 23:08:27 +0000 Subject: [issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes In-Reply-To: <1488493463.16.0.114641402405.issue29704@psf.upfronthosting.co.za> Message-ID: <1490396907.73.0.131323095432.issue29704@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 481cb70a724687d12553d38a749c16034af68a1e by Yury Selivanov (Seth M. Larson) in branch 'master': bpo-29704: Fix asyncio.SubprocessStreamProtocol closing (#405) https://github.com/python/cpython/commit/481cb70a724687d12553d38a749c16034af68a1e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:08:40 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 24 Mar 2017 23:08:40 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1490396920.13.0.0994444894352.issue29703@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 8b73b6198bc0753c5ce6e8f91eb7bddc2bd42a73 by Yury Selivanov in branch '3.5': bpo-29703: asyncio: Fix creating new event loops in child processes. (#411) https://github.com/python/cpython/commit/8b73b6198bc0753c5ce6e8f91eb7bddc2bd42a73 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:08:47 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 24 Mar 2017 23:08:47 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1490396927.88.0.475243229604.issue29703@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 01e5230ef0b28658cf7311be199363eda98808bd by Yury Selivanov in branch '3.6': bpo-29703: asyncio: Fix creating new event loops in child processes. (#404) (#410) https://github.com/python/cpython/commit/01e5230ef0b28658cf7311be199363eda98808bd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:08:55 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 24 Mar 2017 23:08:55 +0000 Subject: [issue29271] Task.current_task(None) returns unexpected result In-Reply-To: <1484345484.86.0.127501941011.issue29271@psf.upfronthosting.co.za> Message-ID: <1490396935.85.0.049952787105.issue29271@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 8d26aa930c0123933a1ceb12fceba4f5aef4e95e by Yury Selivanov in branch 'master': bpo-29271: Fix Task.current_task and Task.all_tasks to accept None. (#406) https://github.com/python/cpython/commit/8d26aa930c0123933a1ceb12fceba4f5aef4e95e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:12:08 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 24 Mar 2017 23:12:08 +0000 Subject: [issue28893] Make sure exceptions raised in __aiter__ are properly chained in ceval In-Reply-To: <1481085693.53.0.293766364883.issue28893@psf.upfronthosting.co.za> Message-ID: <1490397128.83.0.661383280409.issue28893@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 398ff91ac0b8f4d930cd5d9e3e6a4bf247f810ef by Yury Selivanov in branch 'master': bpo-28893: Set __cause__ for errors in async iteration protocol (#407) https://github.com/python/cpython/commit/398ff91ac0b8f4d930cd5d9e3e6a4bf247f810ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:12:30 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 24 Mar 2017 23:12:30 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1490397150.81.0.614680858174.issue29703@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset ba7e1f9a4e06c0b4ad594fd64edcaf7292515820 by Yury Selivanov in branch 'master': bpo-29703: asyncio: Fix creating new event loops in child processes. (#404) https://github.com/python/cpython/commit/ba7e1f9a4e06c0b4ad594fd64edcaf7292515820 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:13:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 23:13:11 +0000 Subject: [issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc In-Reply-To: <1488358332.92.0.449242887398.issue29683@psf.upfronthosting.co.za> Message-ID: <1490397191.55.0.485882752615.issue29683@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a6e84933d204f807e0e81b6a2237193b2e8ab89a by Serhiy Storchaka (Brian Coleman) in branch '3.6': bpo-29683 - Fixes to _PyCode_SetExtra when co_extra->ce->extras is (#402) https://github.com/python/cpython/commit/a6e84933d204f807e0e81b6a2237193b2e8ab89a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:13:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 23:13:47 +0000 Subject: [issue28129] assertion failures in ctypes In-Reply-To: <1473779654.66.0.219445763591.issue28129@psf.upfronthosting.co.za> Message-ID: <1490397227.28.0.339834748451.issue28129@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 1bea762d9ec823544c530d567330a47f64d93d4f by Victor Stinner (orenmn) in branch 'master': bpo-28129: fix ctypes crashes (#386) https://github.com/python/cpython/commit/1bea762d9ec823544c530d567330a47f64d93d4f ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:14:03 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 24 Mar 2017 23:14:03 +0000 Subject: [issue29697] Wrong ECDH configuration with OpenSSL 1.1 In-Reply-To: <1488471502.97.0.24501918149.issue29697@psf.upfronthosting.co.za> Message-ID: <1490397243.65.0.267592927836.issue29697@psf.upfronthosting.co.za> Donald Stufft added the comment: New changeset f1a696efd6ca674579e25de29ec4053ff5a5ade1 by Donald Stufft in branch '2.7': bpo-29697: Don't use OpenSSL <1.0.2 fallback on 1.1+ (GH-399) https://github.com/python/cpython/commit/f1a696efd6ca674579e25de29ec4053ff5a5ade1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:14:13 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 24 Mar 2017 23:14:13 +0000 Subject: [issue29697] Wrong ECDH configuration with OpenSSL 1.1 In-Reply-To: <1488471502.97.0.24501918149.issue29697@psf.upfronthosting.co.za> Message-ID: <1490397253.13.0.884264082134.issue29697@psf.upfronthosting.co.za> Donald Stufft added the comment: New changeset 784ba7c8ad53638c94270011d55d2536ff0cd2dd by Donald Stufft in branch '3.6': bpo-29697: Don't use OpenSSL <1.0.2 fallback on 1.1+ (#397) https://github.com/python/cpython/commit/784ba7c8ad53638c94270011d55d2536ff0cd2dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:14:20 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 24 Mar 2017 23:14:20 +0000 Subject: [issue29697] Wrong ECDH configuration with OpenSSL 1.1 In-Reply-To: <1488471502.97.0.24501918149.issue29697@psf.upfronthosting.co.za> Message-ID: <1490397260.72.0.0467879922086.issue29697@psf.upfronthosting.co.za> Donald Stufft added the comment: New changeset 564ace834f23587937b325e3545abe3f17fdbd2a by Donald Stufft in branch '3.5': bpo-29697: Don't use OpenSSL <1.0.2 fallback on 1.1+ (GH-398) https://github.com/python/cpython/commit/564ace834f23587937b325e3545abe3f17fdbd2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:14:30 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 24 Mar 2017 23:14:30 +0000 Subject: [issue29697] Wrong ECDH configuration with OpenSSL 1.1 In-Reply-To: <1488471502.97.0.24501918149.issue29697@psf.upfronthosting.co.za> Message-ID: <1490397270.87.0.492017899998.issue29697@psf.upfronthosting.co.za> Donald Stufft added the comment: New changeset 8ae264ce6dfcd6923d7bbde0e975389bea7d9881 by Donald Stufft in branch 'master': bpo-29697: Don't use OpenSSL <1.0.2 fallback on 1.1+ (GH-395) https://github.com/python/cpython/commit/8ae264ce6dfcd6923d7bbde0e975389bea7d9881 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:15:15 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:15:15 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1490397315.04.0.821684114023.issue27200@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset b2a7c2f9862b28cf5db11ef837646ef0c589955c by Berker Peksag (Marco Buttu) in branch 'master': bpo-27200: fix configparser, copyreg and ctypes doctests (#240) https://github.com/python/cpython/commit/b2a7c2f9862b28cf5db11ef837646ef0c589955c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:15:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 23:15:27 +0000 Subject: [issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc In-Reply-To: <1488358332.92.0.449242887398.issue29683@psf.upfronthosting.co.za> Message-ID: <1490397327.19.0.508576353774.issue29683@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6a9122ce6969902e119133dac660bf515616c7dd by Victor Stinner (Brian Coleman) in branch 'master': bpo-29683 - Fixes to _PyCode_SetExtra when co_extra->ce->extras is (#376) https://github.com/python/cpython/commit/6a9122ce6969902e119133dac660bf515616c7dd ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:15:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 23:15:40 +0000 Subject: [issue29176] /tmp does not exist on Android and is used by curses.window.putwin() In-Reply-To: <1483699620.77.0.827616599041.issue29176@psf.upfronthosting.co.za> Message-ID: <1490397340.79.0.0694811274278.issue29176@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2b221b78d602f1684a81b85af748fa55b1449dac by Victor Stinner (Christian Heimes) in branch 'master': bpo-29176 Use tmpfile() in curses module (#235) https://github.com/python/cpython/commit/2b221b78d602f1684a81b85af748fa55b1449dac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:28:03 2017 From: report at bugs.python.org (Tommy Carstensen) Date: Fri, 24 Mar 2017 23:28:03 +0000 Subject: [issue29095] Compiling Python 3.6 from source on MacOS X Sierra In-Reply-To: <1482955362.45.0.530145158959.issue29095@psf.upfronthosting.co.za> Message-ID: <1490398083.78.0.718104099626.issue29095@psf.upfronthosting.co.za> Tommy Carstensen added the comment: I have the same problem as described here. How can I install Python3.6 and pip without sudo and without homebrew? I get the same error message after installation: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. ---------- nosy: +Tommy.Carstensen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:30:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 23:30:15 +0000 Subject: [issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch In-Reply-To: <1487709025.37.0.198613157816.issue29615@psf.upfronthosting.co.za> Message-ID: <1490398215.59.0.0916600599599.issue29615@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3c6314c08d8ab1cfefbf6c2e27c095a7d4ba5f6e by Serhiy Storchaka (Petr Motejlek) in branch 'master': bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (#260) https://github.com/python/cpython/commit/3c6314c08d8ab1cfefbf6c2e27c095a7d4ba5f6e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:30:24 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 24 Mar 2017 23:30:24 +0000 Subject: [issue29680] gdb/libpython.py does not work with gdb 7.2 In-Reply-To: <1488335804.47.0.122589974382.issue29680@psf.upfronthosting.co.za> Message-ID: <1490398224.25.0.834732227956.issue29680@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset 661ca8843fed1183e38db06e52d59ac300bf1c2a by Lev Abalkin in branch 'master': Fixes bpo-29680: Older gdb does not have gdb.error. (#363) https://github.com/python/cpython/commit/661ca8843fed1183e38db06e52d59ac300bf1c2a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:30:53 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 23:30:53 +0000 Subject: [issue29684] Minor regression in PyEval_CallObjectWithKeywords() In-Reply-To: <1488360000.25.0.226175161117.issue29684@psf.upfronthosting.co.za> Message-ID: <1490398253.3.0.944507807321.issue29684@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 023532e558bb0c5bf60195aebbafe63a0bebd85e by INADA Naoki in branch '3.6': bpo-29684: Fix minor regression of PyEval_CallObjectWithKeywords. (GH-378) https://github.com/python/cpython/commit/023532e558bb0c5bf60195aebbafe63a0bebd85e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:31:01 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 23:31:01 +0000 Subject: [issue29684] Minor regression in PyEval_CallObjectWithKeywords() In-Reply-To: <1488360000.25.0.226175161117.issue29684@psf.upfronthosting.co.za> Message-ID: <1490398261.59.0.393013542579.issue29684@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 3824cd8fd44f287ea2a76120a39ee76eb34bbf32 by INADA Naoki in branch 'master': bpo-29684: Fix regression of PyEval_CallObjectWithKeywords (GH-87) https://github.com/python/cpython/commit/3824cd8fd44f287ea2a76120a39ee76eb34bbf32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:31:27 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 23:31:27 +0000 Subject: [issue26867] test_ssl test_options fails on ubuntu 16.04 In-Reply-To: <1461728238.71.0.110276038105.issue26867@psf.upfronthosting.co.za> Message-ID: <1490398287.58.0.705439475637.issue26867@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset c9ba1862222bcbb309278db028d33a57f039d587 by Xiang Zhang in branch '2.7': bpo-26867: Ubuntu's openssl OP_NO_SSLv3 is forced on by default; fix test. (GH-374) https://github.com/python/cpython/commit/c9ba1862222bcbb309278db028d33a57f039d587 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:32:37 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 23:32:37 +0000 Subject: [issue28598] RHS not consulted in `str % subclass_of_str` case. In-Reply-To: <1478180164.76.0.63576586286.issue28598@psf.upfronthosting.co.za> Message-ID: <1490398357.64.0.367496637239.issue28598@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset b4f0e980b6084e9a994e3f069269fac2471e0d78 by Xiang Zhang in branch '2.7': bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations (GH-366) https://github.com/python/cpython/commit/b4f0e980b6084e9a994e3f069269fac2471e0d78 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:34:25 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 Mar 2017 23:34:25 +0000 Subject: [issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented In-Reply-To: <1490394843.09.0.467635996133.issue29898@psf.upfronthosting.co.za> Message-ID: <1490398465.74.0.349575776434.issue29898@psf.upfronthosting.co.za> Steve Dower added the comment: It's actually called "PYTHONLEGACYWINDOWSSTDIO" in Python/pylifecycle.c, which is also what PEP 528 says it should be, so this is a docs issue. You're correct that PYTHONIOENCODING is overridden by detection of a real console, however, PYTHONIOENCODING doesn't currently set a flag anywhere, and the (required for compatibility) defaults on Windows would make it look like it's always been set to something else. In my opinion, you should set PYTHONLEGACYWINDOWSSTDIO to indicate that even though we know the incoming encoding (Unicode from an interactive console), you don't care and you want to override it with a default value. Then use PYTHONIOENCODING to set that default value. This is most consistent with the existing use of PYTHONIOENCODING (it's the default unless you know exactly which encoding you are getting). ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:34:29 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 23:34:29 +0000 Subject: [issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file. In-Reply-To: <1483059317.41.0.849254662988.issue29110@psf.upfronthosting.co.za> Message-ID: <1490398469.35.0.314205534622.issue29110@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 02eb4b0bd4a7d86cf5e40567aaa8710b00e079a4 by INADA Naoki in branch '2.7': bpo-29110: Fix file object leak in aifc.open (GH-356) https://github.com/python/cpython/commit/02eb4b0bd4a7d86cf5e40567aaa8710b00e079a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:34:46 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 23:34:46 +0000 Subject: [issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator In-Reply-To: <1264337326.51.0.913533963705.issue7769@psf.upfronthosting.co.za> Message-ID: <1490398486.55.0.717865031148.issue7769@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 267b9d2fa8efce7c5bc34ce50048ebca8fddf04f by Xiang Zhang in branch 'master': bpo-7769: enable xmlrpc.server.SimpleXMLRPCDispatcher.register_function used as decorator (GH-231) https://github.com/python/cpython/commit/267b9d2fa8efce7c5bc34ce50048ebca8fddf04f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:35:39 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 23:35:39 +0000 Subject: [issue29661] Typo in the docstring of timeit.Timer.autorange In-Reply-To: <1488168131.96.0.70434953858.issue29661@psf.upfronthosting.co.za> Message-ID: <1490398539.66.0.934914514942.issue29661@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset c4a786b8ad2a625594551ab3bc991a6831ba7688 by Xiang Zhang in branch '3.6': bpo-29661: fix contradiction in timeit.Timer.autorange's docstring (GH-331) (GH-353) https://github.com/python/cpython/commit/c4a786b8ad2a625594551ab3bc991a6831ba7688 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:35:51 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 23:35:51 +0000 Subject: [issue29661] Typo in the docstring of timeit.Timer.autorange In-Reply-To: <1488168131.96.0.70434953858.issue29661@psf.upfronthosting.co.za> Message-ID: <1490398551.91.0.954798776465.issue29661@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset ecf39bbc97adc0fb67654602e37d0d8313e9be9d by Xiang Zhang in branch 'master': bpo-29661: fix contradiction in timeit.Timer.autorange's docstring (GH-331) https://github.com/python/cpython/commit/ecf39bbc97adc0fb67654602e37d0d8313e9be9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:36:11 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:36:11 +0000 Subject: [issue29655] Certain errors during IMPORT_STAR can leak a reference In-Reply-To: <1488058013.56.0.788869646449.issue29655@psf.upfronthosting.co.za> Message-ID: <1490398571.57.0.0858177685162.issue29655@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 0dadf56737f591c83d18db5e445960d39448583e by Berker Peksag in branch '3.5': bpo-29655: Fixed possible reference leaks in `import *`. (#301) (#349) https://github.com/python/cpython/commit/0dadf56737f591c83d18db5e445960d39448583e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:36:25 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:36:25 +0000 Subject: [issue29655] Certain errors during IMPORT_STAR can leak a reference In-Reply-To: <1488058013.56.0.788869646449.issue29655@psf.upfronthosting.co.za> Message-ID: <1490398585.52.0.427174446113.issue29655@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 7accf2033d03025cc5324f8b9d22582bca3623e9 by Berker Peksag in branch '3.6': bpo-29655: Fixed possible reference leaks in `import *`. (#301) (#348) https://github.com/python/cpython/commit/7accf2033d03025cc5324f8b9d22582bca3623e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:36:46 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:36:46 +0000 Subject: [issue28598] RHS not consulted in `str % subclass_of_str` case. In-Reply-To: <1478180164.76.0.63576586286.issue28598@psf.upfronthosting.co.za> Message-ID: <1490398606.89.0.745916406218.issue28598@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset bc144f0abff2b36595171377ee847c0266596ab2 by Berker Peksag (Martijn Pieters) in branch '3.5': bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations (#94) https://github.com/python/cpython/commit/bc144f0abff2b36595171377ee847c0266596ab2 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:36:54 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:36:54 +0000 Subject: [issue28598] RHS not consulted in `str % subclass_of_str` case. In-Reply-To: <1478180164.76.0.63576586286.issue28598@psf.upfronthosting.co.za> Message-ID: <1490398614.29.0.430177851478.issue28598@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 53039ad3814a8918c5311f37bd654428b9843fcc by Berker Peksag (Martijn Pieters) in branch '3.6': bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations (#95) https://github.com/python/cpython/commit/53039ad3814a8918c5311f37bd654428b9843fcc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:37:01 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:37:01 +0000 Subject: [issue24241] webbrowser default browser detection and/or public API for _trylist. In-Reply-To: <1432042982.05.0.828874094042.issue24241@psf.upfronthosting.co.za> Message-ID: <1490398621.5.0.361059818831.issue24241@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 370f7a956cef5895c93ca5a53fc26b04df973aaf by Berker Peksag in branch 'master': bpo-24241: Add versionchanged directive to the documentation (#342) https://github.com/python/cpython/commit/370f7a956cef5895c93ca5a53fc26b04df973aaf ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:37:08 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:37:08 +0000 Subject: [issue27788] platform module's version number doesn't match its docstring In-Reply-To: <1471450258.8.0.170997912559.issue27788@psf.upfronthosting.co.za> Message-ID: <1490398628.3.0.620352578845.issue27788@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset bb59d89ceeb1abfb4d73c7fc60b534e4464adf35 by Berker Peksag in branch '3.6': bpo-27788 : synchronise platform.py version number (#246) (#341) https://github.com/python/cpython/commit/bb59d89ceeb1abfb4d73c7fc60b534e4464adf35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:37:52 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 23:37:52 +0000 Subject: [issue29662] Fix wrong indentation of timeit.Timer's documenation Message-ID: <1490398672.83.0.189529874832.issue29662@psf.upfronthosting.co.za> New submission from Xiang Zhang: New changeset 8aa1ad892ff3cf4d8881cdae0e95be1a5bad175e by Xiang Zhang in branch '3.6': bpo-29662: fix wrong indentation in timeit.Timer's doc (GH-333) https://github.com/python/cpython/commit/8aa1ad892ff3cf4d8881cdae0e95be1a5bad175e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:37:59 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 23:37:59 +0000 Subject: [issue29662] Fix wrong indentation of timeit.Timer's documenation In-Reply-To: <1490398672.83.0.189529874832.issue29662@psf.upfronthosting.co.za> Message-ID: <1490398679.71.0.517376528212.issue29662@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 210d6a9f951b621b095bc5b72821cf60198ffea8 by Xiang Zhang in branch 'master': bpo-29662: fix wrong indentation in timeit.Timer's doc (GH-332) https://github.com/python/cpython/commit/210d6a9f951b621b095bc5b72821cf60198ffea8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:38:08 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 23:38:08 +0000 Subject: [issue29376] threading._DummyThread.__repr__ raises AssertionError In-Reply-To: <1485385808.95.0.00162143215773.issue29376@psf.upfronthosting.co.za> Message-ID: <1490398688.46.0.134805660061.issue29376@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 4b6c41768a15fc85e3069603ef89344bd97f79af by Xiang Zhang in branch '3.6': bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-330) https://github.com/python/cpython/commit/4b6c41768a15fc85e3069603ef89344bd97f79af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:38:14 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 23:38:14 +0000 Subject: [issue29376] threading._DummyThread.__repr__ raises AssertionError In-Reply-To: <1485385808.95.0.00162143215773.issue29376@psf.upfronthosting.co.za> Message-ID: <1490398694.55.0.650956216187.issue29376@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 8400ae209b5fa3d3bdc39d3876eef13d1ea9a72a by Xiang Zhang in branch '3.5': bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-329) https://github.com/python/cpython/commit/8400ae209b5fa3d3bdc39d3876eef13d1ea9a72a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:38:21 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 24 Mar 2017 23:38:21 +0000 Subject: [issue29376] threading._DummyThread.__repr__ raises AssertionError In-Reply-To: <1485385808.95.0.00162143215773.issue29376@psf.upfronthosting.co.za> Message-ID: <1490398701.98.0.25867708672.issue29376@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset f3a9faba4bad91286b78b498547de928078f55da by Xiang Zhang in branch 'master': bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-236) https://github.com/python/cpython/commit/f3a9faba4bad91286b78b498547de928078f55da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:39:05 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:39:05 +0000 Subject: [issue26184] Add versionchanged note for error when create_module() is not defined by loaders In-Reply-To: <1453501860.77.0.669534801782.issue26184@psf.upfronthosting.co.za> Message-ID: <1490398745.6.0.121910082167.issue26184@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 7e4897a2fb91e49f131a42ed6de88b5185f7dea8 by Mariatta in branch '3.6': bpo-26184: import.rst: Improve versionchanged note (GH-325) (GH-326) https://github.com/python/cpython/commit/7e4897a2fb91e49f131a42ed6de88b5185f7dea8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:39:23 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:39:23 +0000 Subject: [issue26184] Add versionchanged note for error when create_module() is not defined by loaders In-Reply-To: <1453501860.77.0.669534801782.issue26184@psf.upfronthosting.co.za> Message-ID: <1490398763.67.0.993562014095.issue26184@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 1f5639c77f736c18fb5a85b4a1850121e25c788e by Mariatta in branch 'master': bpo-26184: import.rst: Improve versionchanged note (GH-325) https://github.com/python/cpython/commit/1f5639c77f736c18fb5a85b4a1850121e25c788e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:39:36 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 23:39:36 +0000 Subject: [issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file. In-Reply-To: <1483059317.41.0.849254662988.issue29110@psf.upfronthosting.co.za> Message-ID: <1490398776.16.0.0737666565926.issue29110@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset c9131b61fa060a51ec181053cade9f0a7ee91e4f by INADA Naoki in branch '3.6': [3.6] bpo-29110: Fix file object leak in `aifc.open` (#310) https://github.com/python/cpython/commit/c9131b61fa060a51ec181053cade9f0a7ee91e4f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:39:42 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 23:39:42 +0000 Subject: [issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file. In-Reply-To: <1483059317.41.0.849254662988.issue29110@psf.upfronthosting.co.za> Message-ID: <1490398782.91.0.239456630403.issue29110@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset b7fb1e25c89a9eb85b95027f4167bc0977687c43 by INADA Naoki in branch '3.5': bpo-29110: Fix file object leak in `aifc.open` (GH-311) https://github.com/python/cpython/commit/b7fb1e25c89a9eb85b95027f4167bc0977687c43 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:40:08 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:40:08 +0000 Subject: [issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike` In-Reply-To: <1487418512.16.0.401961352482.issue28624@psf.upfronthosting.co.za> Message-ID: <1490398808.37.0.973126811927.issue28624@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 6b81003bdbd9375886bae54f876650bcdccfe6c7 by Berker Peksag in branch '3.6': bpo-28624: Add a test that checks that cwd parameter of Popen() accepts PathLike objects (#157) (#323) https://github.com/python/cpython/commit/6b81003bdbd9375886bae54f876650bcdccfe6c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:40:17 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:40:17 +0000 Subject: [issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike` In-Reply-To: <1487418512.16.0.401961352482.issue28624@psf.upfronthosting.co.za> Message-ID: <1490398817.65.0.0820823737097.issue28624@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset d5c11f7ace48701bb950c6345deee88c35c66e26 by Berker Peksag (Sayan Chowdhury) in branch 'master': bpo-28624: Add a test that checks that cwd parameter of Popen() accepts PathLike objects (#157) https://github.com/python/cpython/commit/d5c11f7ace48701bb950c6345deee88c35c66e26 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:40:26 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:40:26 +0000 Subject: [issue29121] sqlite3 Controlling Transactions documentation not updated In-Reply-To: <1483200295.1.0.801871810477.issue29121@psf.upfronthosting.co.za> Message-ID: <1490398826.61.0.962680955987.issue29121@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 893e86e9d3c0caeb878ccb1120c7259e022f3b68 by Berker Peksag in branch '3.6': bpo-29121: Remove outdated documentation about transactions (#313) (#319) https://github.com/python/cpython/commit/893e86e9d3c0caeb878ccb1120c7259e022f3b68 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:40:36 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:40:36 +0000 Subject: [issue28518] execute("begin immediate") throwing OperationalError In-Reply-To: <1477307118.31.0.70785963389.issue28518@psf.upfronthosting.co.za> Message-ID: <1490398836.54.0.586650957605.issue28518@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 76995cab69d5ef83d31d8a5754cbad11be4038cb by Berker Peksag in branch '3.6': bpo-28518: Start a transaction implicitly before a DML statement (#245) (#318) https://github.com/python/cpython/commit/76995cab69d5ef83d31d8a5754cbad11be4038cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:40:43 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:40:43 +0000 Subject: [issue26184] Add versionchanged note for error when create_module() is not defined by loaders In-Reply-To: <1453501860.77.0.669534801782.issue26184@psf.upfronthosting.co.za> Message-ID: <1490398843.05.0.24924155519.issue26184@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset deea29e61e61f0e216bff3f0ca008f5ee231793f by Mariatta in branch '3.6': bpo-26184: import.rst: Improve versionchanged note (GH-277) (#320) https://github.com/python/cpython/commit/deea29e61e61f0e216bff3f0ca008f5ee231793f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:40:48 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:40:48 +0000 Subject: [issue22594] Add a link to the regex module in re documentation In-Reply-To: <1412927285.57.0.392292696343.issue22594@psf.upfronthosting.co.za> Message-ID: <1490398848.53.0.172200969575.issue22594@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset c8e20218d77c5b8c16fd76d45612ae48ca3fba91 by Mariatta in branch '2.7': bpo-22594: Add a link to the regex module in re documentation (GH-241) (GH-321) https://github.com/python/cpython/commit/c8e20218d77c5b8c16fd76d45612ae48ca3fba91 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:40:59 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:40:59 +0000 Subject: [issue22594] Add a link to the regex module in re documentation In-Reply-To: <1412927285.57.0.392292696343.issue22594@psf.upfronthosting.co.za> Message-ID: <1490398859.13.0.936956413544.issue22594@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 21c697fd1073d6ab59e2ba82ea80bc81b9c4125c by Mariatta in branch '3.5': bpo-22594: Add a link to the regex module in re documentation (GH-241) (GH-317) https://github.com/python/cpython/commit/21c697fd1073d6ab59e2ba82ea80bc81b9c4125c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:41:09 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:41:09 +0000 Subject: [issue22594] Add a link to the regex module in re documentation In-Reply-To: <1412927285.57.0.392292696343.issue22594@psf.upfronthosting.co.za> Message-ID: <1490398869.54.0.0738158278654.issue22594@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 1457984c003b1e461f8aab93bfc37fd8e42312d5 by Mariatta in branch '3.6': bpo-22594: Add a link to the regex module in re documentation (GH-241) (GH-316) https://github.com/python/cpython/commit/1457984c003b1e461f8aab93bfc37fd8e42312d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:41:21 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:41:21 +0000 Subject: [issue29648] Missed reference to create_module() in versionadded (import.rst) In-Reply-To: <1488021728.97.0.531293750465.issue29648@psf.upfronthosting.co.za> Message-ID: <1490398881.51.0.233815443491.issue29648@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 63ed9bc94d8df45b16aee9b92f658ebb34aa1012 by Mariatta in branch '3.5': bpo-29648: import.rst: Add reference to create_module() (GH-290) (GH-315) https://github.com/python/cpython/commit/63ed9bc94d8df45b16aee9b92f658ebb34aa1012 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:41:35 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:41:35 +0000 Subject: [issue26184] Add versionchanged note for error when create_module() is not defined by loaders In-Reply-To: <1453501860.77.0.669534801782.issue26184@psf.upfronthosting.co.za> Message-ID: <1490398895.62.0.133410407416.issue26184@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 6b4a5f45e2df524174a97832571c82c76a3d424a by Mariatta in branch 'master': bpo-26184: import.rst: Improve versionchanged note (GH-277) https://github.com/python/cpython/commit/6b4a5f45e2df524174a97832571c82c76a3d424a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:41:42 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:41:42 +0000 Subject: [issue29648] Missed reference to create_module() in versionadded (import.rst) In-Reply-To: <1488021728.97.0.531293750465.issue29648@psf.upfronthosting.co.za> Message-ID: <1490398902.79.0.185274104265.issue29648@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 7333d1760e12cf27bcf63265f72521892285c10a by Mariatta in branch '3.6': bpo-29648: import.rst: Add reference to create_module() (GH-290) (GH-314) https://github.com/python/cpython/commit/7333d1760e12cf27bcf63265f72521892285c10a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:41:50 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:41:50 +0000 Subject: [issue29121] sqlite3 Controlling Transactions documentation not updated In-Reply-To: <1483200295.1.0.801871810477.issue29121@psf.upfronthosting.co.za> Message-ID: <1490398910.42.0.697889012225.issue29121@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset fe70d924bb6106d4c21eb414f4a1ba1324e8f46a by Berker Peksag in branch 'master': bpo-29121: Remove outdated documentation about transactions (#313) https://github.com/python/cpython/commit/fe70d924bb6106d4c21eb414f4a1ba1324e8f46a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:41:51 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:41:51 +0000 Subject: [issue29121] sqlite3 Controlling Transactions documentation not updated In-Reply-To: <1483200295.1.0.801871810477.issue29121@psf.upfronthosting.co.za> Message-ID: <1490398911.2.0.165347420713.issue29121@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset fe70d924bb6106d4c21eb414f4a1ba1324e8f46a by Berker Peksag in branch 'master': bpo-29121: Remove outdated documentation about transactions (#313) https://github.com/python/cpython/commit/fe70d924bb6106d4c21eb414f4a1ba1324e8f46a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:42:01 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:42:01 +0000 Subject: [issue22594] Add a link to the regex module in re documentation In-Reply-To: <1412927285.57.0.392292696343.issue22594@psf.upfronthosting.co.za> Message-ID: <1490398921.51.0.0458829774042.issue22594@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset ed6795e46f7653e23b862efad240a93453e7df97 by Mariatta (Marco Buttu) in branch 'master': bpo-22594: Add a link to the regex module in re documentation (GH-241) https://github.com/python/cpython/commit/ed6795e46f7653e23b862efad240a93453e7df97 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:42:13 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:42:13 +0000 Subject: [issue28518] execute("begin immediate") throwing OperationalError In-Reply-To: <1477307118.31.0.70785963389.issue28518@psf.upfronthosting.co.za> Message-ID: <1490398933.26.0.633331811793.issue28518@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 4a926caf8e5fd8af771b2c34bfb6e91c732331fe by Berker Peksag in branch 'master': bpo-28518: Start a transaction implicitly before a DML statement (#245) https://github.com/python/cpython/commit/4a926caf8e5fd8af771b2c34bfb6e91c732331fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:42:22 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:42:22 +0000 Subject: [issue29648] Missed reference to create_module() in versionadded (import.rst) In-Reply-To: <1488021728.97.0.531293750465.issue29648@psf.upfronthosting.co.za> Message-ID: <1490398942.36.0.356628095289.issue29648@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 46ce7599af82a929506baeaaee5c149970440c4c by Mariatta (Marco Buttu) in branch 'master': bpo-29648: import.rst: Add reference to create_module() (GH-290) https://github.com/python/cpython/commit/46ce7599af82a929506baeaaee5c149970440c4c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:42:40 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:42:40 +0000 Subject: [issue28961] unittest.mock._Call ignores `name` parameter In-Reply-To: <1481636868.17.0.0411235027553.issue28961@psf.upfronthosting.co.za> Message-ID: <1490398960.76.0.697227862397.issue28961@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset fae59e1aa87ee9598d032e0bd697969a5784025f by Berker Peksag in branch '3.6': bpo-28961: Address my comments from earlier code review (#306) https://github.com/python/cpython/commit/fae59e1aa87ee9598d032e0bd697969a5784025f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:42:56 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 23:42:56 +0000 Subject: [issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file. In-Reply-To: <1483059317.41.0.849254662988.issue29110@psf.upfronthosting.co.za> Message-ID: <1490398976.95.0.85707797857.issue29110@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 5dc33eea538361f8a218255f83db2e9298dd8c53 by INADA Naoki in branch 'master': bpo-29110: add test for Aifc_write. (GH-293) https://github.com/python/cpython/commit/5dc33eea538361f8a218255f83db2e9298dd8c53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:43:06 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 24 Mar 2017 23:43:06 +0000 Subject: [issue28961] unittest.mock._Call ignores `name` parameter In-Reply-To: <1481636868.17.0.0411235027553.issue28961@psf.upfronthosting.co.za> Message-ID: <1490398986.41.0.518825213555.issue28961@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 5aa3856b4f325457e8ec1ccf669369f543e1f6b5 by Berker Peksag in branch 'master': bpo-28961: Address my comments from earlier code review (#305) https://github.com/python/cpython/commit/5aa3856b4f325457e8ec1ccf669369f543e1f6b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:43:29 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:43:29 +0000 Subject: [issue28929] Provide a link from documentation back to its source file In-Reply-To: <1481331536.86.0.539237207001.issue28929@psf.upfronthosting.co.za> Message-ID: <1490399009.9.0.399640670065.issue28929@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 23d2c31cbf3032b8c6bb254f06c4532a6db466b6 by Mariatta in branch '2.7': [2.7] bpo-28929: Add to Misc/NEWS (GH-286) https://github.com/python/cpython/commit/23d2c31cbf3032b8c6bb254f06c4532a6db466b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:43:39 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:43:39 +0000 Subject: [issue28929] Provide a link from documentation back to its source file In-Reply-To: <1481331536.86.0.539237207001.issue28929@psf.upfronthosting.co.za> Message-ID: <1490399019.61.0.323218343695.issue28929@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 5023686f7ee69e9da07cda4b7da6691f19892111 by Mariatta in branch '3.5': [3.5] bpo-28929: Add to Misc/NEWS (GH-285) https://github.com/python/cpython/commit/5023686f7ee69e9da07cda4b7da6691f19892111 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:43:48 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:43:48 +0000 Subject: [issue28929] Provide a link from documentation back to its source file In-Reply-To: <1481331536.86.0.539237207001.issue28929@psf.upfronthosting.co.za> Message-ID: <1490399028.32.0.167067617446.issue28929@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 1a8dd944d4016593e78a7a6c3c635adee783abfd by Mariatta in branch '3.6': [3.6] bpo-28929: Add to Misc/NEWS (GH-284) https://github.com/python/cpython/commit/1a8dd944d4016593e78a7a6c3c635adee783abfd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:45:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 23:45:06 +0000 Subject: [issue29655] Certain errors during IMPORT_STAR can leak a reference In-Reply-To: <1488058013.56.0.788869646449.issue29655@psf.upfronthosting.co.za> Message-ID: <1490399106.83.0.487082511621.issue29655@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 160edb43571311a3785785c1dfa784afc52d87be by Serhiy Storchaka (Matthias Bussonnier) in branch 'master': bpo-29655: Fixed possible reference leaks in `import *`. (#301) https://github.com/python/cpython/commit/160edb43571311a3785785c1dfa784afc52d87be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:46:03 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 23:46:03 +0000 Subject: [issue26128] Let the subprocess.STARTUPINFO constructor take arguments In-Reply-To: <1452887119.07.0.716350004713.issue26128@psf.upfronthosting.co.za> Message-ID: <1490399163.15.0.706894934827.issue26128@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset ae160bba2030a7b6c86f6c7aeaf2f9d3fdb627b7 by Nick Coghlan (Subhendu Ghosh) in branch 'master': bpo-26128: Added __init__to subprocess.STARTUPINFO (#171) https://github.com/python/cpython/commit/ae160bba2030a7b6c86f6c7aeaf2f9d3fdb627b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:46:14 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 23:46:14 +0000 Subject: [issue24241] webbrowser default browser detection and/or public API for _trylist. In-Reply-To: <1432042982.05.0.828874094042.issue24241@psf.upfronthosting.co.za> Message-ID: <1490399174.14.0.399313171202.issue24241@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 56a8eccc43c66ae51c5a6bfc89635b1998fd419e by Nick Coghlan in branch 'master': bpo-24241: Add dedicated webbrowser.register test case (#288) https://github.com/python/cpython/commit/56a8eccc43c66ae51c5a6bfc89635b1998fd419e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:46:20 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 23:46:20 +0000 Subject: [issue29644] Importing webbrowser outputs a message on stderr In-Reply-To: <1488002349.82.0.416904492527.issue29644@psf.upfronthosting.co.za> Message-ID: <1490399180.63.0.870814351935.issue29644@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 140792bd514ee4ba739fda899785bea3ce746f05 by Nick Coghlan in branch 'master': bpo-29644: suppress subprocess output from webbrowser (#289) https://github.com/python/cpython/commit/140792bd514ee4ba739fda899785bea3ce746f05 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:46:26 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 23:46:26 +0000 Subject: [issue16285] Update urllib quoting to RFC 3986 In-Reply-To: <1350644168.93.0.364254038155.issue16285@psf.upfronthosting.co.za> Message-ID: <1490399186.97.0.299604258778.issue16285@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 21024f06622c4c55b666adb130797a4ee205d005 by Nick Coghlan (Ratnadeep Debnath) in branch 'master': bpo-16285: Update urllib quoting to RFC 3986 (#173) https://github.com/python/cpython/commit/21024f06622c4c55b666adb130797a4ee205d005 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:46:59 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 23:46:59 +0000 Subject: [issue24241] webbrowser default browser detection and/or public API for _trylist. In-Reply-To: <1432042982.05.0.828874094042.issue24241@psf.upfronthosting.co.za> Message-ID: <1490399219.84.0.510456520296.issue24241@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset e3ce69522ffd7c0354d6e70d18f42bce325ed97e by Nick Coghlan (David Steele) in branch 'master': bpo-24241: Improve preferred webbrowser handling (#85) https://github.com/python/cpython/commit/e3ce69522ffd7c0354d6e70d18f42bce325ed97e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:47:13 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:47:13 +0000 Subject: [issue28929] Provide a link from documentation back to its source file In-Reply-To: <1481331536.86.0.539237207001.issue28929@psf.upfronthosting.co.za> Message-ID: <1490399233.12.0.329475190696.issue28929@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset e3bf4cdd3db9004220d3ec7f5db4e7d16a99c743 by Mariatta in branch 'master': bpo-28929: Add to Misc/NEWS (GH-112) https://github.com/python/cpython/commit/e3bf4cdd3db9004220d3ec7f5db4e7d16a99c743 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:47:21 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:47:21 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1490399241.56.0.453986122095.issue28556@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset bc33cd4e7a36ed4c309807ca9a911ef955582710 by Mariatta in branch '3.5': [3.5] bpo-28556: Update to typing: treat subscripted generics as proxies (GH-265) (GH-269) https://github.com/python/cpython/commit/bc33cd4e7a36ed4c309807ca9a911ef955582710 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:47:29 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:47:29 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1490399249.92.0.166782370019.issue28556@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset bea9d2f6488f01794098d9fd4710b98df1bd9472 by Mariatta in branch '3.6': [3.6] bpo-28556: Update to typing: treat subscripted generics as proxies (GH-265) (GH-268) https://github.com/python/cpython/commit/bea9d2f6488f01794098d9fd4710b98df1bd9472 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:47:46 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 24 Mar 2017 23:47:46 +0000 Subject: [issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat) In-Reply-To: <1441472893.95.0.412611892234.issue25008@psf.upfronthosting.co.za> Message-ID: <1490399266.83.0.680700366422.issue25008@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 66b5092fac4264efdc9c508a7dd425fa9833e147 by Barry Warsaw in branch '3.5': bpo-25008: Deprecate smtpd and point to aiosmtpd (#274) (#279) https://github.com/python/cpython/commit/66b5092fac4264efdc9c508a7dd425fa9833e147 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:47:53 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 24 Mar 2017 23:47:53 +0000 Subject: [issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat) In-Reply-To: <1441472893.95.0.412611892234.issue25008@psf.upfronthosting.co.za> Message-ID: <1490399273.98.0.965568867659.issue25008@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 0a1b656d8ce3da14f8acf947477b8e998e68ef3b by Barry Warsaw in branch '3.6': bpo-25008: Deprecate smtpd and point to aiosmtpd (#274) (#278) https://github.com/python/cpython/commit/0a1b656d8ce3da14f8acf947477b8e998e68ef3b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:48:02 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 24 Mar 2017 23:48:02 +0000 Subject: [issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat) In-Reply-To: <1441472893.95.0.412611892234.issue25008@psf.upfronthosting.co.za> Message-ID: <1490399282.32.0.412319311418.issue25008@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset f37b0cb230069481609b0bb06891b5dd26320504 by Barry Warsaw in branch '3.4': bpo-25008: Deprecate smtpd and point to aiosmtpd (#274) (#280) https://github.com/python/cpython/commit/f37b0cb230069481609b0bb06891b5dd26320504 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:48:32 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 24 Mar 2017 23:48:32 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1490399312.1.0.643886117832.issue28556@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 365cb5bb9069273e6970c9d5d17ee2fe5003e7ac by Mariatta (Ivan Levkivskyi) in branch 'master': bpo-28556: Fix regression that sneaked into recent typing updates (GH-270) https://github.com/python/cpython/commit/365cb5bb9069273e6970c9d5d17ee2fe5003e7ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:48:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 23:48:17 +0000 Subject: [issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat) In-Reply-To: <1441472893.95.0.412611892234.issue25008@psf.upfronthosting.co.za> Message-ID: <1490399297.03.0.319865189151.issue25008@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fba79dc568030091f84110fccac4cb64c2fef020 by Victor Stinner (Barry Warsaw) in branch 'master': bpo-25008: Deprecate smtpd and point to aiosmtpd (#274) https://github.com/python/cpython/commit/fba79dc568030091f84110fccac4cb64c2fef020 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:48:44 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 24 Mar 2017 23:48:44 +0000 Subject: [issue27788] platform module's version number doesn't match its docstring In-Reply-To: <1471450258.8.0.170997912559.issue27788@psf.upfronthosting.co.za> Message-ID: <1490399324.95.0.064322548296.issue27788@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: New changeset 6059ce45aa96f52fa0150e68ea655fbfdc25609a by Marc-Andre Lemburg (Matthias Bussonnier) in branch 'master': bpo-27788 : synchronise platform.py version number (#246) https://github.com/python/cpython/commit/6059ce45aa96f52fa0150e68ea655fbfdc25609a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:49:05 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 23:49:05 +0000 Subject: [issue29637] ast.get_docstring(): AttributeError: 'NoneType' object has no attribute 'expandtabs' In-Reply-To: <1487886611.55.0.299835659711.issue29637@psf.upfronthosting.co.za> Message-ID: <1490399345.03.0.0784267610692.issue29637@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 41cea70aa38de50c1d714209aa2b7694d86a7e0c by INADA Naoki (Matthias Bussonnier) in branch 'master': bpo-29637: clean docstring only if not None (GH-267) https://github.com/python/cpython/commit/41cea70aa38de50c1d714209aa2b7694d86a7e0c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:49:14 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 24 Mar 2017 23:49:14 +0000 Subject: [issue29634] Reduce deque repeat execution when maxlen exist and size is not 1 In-Reply-To: <1487867963.03.0.590116533592.issue29634@psf.upfronthosting.co.za> Message-ID: <1490399354.33.0.940465287712.issue29634@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 357bad7101df196d7f4ea3dc6ed9a6436afb022c by Raymond Hettinger (Louie Lu) in branch 'master': bpo-29634: Reduce deque repeat execution when maxlen exist and size is not 1 (#255) (#255) https://github.com/python/cpython/commit/357bad7101df196d7f4ea3dc6ed9a6436afb022c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:49:30 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 Mar 2017 23:49:30 +0000 Subject: [issue29624] Python 3.5.3 x86 web installer cannot install launcher In-Reply-To: <1487791228.05.0.472749683063.issue29624@psf.upfronthosting.co.za> Message-ID: <1490399370.79.0.149891660062.issue29624@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset e29741466df0cd01a49bf5ec3b1df3e2bad119a7 by Steve Dower in branch '3.5': bpo-29624: Adds purge step and layout test after uploading files. (#258) (#263) https://github.com/python/cpython/commit/e29741466df0cd01a49bf5ec3b1df3e2bad119a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:49:37 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 Mar 2017 23:49:37 +0000 Subject: [issue29624] Python 3.5.3 x86 web installer cannot install launcher In-Reply-To: <1487791228.05.0.472749683063.issue29624@psf.upfronthosting.co.za> Message-ID: <1490399377.38.0.400838108772.issue29624@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset f2beceb7e54fadc507137f86cbe9d74f7e5b8f7c by Steve Dower in branch '3.6': bpo-29624: Adds purge step and layout test after uploading files. (#258) (#264) https://github.com/python/cpython/commit/f2beceb7e54fadc507137f86cbe9d74f7e5b8f7c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:49:47 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 24 Mar 2017 23:49:47 +0000 Subject: [issue29624] Python 3.5.3 x86 web installer cannot install launcher In-Reply-To: <1487791228.05.0.472749683063.issue29624@psf.upfronthosting.co.za> Message-ID: <1490399387.03.0.95564307481.issue29624@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 1aceb024172ea3d6f9dd6e90f4fbe63ea1fb054e by Steve Dower in branch 'master': bpo-29624: Adds purge step and layout test after uploading files. (#258) https://github.com/python/cpython/commit/1aceb024172ea3d6f9dd6e90f4fbe63ea1fb054e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:50:02 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 23:50:02 +0000 Subject: [issue29463] Add `docstring` field to AST nodes In-Reply-To: <1486390876.35.0.496966996959.issue29463@psf.upfronthosting.co.za> Message-ID: <1490399402.75.0.200045742404.issue29463@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 4c78c527d215c37472145152cb0e95f196cdddc9 by INADA Naoki in branch 'master': bpo-29622: Make AST constructor to accept less than enough number of positional arguments (GH-249) https://github.com/python/cpython/commit/4c78c527d215c37472145152cb0e95f196cdddc9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:50:02 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 24 Mar 2017 23:50:02 +0000 Subject: [issue29622] ast module doesn't support optional fields of Parser/Python.asdl In-Reply-To: <1487782112.74.0.332451655516.issue29622@psf.upfronthosting.co.za> Message-ID: <1490399402.86.0.0193677953597.issue29622@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 4c78c527d215c37472145152cb0e95f196cdddc9 by INADA Naoki in branch 'master': bpo-29622: Make AST constructor to accept less than enough number of positional arguments (GH-249) https://github.com/python/cpython/commit/4c78c527d215c37472145152cb0e95f196cdddc9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:50:19 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 23:50:19 +0000 Subject: [issue28814] Deprecation notice on inspect.getargvalues() is incorrect In-Reply-To: <1480252052.94.0.16018093739.issue28814@psf.upfronthosting.co.za> Message-ID: <1490399419.16.0.0976140892072.issue28814@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 0246422b974b1a0c50dd30b0e1a1138674ef87a5 by Nick Coghlan (Berker Peksag) in branch '3.5': bpo-28814: Undeprecate inadvertently deprecated inspect functions. (#122) (#244) https://github.com/python/cpython/commit/0246422b974b1a0c50dd30b0e1a1138674ef87a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:50:19 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 23:50:19 +0000 Subject: [issue20438] inspect: Deprecate getfullargspec? In-Reply-To: <1391014813.06.0.594760406572.issue20438@psf.upfronthosting.co.za> Message-ID: <1490399419.29.0.0239545377268.issue20438@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 0246422b974b1a0c50dd30b0e1a1138674ef87a5 by Nick Coghlan (Berker Peksag) in branch '3.5': bpo-28814: Undeprecate inadvertently deprecated inspect functions. (#122) (#244) https://github.com/python/cpython/commit/0246422b974b1a0c50dd30b0e1a1138674ef87a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:50:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 23:50:25 +0000 Subject: [issue28911] Clarify the behaviour of assert_called_once_with In-Reply-To: <1481233700.68.0.637550951007.issue28911@psf.upfronthosting.co.za> Message-ID: <1490399425.91.0.867185437423.issue28911@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fa30453568ae71861aa1928373bd76da4f3a33f6 by Victor Stinner (Arne de Laat) in branch '3.5': bpo-28911: Clarify the behaviour of assert_called_once_with. (#254) https://github.com/python/cpython/commit/fa30453568ae71861aa1928373bd76da4f3a33f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:50:35 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 23:50:35 +0000 Subject: [issue28814] Deprecation notice on inspect.getargvalues() is incorrect In-Reply-To: <1480252052.94.0.16018093739.issue28814@psf.upfronthosting.co.za> Message-ID: <1490399435.83.0.794992762095.issue28814@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 2197eac6104311472f200645bc844adb46444b10 by Nick Coghlan (Berker Peksag) in branch '3.6': bpo-28814: Undeprecate inadvertently deprecated inspect functions. (#122) (#243) https://github.com/python/cpython/commit/2197eac6104311472f200645bc844adb46444b10 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:50:35 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 24 Mar 2017 23:50:35 +0000 Subject: [issue20438] inspect: Deprecate getfullargspec? In-Reply-To: <1391014813.06.0.594760406572.issue20438@psf.upfronthosting.co.za> Message-ID: <1490399435.97.0.817324654375.issue20438@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 2197eac6104311472f200645bc844adb46444b10 by Nick Coghlan (Berker Peksag) in branch '3.6': bpo-28814: Undeprecate inadvertently deprecated inspect functions. (#122) (#243) https://github.com/python/cpython/commit/2197eac6104311472f200645bc844adb46444b10 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:51:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 23:51:07 +0000 Subject: [issue28911] Clarify the behaviour of assert_called_once_with In-Reply-To: <1481233700.68.0.637550951007.issue28911@psf.upfronthosting.co.za> Message-ID: <1490399467.91.0.193545469587.issue28911@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 55b82e10dc6b75b30a72fa56beb60eaf54a008d4 by Victor Stinner (Arne de Laat) in branch '3.6': bpo-28911: Clarify the behaviour of assert_called_once_with. (#252) https://github.com/python/cpython/commit/55b82e10dc6b75b30a72fa56beb60eaf54a008d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:51:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 23:51:15 +0000 Subject: [issue28911] Clarify the behaviour of assert_called_once_with In-Reply-To: <1481233700.68.0.637550951007.issue28911@psf.upfronthosting.co.za> Message-ID: <1490399475.31.0.143984865119.issue28911@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 324c5d8ca6ed1c964d3b20e5762139ec65c7827c by Victor Stinner (Arne de Laat) in branch 'master': bpo-28911: Clarify the behaviour of assert_called_once_with. (#251) https://github.com/python/cpython/commit/324c5d8ca6ed1c964d3b20e5762139ec65c7827c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:51:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Mar 2017 23:51:29 +0000 Subject: [issue28598] RHS not consulted in `str % subclass_of_str` case. In-Reply-To: <1478180164.76.0.63576586286.issue28598@psf.upfronthosting.co.za> Message-ID: <1490399489.28.0.335064259984.issue28598@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d7e64337ef45085792b382a09f5b3a45d3687c8c by Serhiy Storchaka (Martijn Pieters) in branch 'master': bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations (#51) https://github.com/python/cpython/commit/d7e64337ef45085792b382a09f5b3a45d3687c8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:51:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Mar 2017 23:51:54 +0000 Subject: [issue29463] Add `docstring` field to AST nodes In-Reply-To: <1486390876.35.0.496966996959.issue29463@psf.upfronthosting.co.za> Message-ID: <1490399514.91.0.424186927856.issue29463@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset cb41b2766de646435743b6af7dd152751b54e73f by Victor Stinner (INADA Naoki) in branch 'master': bpo-29463: Add docstring field to some AST nodes. (#46) https://github.com/python/cpython/commit/cb41b2766de646435743b6af7dd152751b54e73f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 19:52:03 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 24 Mar 2017 23:52:03 +0000 Subject: [issue29546] A more helpful ImportError message In-Reply-To: <1487003411.13.0.404377957211.issue29546@psf.upfronthosting.co.za> Message-ID: <1490399523.45.0.801901560053.issue29546@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 1bc156430bad8177b5beecf57979628c1d071230 by Barry Warsaw (Matthias Bussonnier) in branch 'master': bpo-29546: Improve from-import error message with location (#103) https://github.com/python/cpython/commit/1bc156430bad8177b5beecf57979628c1d071230 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:07:39 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 00:07:39 +0000 Subject: [issue29521] Minor warning messages when compiling documentation In-Reply-To: <1486714459.11.0.428886237265.issue29521@psf.upfronthosting.co.za> Message-ID: <1490400459.06.0.671261444426.issue29521@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset db3deb98e969d3f43b169cd320abd46b21a10c6d by Mariatta in branch '3.6': bpo-29521 Fix two minor documentation build warnings (#41) (#83) https://github.com/python/cpython/commit/db3deb98e969d3f43b169cd320abd46b21a10c6d ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:08:10 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 00:08:10 +0000 Subject: [issue29521] Minor warning messages when compiling documentation In-Reply-To: <1486714459.11.0.428886237265.issue29521@psf.upfronthosting.co.za> Message-ID: <1490400490.27.0.877930467474.issue29521@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 38c8354f3204441f6c6bd22213b449d2d8954fcc by Mariatta in branch '3.5': bpo-29521 Fix two minor documentation build warnings (#41) (#84) https://github.com/python/cpython/commit/38c8354f3204441f6c6bd22213b449d2d8954fcc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:11:19 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 00:11:19 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1490400679.29.0.420800228442.issue28556@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 0230e64d2c976ab755c145e97bf86032e0fe3a53 by Mariatta in branch '3.6': bpo-28556: Various updates to typing (#28) (#77) https://github.com/python/cpython/commit/0230e64d2c976ab755c145e97bf86032e0fe3a53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:16:06 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 00:16:06 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1490400966.37.0.321919655603.issue28556@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 9c5684e0d380cf5bc109888603756084588ce617 by Mariatta in branch '3.5': bpo-28556: Various updates to typing (#28) (#78) https://github.com/python/cpython/commit/9c5684e0d380cf5bc109888603756084588ce617 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:16:27 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 00:16:27 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1490400987.69.0.347854190612.issue28556@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset b692dc8475a032740576129d0990ddc3edccab2b by Mariatta (Ivan Levkivskyi) in branch 'master': bpo-28556: Various updates to typing (#28) https://github.com/python/cpython/commit/b692dc8475a032740576129d0990ddc3edccab2b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:18:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 Mar 2017 00:18:25 +0000 Subject: [issue29521] Minor warning messages when compiling documentation In-Reply-To: <1486714459.11.0.428886237265.issue29521@psf.upfronthosting.co.za> Message-ID: <1490401105.67.0.367109668897.issue29521@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2b501866ed493758e4c4b29f0ce9b24023d910a1 by Victor Stinner in branch 'master': Travis CI: run rstlint.py in the docs job (#68) https://github.com/python/cpython/commit/2b501866ed493758e4c4b29f0ce9b24023d910a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:18:52 2017 From: report at bugs.python.org (Brian Curtin) Date: Sat, 25 Mar 2017 00:18:52 +0000 Subject: [issue29521] Minor warning messages when compiling documentation In-Reply-To: <1486714459.11.0.428886237265.issue29521@psf.upfronthosting.co.za> Message-ID: <1490401132.32.0.530922077018.issue29521@psf.upfronthosting.co.za> Brian Curtin added the comment: New changeset 3d707be950b387552585451071928e7b39cdfa53 by Brian Curtin (Jim DeLaHunt) in branch 'master': bpo-29521 Fix two minor documentation build warnings (#41) https://github.com/python/cpython/commit/3d707be950b387552585451071928e7b39cdfa53 ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:21:01 2017 From: report at bugs.python.org (INADA Naoki) Date: Sat, 25 Mar 2017 00:21:01 +0000 Subject: [issue29438] use after free in key sharing dict In-Reply-To: <1486169576.7.0.502230969893.issue29438@psf.upfronthosting.co.za> Message-ID: <1490401261.18.0.731873997578.issue29438@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 89ddffbe9dcb38b79f99563b0d4d594d1105a192 by INADA Naoki in branch '3.6': bpo-29438: fixed use-after-free in key sharing dict (#39) https://github.com/python/cpython/commit/89ddffbe9dcb38b79f99563b0d4d594d1105a192 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:21:22 2017 From: report at bugs.python.org (INADA Naoki) Date: Sat, 25 Mar 2017 00:21:22 +0000 Subject: [issue29438] use after free in key sharing dict In-Reply-To: <1486169576.7.0.502230969893.issue29438@psf.upfronthosting.co.za> Message-ID: <1490401282.92.0.508610470418.issue29438@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 06a4fcb2458c5904968b5c8fe6b64940ba83a50d by INADA Naoki in branch '3.5': bpo-29438: Fixed use-after-free in key sharing dict (#40) https://github.com/python/cpython/commit/06a4fcb2458c5904968b5c8fe6b64940ba83a50d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:22:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 Mar 2017 00:22:03 +0000 Subject: [issue29176] /tmp does not exist on Android and is used by curses.window.putwin() In-Reply-To: <1483699620.77.0.827616599041.issue29176@psf.upfronthosting.co.za> Message-ID: <1490401323.52.0.191339226726.issue29176@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 61e2bc74dfab1ceee332d3f480dcf86c478c87c5 by Victor Stinner in branch 'master': bpo-29176: Fix name of the _curses.window class (#52) https://github.com/python/cpython/commit/61e2bc74dfab1ceee332d3f480dcf86c478c87c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:22:34 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 00:22:34 +0000 Subject: [issue28929] Provide a link from documentation back to its source file In-Reply-To: <1481331536.86.0.539237207001.issue28929@psf.upfronthosting.co.za> Message-ID: <1490401354.05.0.983152188836.issue28929@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset f66c81ff499fb431e56bc68f5e39c2f7b9fcb6a7 by Mariatta in branch '3.6': [backport to 3.6] bpo-28929: Link the documentation to its source file on GitHub (#37) https://github.com/python/cpython/commit/f66c81ff499fb431e56bc68f5e39c2f7b9fcb6a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:23:03 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 00:23:03 +0000 Subject: [issue28929] Provide a link from documentation back to its source file In-Reply-To: <1481331536.86.0.539237207001.issue28929@psf.upfronthosting.co.za> Message-ID: <1490401383.11.0.440434999267.issue28929@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset d4a97d894859d4bb52937d46460049ba016e00b2 by Mariatta in branch 'master': bpo-28929: Link the documentation to its source file on GitHub (#35) https://github.com/python/cpython/commit/d4a97d894859d4bb52937d46460049ba016e00b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:23:29 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 00:23:29 +0000 Subject: [issue28929] Provide a link from documentation back to its source file In-Reply-To: <1481331536.86.0.539237207001.issue28929@psf.upfronthosting.co.za> Message-ID: <1490401409.04.0.652246798945.issue28929@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset e15259c2dfef58df5f7cfa2305811a00c05e0353 by Mariatta in branch '2.7': bpo-28929: Link the documentation to its source file on GitHub (#38) https://github.com/python/cpython/commit/e15259c2dfef58df5f7cfa2305811a00c05e0353 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:24:59 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 00:24:59 +0000 Subject: [issue28929] Provide a link from documentation back to its source file In-Reply-To: <1481331536.86.0.539237207001.issue28929@psf.upfronthosting.co.za> Message-ID: <1490401499.27.0.919024961072.issue28929@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset cabd1c7462ef991937e0e759b9bf307b3091ef06 by Mariatta in branch '3.5': [backport to 3.5] bpo-28929: Link the documentation to its source file on GitHub (#36) https://github.com/python/cpython/commit/cabd1c7462ef991937e0e759b9bf307b3091ef06 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:25:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 Mar 2017 00:25:55 +0000 Subject: [issue29524] Move functions to call objects into a new Objects/call.c file In-Reply-To: <1486730559.24.0.70996002415.issue29524@psf.upfronthosting.co.za> Message-ID: <1490401555.32.0.399319494238.issue29524@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c22bfaae83ab5436d008ac0d13e7b47cbe776f08 by Victor Stinner in branch 'master': bpo-29524: Add Objects/call.c file (#12) https://github.com/python/cpython/commit/c22bfaae83ab5436d008ac0d13e7b47cbe776f08 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:27:25 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 00:27:25 +0000 Subject: [issue29474] Grammatical errors in weakref.WeakValueDictionary docs In-Reply-To: <1486483158.7.0.401706945265.issue29474@psf.upfronthosting.co.za> Message-ID: <1490401645.07.0.977545616049.issue29474@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 3110a379bbb1ec10a84d70a2f0faffcf8d22c7ed by Mariatta in branch 'master': bpo-29474: Improve documentation for weakref.WeakValueDictionary (#10) https://github.com/python/cpython/commit/3110a379bbb1ec10a84d70a2f0faffcf8d22c7ed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:27:40 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 25 Mar 2017 00:27:40 +0000 Subject: [issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression) In-Reply-To: <1464176880.25.0.308106356091.issue27122@psf.upfronthosting.co.za> Message-ID: <1490401660.49.0.66046796542.issue27122@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset c6d2f498142c29ed62241ab6d89cb7b5e38f2fca by Berker Peksag in branch '3.5': bpo-27122: Fix comment to point to correct issue number (#50) https://github.com/python/cpython/commit/c6d2f498142c29ed62241ab6d89cb7b5e38f2fca ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:27:54 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 00:27:54 +0000 Subject: [issue29474] Grammatical errors in weakref.WeakValueDictionary docs In-Reply-To: <1486483158.7.0.401706945265.issue29474@psf.upfronthosting.co.za> Message-ID: <1490401674.04.0.423648076796.issue29474@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 308f789d00735e6707dbc5c8f60a1c8cf245fb4b by Mariatta in branch '3.6': bpo-29474: Improve documentation for weakref.WeakValueDictionary (#22) https://github.com/python/cpython/commit/308f789d00735e6707dbc5c8f60a1c8cf245fb4b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:28:11 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 00:28:11 +0000 Subject: [issue29474] Grammatical errors in weakref.WeakValueDictionary docs In-Reply-To: <1486483158.7.0.401706945265.issue29474@psf.upfronthosting.co.za> Message-ID: <1490401691.13.0.336109132721.issue29474@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset ae828714ebdb7a0d69bf23c1f6d606e5e63bdcfe by Mariatta in branch '3.5': bpo-29474: Improve documentation for weakref.WeakValueDictionary (#23) https://github.com/python/cpython/commit/ae828714ebdb7a0d69bf23c1f6d606e5e63bdcfe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:28:27 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 25 Mar 2017 00:28:27 +0000 Subject: [issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression) In-Reply-To: <1464176880.25.0.308106356091.issue27122@psf.upfronthosting.co.za> Message-ID: <1490401707.0.0.691654678978.issue27122@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 89b1824e693419b20b6a9113e5293f1c1a78065f by Berker Peksag in branch '3.6': bpo-27122: Fix comment to point to correct issue number (#48) https://github.com/python/cpython/commit/89b1824e693419b20b6a9113e5293f1c1a78065f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:31:22 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 25 Mar 2017 00:31:22 +0000 Subject: [issue27122] Hang with contextlib.ExitStack and subprocess.Popen (regression) In-Reply-To: <1464176880.25.0.308106356091.issue27122@psf.upfronthosting.co.za> Message-ID: <1490401882.13.0.169625956325.issue27122@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset af88e7eda4101f36e904771d3cf59a5f740b3b00 by Berker Peksag (Nathaniel J. Smith) in branch 'master': bpo-27122: Fix comment to point to correct issue number (#47) https://github.com/python/cpython/commit/af88e7eda4101f36e904771d3cf59a5f740b3b00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:33:15 2017 From: report at bugs.python.org (INADA Naoki) Date: Sat, 25 Mar 2017 00:33:15 +0000 Subject: [issue29438] use after free in key sharing dict In-Reply-To: <1486169576.7.0.502230969893.issue29438@psf.upfronthosting.co.za> Message-ID: <1490401994.98.0.581323294406.issue29438@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 2294f3aee14a6074b17c67ef936c607430bb3c7a by INADA Naoki in branch 'master': bpo-29438: fixed use-after-free in key sharing dict (#17) https://github.com/python/cpython/commit/2294f3aee14a6074b17c67ef936c607430bb3c7a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:40:05 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 25 Mar 2017 00:40:05 +0000 Subject: [issue29095] Compiling Python 3.6 from source on MacOS X Sierra In-Reply-To: <1482955362.45.0.530145158959.issue29095@psf.upfronthosting.co.za> Message-ID: <1490402405.7.0.79238362856.issue29095@psf.upfronthosting.co.za> Ned Deily added the comment: @Tommy.Carstensen: Unfortunately, Apple has deprecated use of the system-supplied OpenSSL libraries and with the latest releases no longer supply the header files needed to build with them. They are very old anyway. So, you need to supply a version of them. The easiest way is to get them from a third-party package manager like Homebrew or MacPorts but you certainly can download an OpenSSL source release from https://www.openssl.org and build the libraries themselves. If you do not have administrator access, you will probably need to modify the OpenSSL build using at least --prefix to install to a non-system location and then rerun Python's ./configure with CFLAGS and LDFLAGS pointing to the installed location of your OpenSSL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:49:38 2017 From: report at bugs.python.org (Zachary Ware) Date: Sat, 25 Mar 2017 00:49:38 +0000 Subject: [issue29474] Grammatical errors in weakref.WeakValueDictionary docs In-Reply-To: <1486483158.7.0.401706945265.issue29474@psf.upfronthosting.co.za> Message-ID: <1490402978.96.0.619692933371.issue29474@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset 5c329882fa20f615375f068176e569de7389fa3f by Zachary Ware (Mariatta) in branch '2.7': bpo-29474: Improve documentation for weakref.WeakValueDictionary (#11) https://github.com/python/cpython/commit/5c329882fa20f615375f068176e569de7389fa3f ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:50:14 2017 From: report at bugs.python.org (Rajath Agasthya) Date: Sat, 25 Mar 2017 00:50:14 +0000 Subject: [issue29510] gitignore settings files for Eclipse IDE In-Reply-To: <1486628693.8.0.0671734505293.issue29510@psf.upfronthosting.co.za> Message-ID: <1490403014.87.0.315310467788.issue29510@psf.upfronthosting.co.za> Changes by Rajath Agasthya : ---------- pull_requests: +715 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:55:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 Mar 2017 00:55:00 +0000 Subject: [issue29528] Encrypt IRC channel details for Travis In-Reply-To: <1486771089.77.0.265289321985.issue29528@psf.upfronthosting.co.za> Message-ID: <1490403300.38.0.0310364725394.issue29528@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4538ddcacc8e8f00d5d36d7bc84e551a56ce6da2 by Victor Stinner (Donald Stufft) in branch 'master': Fix bpo-29528 Use a secure variable to stop spam (#13) https://github.com/python/cpython/commit/4538ddcacc8e8f00d5d36d7bc84e551a56ce6da2 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:55:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 Mar 2017 00:55:25 +0000 Subject: [issue29527] Travis: doc job is broken In-Reply-To: <1486770573.93.0.256816932878.issue29527@psf.upfronthosting.co.za> Message-ID: <1490403325.16.0.921444475717.issue29527@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 0d5f11061a873e9fb67ae59e46b3313e5ba22fc3 by Victor Stinner in branch 'master': Don't treat warnings as error in Travis docs job (#7) https://github.com/python/cpython/commit/0d5f11061a873e9fb67ae59e46b3313e5ba22fc3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 20:56:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 Mar 2017 00:56:35 +0000 Subject: [issue29527] Travis: doc job is broken In-Reply-To: <1486770573.93.0.256816932878.issue29527@psf.upfronthosting.co.za> Message-ID: <1490403395.77.0.642798415773.issue29527@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +716 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 21:01:46 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 25 Mar 2017 01:01:46 +0000 Subject: [issue29891] urllib.request.Request accepts but doesn't check bytes headers In-Reply-To: <1490306636.78.0.894703905259.issue29891@psf.upfronthosting.co.za> Message-ID: <1490403706.69.0.773089571878.issue29891@psf.upfronthosting.co.za> Martin Panter added the comment: If you enable BytesWarning (python -b) you do get an error: >>> urlopen(req, data) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/urllib/request.py", line 162, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.5/urllib/request.py", line 463, in open req = meth(req) File "/usr/lib/python3.5/urllib/request.py", line 1171, in do_request_ if not request.has_header('Content-type'): File "/usr/lib/python3.5/urllib/request.py", line 356, in has_header return (header_name in self.headers or BytesWarning: Comparison between bytes and string I believe the ?urllib.request? module is only written with text (str) field names in mind, not byte strings. Same for http.client.HTTPConnection.request(headers=...). But the lower-level HTTPConnection.putheader method has special code to handle byte strings: , although this is not documented either. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 21:22:15 2017 From: report at bugs.python.org (Tommy Carstensen) Date: Sat, 25 Mar 2017 01:22:15 +0000 Subject: [issue29095] Compiling Python 3.6 from source on MacOS X Sierra In-Reply-To: <1482955362.45.0.530145158959.issue29095@psf.upfronthosting.co.za> Message-ID: <1490404935.48.0.972040166626.issue29095@psf.upfronthosting.co.za> Tommy Carstensen added the comment: Thanks @ned.deily ! That did the trick for me! When installing openssl I just had to do ./config --prefix=/my/home/dir prior to doing make and make install. Then I just did two commands prior to installing python3.6: export CFLAGS="-I/my/home/dir/include" export LDFLAGS="-L/my/home/dir/lib" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 22:55:11 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 02:55:11 +0000 Subject: [issue29892] change statement for open() is splited into two part in middle of sentence. In-Reply-To: <1490312778.71.0.779732227064.issue29892@psf.upfronthosting.co.za> Message-ID: <1490410511.27.0.675450716147.issue29892@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 29540cdf6c66df9f806375a95078c0c63192ef78 by Mariatta (NAKAMURA Osamu) in branch 'master': bpo-29892: Fix wrong markup on doc-lib-functions (GH-802) https://github.com/python/cpython/commit/29540cdf6c66df9f806375a95078c0c63192ef78 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 22:56:56 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 02:56:56 +0000 Subject: [issue29892] change statement for open() is splited into two part in middle of sentence. In-Reply-To: <1490312778.71.0.779732227064.issue29892@psf.upfronthosting.co.za> Message-ID: <1490410616.42.0.026435673181.issue29892@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +717 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 23:04:42 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 03:04:42 +0000 Subject: [issue29892] change statement for open() is splited into two part in middle of sentence. In-Reply-To: <1490312778.71.0.779732227064.issue29892@psf.upfronthosting.co.za> Message-ID: <1490411082.79.0.854876091507.issue29892@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 5dafaece67cb576ef96579fb5ddcbf62e0827b0d by Mariatta in branch '3.6': bpo-29892: Fix wrong markup on doc-lib-functions (GH-802) (GH-810) https://github.com/python/cpython/commit/5dafaece67cb576ef96579fb5ddcbf62e0827b0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 23:06:14 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 03:06:14 +0000 Subject: [issue29892] change statement for open() is splited into two part in middle of sentence. In-Reply-To: <1490312778.71.0.779732227064.issue29892@psf.upfronthosting.co.za> Message-ID: <1490411174.48.0.588031651384.issue29892@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: PR was merged and backported into 3.6. Thanks all :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 23:13:55 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 25 Mar 2017 03:13:55 +0000 Subject: [issue29897] itertools.chain behaves strangly when copied with copy.copy In-Reply-To: <1490382866.15.0.806348806156.issue29897@psf.upfronthosting.co.za> Message-ID: <1490411635.19.0.567078863594.issue29897@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 24 23:58:04 2017 From: report at bugs.python.org (Louie Lu) Date: Sat, 25 Mar 2017 03:58:04 +0000 Subject: [issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation In-Reply-To: <1490306388.92.0.69250411121.issue29890@psf.upfronthosting.co.za> Message-ID: <1490414284.56.0.163905098735.issue29890@psf.upfronthosting.co.za> Louie Lu added the comment: The document here says: https://docs.python.org/3/library/ipaddress.html#interface-objects ""IPv4Interface is a subclass of IPv4Address"" trying with: >>> ipaddress.IPv4Address(('192.168.128.0', '255.255.255.0')) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/ipaddress.py", line 1284, in __init__ self._ip = self._ip_int_from_string(addr_str) File "/usr/lib/python3.6/ipaddress.py", line 1118, in _ip_int_from_string raise AddressValueError("Expected 4 octets in %r" % ip_str) ipaddress.AddressValueError: Expected 4 octets in "('192.168.128.0', '255.255.255.0')" So the behavior of IPv4Interface seem to be correct? ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 00:17:26 2017 From: report at bugs.python.org (Aaron Meurer) Date: Sat, 25 Mar 2017 04:17:26 +0000 Subject: [issue6028] Interpreter aborts when chaining an infinite number of exceptions In-Reply-To: <1242376180.99.0.271687505005.issue6028@psf.upfronthosting.co.za> Message-ID: <1490415446.33.0.10690768884.issue6028@psf.upfronthosting.co.za> Changes by Aaron Meurer : ---------- nosy: +Aaron.Meurer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 00:28:39 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 25 Mar 2017 04:28:39 +0000 Subject: [issue29896] ElementTree.fromstring raises undocumented UnicodeError In-Reply-To: <1490366078.02.0.633799101454.issue29896@psf.upfronthosting.co.za> Message-ID: <1490416119.58.0.987934054767.issue29896@psf.upfronthosting.co.za> R. David Murray added the comment: Agreed with Terry. The general policy in Python is that we let errors bubble up unless there is a good reason to do something else with them. And errors that bubble up are not, in general, documented. (In short, Python is not Java :) ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 00:51:24 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 04:51:24 +0000 Subject: [issue29862] Fix grammar typo in importlib.reload() exception In-Reply-To: <1490036928.42.0.0658763709681.issue29862@psf.upfronthosting.co.za> Message-ID: <1490417484.02.0.547782246919.issue29862@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 9f0aa4843f8c26937d5817f27cac4aae9c0a034f by Mariatta (Mandeep Bhutani) in branch 'master': bpo-29862: Fix grammar in importlib.reload() exception (GH-809) https://github.com/python/cpython/commit/9f0aa4843f8c26937d5817f27cac4aae9c0a034f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 00:52:43 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 04:52:43 +0000 Subject: [issue29862] Fix grammar typo in importlib.reload() exception In-Reply-To: <1490036928.42.0.0658763709681.issue29862@psf.upfronthosting.co.za> Message-ID: <1490417563.54.0.430143400607.issue29862@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +718 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 00:52:56 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 04:52:56 +0000 Subject: [issue29862] Fix grammar typo in importlib.reload() exception In-Reply-To: <1490036928.42.0.0658763709681.issue29862@psf.upfronthosting.co.za> Message-ID: <1490417576.99.0.0578645201216.issue29862@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +719 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 01:19:41 2017 From: report at bugs.python.org (=?utf-8?b?a3lyZW4g5Y6f5a2Q5Za1?=) Date: Sat, 25 Mar 2017 05:19:41 +0000 Subject: [issue29899] zlib missing when --enable--optimizations option appended Message-ID: <1490419181.2.0.645690574744.issue29899@psf.upfronthosting.co.za> New submission from kyren ???: i think it happens to all versions that recognizes the optimizations option. At least I confirmed python version 3.4.6, 3.5.3, 3.6.1, when `--enable-optimizations` is appended, `zlib` cannot be imported, `No module named zlib`. I'm working on Ubuntu 14.04 by the way. I don't know if it's system specific. ---------- messages: 290465 nosy: kyren ??? priority: normal severity: normal status: open title: zlib missing when --enable--optimizations option appended type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 01:53:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 05:53:17 +0000 Subject: [issue29557] binhex documentation claims unknown bug In-Reply-To: <1487089244.04.0.406287394607.issue29557@psf.upfronthosting.co.za> Message-ID: <1490421197.52.0.155366792681.issue29557@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 01:53:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 05:53:51 +0000 Subject: [issue29737] Optimize concatenating empty tuples In-Reply-To: <1488829716.87.0.539974742004.issue29737@psf.upfronthosting.co.za> Message-ID: <1490421231.18.0.988309366556.issue29737@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 02:08:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 06:08:35 +0000 Subject: [issue29737] Optimize concatenating empty tuples In-Reply-To: <1488829716.87.0.539974742004.issue29737@psf.upfronthosting.co.za> Message-ID: <1490422115.44.0.981590021347.issue29737@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The PR already was merged when you wrote your comment Raymond. If you insist I can revert it. But 0f7b0b397e12514ee213bc727c9939b66585cbe2 depends on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 03:42:54 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 25 Mar 2017 07:42:54 +0000 Subject: [issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented In-Reply-To: <1490394843.09.0.467635996133.issue29898@psf.upfronthosting.co.za> Message-ID: <1490427774.11.0.442994010342.issue29898@psf.upfronthosting.co.za> Eryk Sun added the comment: I prefer the name PYTHONLEGACYWINDOWSIOENCODING for symmetry with both PYTHONIOENCODING and PYTHONLEGACYWINDOWSFSENCODING, but I suppose you changed it to make it more visually distinguished from the latter. I discovered this issue due to the modified behavior of PYTHONIOENCODING. It's not really a disruptive change, but it looks wrong based solely on the --help text description of PYTHONIOENCODING. An alternative would be to set Py_LegacyWindowsStdioFlag in _Py_InitializeEx_Private either when PYTHONLEGACYWINDOWSSTDIO is set or when PYTHONIOENCODING isn't a case-insensitive match for "utf-8" with an optional :errors spec. That way people get exactly what they asked for, even if it's mojibake nonsense given the console's current input and output codepages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 04:25:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 08:25:52 +0000 Subject: [issue29900] Remove unneeded wrappers in pathlib Message-ID: <1490430352.62.0.808201029923.issue29900@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Since functions in the os module support path-like objects, the code of the pathlib module can be simplified. The wrappers that explicitly convert Path to str no longer needed. ---------- components: Library (Lib) messages: 290468 nosy: pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Remove unneeded wrappers in pathlib type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 04:30:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 08:30:16 +0000 Subject: [issue29900] Remove unneeded wrappers in pathlib In-Reply-To: <1490430352.62.0.808201029923.issue29900@psf.upfronthosting.co.za> Message-ID: <1490430616.09.0.911426982489.issue29900@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +720 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 05:03:48 2017 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 25 Mar 2017 09:03:48 +0000 Subject: [issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation In-Reply-To: <1490306388.92.0.69250411121.issue29890@psf.upfronthosting.co.za> Message-ID: <1490432628.88.0.15191287725.issue29890@psf.upfronthosting.co.za> Eric V. Smith added the comment: While an IPv4Interface may be a subclass of an IPv4Address, it definitely has more information attached to it: the netmask of the network it's on. So an interface (like a network) needs to allow additional parameters to specify the netmask. It should be true that IPv4Interface is like IPv4Network, but it will allow arbitrary host bits. A IPv4Network in strict mode will have all zeros for the host bits, while a IPv4Network in non-strict mode will allow ones in the host bits (see Ilya's original example). If you look at IPv4Interface.__init__, it actually does just that: creates an IPv4Network with strict=False, then extracts the network parts. I'm not exactly sure why it also has the int(address[1]) code there, too, since IPvv4Network deals with the address[1] part. I would think extracting _prefixlen from the network (as it does later in __init__ for the non-tuple case) would be good enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 05:34:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 09:34:25 +0000 Subject: [issue29901] Support path-like objects in zipapp Message-ID: <1490434465.71.0.616268921696.issue29901@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch simplifies support of pathlib.Path in zipapp. As a side effect zipapp now supports other path-like objects, not just pathlib.Path. ---------- components: Library (Lib) messages: 290470 nosy: paul.moore, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Support path-like objects in zipapp type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 05:43:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 09:43:22 +0000 Subject: [issue29901] Support path-like objects in zipapp In-Reply-To: <1490434465.71.0.616268921696.issue29901@psf.upfronthosting.co.za> Message-ID: <1490435002.12.0.554807675913.issue29901@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +721 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 06:14:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 Mar 2017 10:14:50 +0000 Subject: [issue29737] Optimize concatenating empty tuples In-Reply-To: <1490422115.44.0.981590021347.issue29737@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I like the change. It prevents to duplicate tuples and so reduce the memory footprint. PGO compilation helps branch prediction anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 06:20:22 2017 From: report at bugs.python.org (Louie Lu) Date: Sat, 25 Mar 2017 10:20:22 +0000 Subject: [issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation In-Reply-To: <1490306388.92.0.69250411121.issue29890@psf.upfronthosting.co.za> Message-ID: <1490437222.04.0.585575079342.issue29890@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 06:21:53 2017 From: report at bugs.python.org (Louie Lu) Date: Sat, 25 Mar 2017 10:21:53 +0000 Subject: [issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation In-Reply-To: <1490306388.92.0.69250411121.issue29890@psf.upfronthosting.co.za> Message-ID: <1490437313.73.0.490263526578.issue29890@psf.upfronthosting.co.za> Louie Lu added the comment: Eric: I made the patch, reference to which IPv*Network dealing with tuple. Should I also add the unittest for it? Also, can you help me code review this, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 06:31:01 2017 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 25 Mar 2017 10:31:01 +0000 Subject: [issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation In-Reply-To: <1490306388.92.0.69250411121.issue29890@psf.upfronthosting.co.za> Message-ID: <1490437861.98.0.738576890767.issue29890@psf.upfronthosting.co.za> Eric V. Smith added the comment: Thanks! Yes, we'll need tests. I'm out of town most of the weekend, but I'll look at this as soon as I can. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 06:42:01 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 10:42:01 +0000 Subject: [issue29862] Fix grammar typo in importlib.reload() exception In-Reply-To: <1490036928.42.0.0658763709681.issue29862@psf.upfronthosting.co.za> Message-ID: <1490438521.78.0.335783563167.issue29862@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 8b82236952619c3838865ff535e5ce77b59b4a78 by Mariatta in branch '3.6': bpo-29862: Fix grammar in importlib.reload() exception (GH-809) (GH-811) https://github.com/python/cpython/commit/8b82236952619c3838865ff535e5ce77b59b4a78 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 06:42:40 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 10:42:40 +0000 Subject: [issue29862] Fix grammar typo in importlib.reload() exception In-Reply-To: <1490036928.42.0.0658763709681.issue29862@psf.upfronthosting.co.za> Message-ID: <1490438560.74.0.478724124267.issue29862@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 55717b4b487a9ccc119ca501fad71937fa01d1f6 by Mariatta in branch '3.5': bpo-29862: Fix grammar in importlib.reload() exception (GH-809) (GH-812) https://github.com/python/cpython/commit/55717b4b487a9ccc119ca501fad71937fa01d1f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 06:47:58 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Mar 2017 10:47:58 +0000 Subject: [issue29862] Fix grammar typo in importlib.reload() exception In-Reply-To: <1490036928.42.0.0658763709681.issue29862@psf.upfronthosting.co.za> Message-ID: <1490438878.25.0.921805016944.issue29862@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: I merged Mandeep's PR and backported it into 3.5 and 3.6. Thanks all :) ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 06:49:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 10:49:48 +0000 Subject: [issue29694] race condition in pathlib mkdir with flags parents=True In-Reply-To: <1488462813.87.0.464471853988.issue29694@psf.upfronthosting.co.za> Message-ID: <1490438988.55.0.297204220302.issue29694@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You can monkey-patch os.mkdir and pathlib._NormalAccessor.mkdir. Without tests we can't be sure that the patch fixes the issue and that the bug will be not reintroduced by future changes. Tests are required for this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 07:05:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 11:05:25 +0000 Subject: [issue29901] Support path-like objects in zipapp In-Reply-To: <1490434465.71.0.616268921696.issue29901@psf.upfronthosting.co.za> Message-ID: <1490439925.51.0.68842713151.issue29901@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4aec9a8be2f2574f249008eb8be76c070fea37eb by Serhiy Storchaka in branch 'master': bpo-29901: Improve support of path-like objects in zipapp. (#815) https://github.com/python/cpython/commit/4aec9a8be2f2574f249008eb8be76c070fea37eb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 07:06:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 11:06:40 +0000 Subject: [issue29901] Support path-like objects in zipapp In-Reply-To: <1490434465.71.0.616268921696.issue29901@psf.upfronthosting.co.za> Message-ID: <1490440000.5.0.480005043418.issue29901@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 07:37:43 2017 From: report at bugs.python.org (Louie Lu) Date: Sat, 25 Mar 2017 11:37:43 +0000 Subject: [issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation In-Reply-To: <1490306388.92.0.69250411121.issue29890@psf.upfronthosting.co.za> Message-ID: <1490441863.34.0.974381768714.issue29890@psf.upfronthosting.co.za> Louie Lu added the comment: Add unittest. Since IPv6 do not support prefix netmask ('ffff:ff00::'), it have only test like this: >>> a = ipaddress.ip_interface(('dead:beaf::', '32')) >>> b = ipaddress.ip_interface('dead:beaf::/32') >>> str(a) == str(b) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 07:42:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 11:42:14 +0000 Subject: [issue29900] Remove unneeded wrappers in pathlib In-Reply-To: <1490430352.62.0.808201029923.issue29900@psf.upfronthosting.co.za> Message-ID: <1490442134.06.0.997949838589.issue29900@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 62a99515301fa250feba1a2e0f2d8ea2a29d700e by Serhiy Storchaka in branch 'master': bpo-29900: Simplify pathlib implementation. (#814) https://github.com/python/cpython/commit/62a99515301fa250feba1a2e0f2d8ea2a29d700e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 07:42:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 11:42:58 +0000 Subject: [issue29900] Remove unneeded wrappers in pathlib In-Reply-To: <1490430352.62.0.808201029923.issue29900@psf.upfronthosting.co.za> Message-ID: <1490442178.22.0.959086445968.issue29900@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 09:16:44 2017 From: report at bugs.python.org (Bruce Frederiksen) Date: Sat, 25 Mar 2017 13:16:44 +0000 Subject: [issue29902] copy breaks staticmethod Message-ID: <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za> New submission from Bruce Frederiksen: Doing a copy on a staticmethod breaks it: Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from copy import copy >>> def foo(): pass ... >>> class bar: pass ... >>> bar.x = staticmethod(foo) >>> bar.x.__name__ 'foo' >>> bar.y = copy(staticmethod(foo)) >>> bar.y.__name__ Traceback (most recent call last): File "", line 1, in RuntimeError: uninitialized staticmethod object ---------- components: Library (Lib) messages: 290481 nosy: dangyogi priority: normal severity: normal status: open title: copy breaks staticmethod type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 09:31:42 2017 From: report at bugs.python.org (Julia Dolgova) Date: Sat, 25 Mar 2017 13:31:42 +0000 Subject: [issue29533] urllib2 works slowly with proxy on windows In-Reply-To: <1486802607.23.0.387912582288.issue29533@psf.upfronthosting.co.za> Message-ID: <1490448702.37.0.323156144045.issue29533@psf.upfronthosting.co.za> Julia Dolgova added the comment: Could someone look into my PR, please... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 09:39:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 13:39:08 +0000 Subject: [issue18059] Add multibyte encoding support to pyexpat In-Reply-To: <1369507288.26.0.471852341095.issue18059@psf.upfronthosting.co.za> Message-ID: <1490449148.32.0.380025573408.issue18059@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Marc-Andre, there are at least two issues about supporting East Asian encodings (issue13612 and issue15877). I think this means that that encodings are used in XML in wild. Current support of encodings (8-bit + UTF-8 + UTF-16) is enough for my needs, but I never have deal with East Asian languages. Currently the CodecInfo object has an optional flag _is_text_encoding. I think we can add more private attributes (flags and precomputed tables) for using with the expat parser. If they are not set (third-party encodings) the current autodetection code can be used as a fallback. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 09:39:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 13:39:26 +0000 Subject: [issue18059] Add multibyte encoding support to pyexpat In-Reply-To: <1369507288.26.0.471852341095.issue18059@psf.upfronthosting.co.za> Message-ID: <1490449166.65.0.360229137921.issue18059@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 10:02:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 14:02:29 +0000 Subject: [issue29902] copy breaks staticmethod In-Reply-To: <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za> Message-ID: <1490450549.16.0.0724736043875.issue29902@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Copying and pickling of staticmethod objects are not supported. Starting from 3.6 this raises an exception (see issue22995). >>> bar.y = copy(staticmethod(foo)) Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython3.6/Lib/copy.py", line 96, in copy rv = reductor(4) TypeError: can't pickle staticmethod objects ---------- components: +Interpreter Core nosy: +alexandre.vassalotti, barry, serhiy.storchaka versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 10:22:55 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 25 Mar 2017 14:22:55 +0000 Subject: [issue29899] zlib missing when --enable--optimizations option appended In-Reply-To: <1490419181.2.0.645690574744.issue29899@psf.upfronthosting.co.za> Message-ID: <1490451775.19.0.479892594588.issue29899@psf.upfronthosting.co.za> Ned Deily added the comment: --enable-optimizations does not exist in Python 3.4.x so any failures there must be due to something else. Are there any build errors? Can you show exactly where the message comes from? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 11:44:48 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Sat, 25 Mar 2017 15:44:48 +0000 Subject: [issue29903] struct.Struct Addition Message-ID: <1490456688.43.0.618194339702.issue29903@psf.upfronthosting.co.za> New submission from Aviv Palivoda: I would like to suggest that the struct.Struct class will support addition. For example you will be able to do: >>> s1 = Struct(">L") >>> s2 = Struct(">B") >>> s3 = s1 + s2 >>> s3.format b">LB" ---------- components: Extension Modules messages: 290486 nosy: mark.dickinson, meador.inge, palaviv priority: normal severity: normal status: open title: struct.Struct Addition type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 11:46:20 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Sat, 25 Mar 2017 15:46:20 +0000 Subject: [issue29903] struct.Struct Addition In-Reply-To: <1490456688.43.0.618194339702.issue29903@psf.upfronthosting.co.za> Message-ID: <1490456780.14.0.0344416924131.issue29903@psf.upfronthosting.co.za> Changes by Aviv Palivoda : ---------- pull_requests: +723 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 12:21:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 16:21:49 +0000 Subject: [issue29720] potential silent truncation in PyLong_AsVoidPtr In-Reply-To: <1488643924.71.0.864156118334.issue29720@psf.upfronthosting.co.za> Message-ID: <1490458909.81.0.934521532523.issue29720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think there is a bug. There are several ways to get the integer representation of the pointer. PyLong_FromVoidPtr() is the most straightforward. From Python side id() uses it. printf("%p") is a way of getting string representation of the pointer, that string can be converted to integer. This way is used in object.__repr__(). Usually %p formats the pointer as hexadecimal, but the sign is not defined. Therefore when the pointer is converted to the integer it can be interpreted as either signed or unsigned integer. PyLong_AsVoidPtr() should accept both representations. ---------- nosy: +mark.dickinson, serhiy.storchaka resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 12:45:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 16:45:26 +0000 Subject: [issue29903] struct.Struct Addition In-Reply-To: <1490456688.43.0.618194339702.issue29903@psf.upfronthosting.co.za> Message-ID: <1490460326.71.0.49932480401.issue29903@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is the purpose of this feature? Note that the layout of the structure consisting of two structures is not the same as the layout of the structure consisting of the same fields as separate structures. struct { struct { char a; short b; } s1; struct { char c; int d; } s2; } and struct { char a; short b; char c; int d; } can have different sizes and offsets of fields. As for the concrete implementation, it looks to me that Struct('2L') + Struct('25B') results to Struct('2L5B'). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 13:05:16 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 25 Mar 2017 17:05:16 +0000 Subject: [issue29898] PYTHONLEGACYWINDOWSIOENCODING isn't implemented In-Reply-To: <1490394843.09.0.467635996133.issue29898@psf.upfronthosting.co.za> Message-ID: <1490461516.31.0.809591296488.issue29898@psf.upfronthosting.co.za> Steve Dower added the comment: Sure, but you're proposing a change to a correctly documented (apart from the variable name) and released behavior. It can't be changed in 3.6, and I don't see a compelling reason to have different behavior in 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 13:25:28 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 25 Mar 2017 17:25:28 +0000 Subject: [issue29903] struct.Struct Addition In-Reply-To: <1490456688.43.0.618194339702.issue29903@psf.upfronthosting.co.za> Message-ID: <1490462728.67.0.756009504292.issue29903@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Serhiy that this proposal is likely to cause more problems than it solves. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 13:35:41 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sat, 25 Mar 2017 17:35:41 +0000 Subject: [issue29904] Fix a number of error message typos Message-ID: <1490463341.4.0.570341233776.issue29904@psf.upfronthosting.co.za> New submission from Jim Fasarakis-Hilliard: Specifically, the list I've currently found in .py files: - _pyio.py: ValueError("flush of closed file") ValueError("flush of closed file") "of" -> "on" for both. - configparser.py: ValueError("Required argument `source' not given.") ValueError("Cannot specify both `filename' and `source'. " fix ` on the quotes on argument names. - windows_utils.py ValueError("I/O operatioon on closed pipe") "operatioon" -> "operation" - proactor_events.py, asynchat.py: TypeError('data argument must be byte-ish (%r)', raise TypeError('data argument must be byte-ish (%r)', AFAIK, "byte-ish" isn't used elsewhere, the author probably mean to go for "bytes-like object". - _header_value_parser.py: errors.HeaderParseError("expected atom at a start of " "at a start of " -> "at the start of " - http/cookiejar.py: raise ValueError("filename must be string-like") I think "must be a str" was intended. ---------- messages: 290491 nosy: Jim Fasarakis-Hilliard priority: normal severity: normal status: open title: Fix a number of error message typos versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 13:40:29 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sat, 25 Mar 2017 17:40:29 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1490463629.03.0.0650546067575.issue13349@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Additional instances of this: - function indexOf of operator.py. - function _PySequence_IterSearch of abstract.c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 13:44:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 17:44:48 +0000 Subject: [issue29904] Fix a number of error message typos In-Reply-To: <1490463341.4.0.570341233776.issue29904@psf.upfronthosting.co.za> Message-ID: <1490463888.26.0.714097649707.issue29904@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Do you want to create a pull request? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 13:47:49 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sat, 25 Mar 2017 17:47:49 +0000 Subject: [issue29904] Fix a number of error message typos In-Reply-To: <1490463341.4.0.570341233776.issue29904@psf.upfronthosting.co.za> Message-ID: <1490464069.62.0.625837305308.issue29904@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Sure, Serhiy, I'll make a PR in a bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 14:12:11 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Sat, 25 Mar 2017 18:12:11 +0000 Subject: [issue29903] struct.Struct Addition In-Reply-To: <1490456688.43.0.618194339702.issue29903@psf.upfronthosting.co.za> Message-ID: <1490465531.88.0.154222076443.issue29903@psf.upfronthosting.co.za> Aviv Palivoda added the comment: I have two use cases for this feature: 1. struct a { int a; #ifdef VER2 unsigned int b; #endif } Now I may do: >>> ver1 = Struct("i") >>> ver2 = ver1 + Struct("I") 2. struct a { int a; union inner { int b; unsigned int c; } u; } As you can see with this feature I may do: >>> start = Struct("i") >>> union_b = Struct("i") >>> union_c = Struct("I") >>> version_a = start + union_b >>> version_b = start + union_c If you have a big struct with many options in the union this save's copying the initial format. > As for the concrete implementation, it looks to me that Struct('2L') + Struct('25B') results to Struct('2L5B'). I will fix the case when there is no format provided. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 16:37:36 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sat, 25 Mar 2017 20:37:36 +0000 Subject: [issue29904] Fix a number of error message typos In-Reply-To: <1490463341.4.0.570341233776.issue29904@psf.upfronthosting.co.za> Message-ID: <1490474256.33.0.803440688349.issue29904@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- pull_requests: +724 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 16:48:25 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 25 Mar 2017 20:48:25 +0000 Subject: [issue27446] struct: allow per-item byte order In-Reply-To: <1467562809.45.0.522502679617.issue27446@psf.upfronthosting.co.za> Message-ID: <1490474905.09.0.407977987924.issue27446@psf.upfronthosting.co.za> Martin Panter added the comment: This seems too obscure to be worth supporting in the built-in library IMO. The use case loses one line of code but gains a more complicated structure format string. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 16:54:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 20:54:01 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1490475241.91.0.4592981515.issue10030@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Brian, you requested tests, but PR 550 doesn't add new API and doesn't change the behavior of public API. No new tests are needed. ---------- nosy: +brian.curtin versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 17:05:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 21:05:14 +0000 Subject: [issue27446] struct: allow per-item byte order In-Reply-To: <1467562809.45.0.522502679617.issue27446@psf.upfronthosting.co.za> Message-ID: <1490475914.87.0.863891710687.issue27446@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Martin. ---------- nosy: +mark.dickinson, meador.inge, serhiy.storchaka resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 17:10:20 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sat, 25 Mar 2017 21:10:20 +0000 Subject: [issue29905] TypeErrors not formatting values correctly Message-ID: <1490476220.4.0.605506915687.issue29905@psf.upfronthosting.co.za> New submission from Jim Fasarakis-Hilliard: Specifically, in both Lib/async/proactor_events.py and asynchat.py there's a comma where a % should be thereby not formatting the value correctly: TypeError('data argument must be byte-ish (%r)', type(data)) TypeError('data argument must be byte-ish (%r)', type(data)) proposed fix is to change them to: TypeError('data argument must be a bytes-like object, not %r' % type(data).__name__) TypeError('data argument must be a bytes-like object, not %r' % type(data).__name__) ---------- components: Library (Lib) messages: 290499 nosy: Jim Fasarakis-Hilliard priority: normal severity: normal status: open title: TypeErrors not formatting values correctly type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 17:14:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Mar 2017 21:14:34 +0000 Subject: [issue29905] TypeErrors not formatting values correctly In-Reply-To: <1490476220.4.0.605506915687.issue29905@psf.upfronthosting.co.za> Message-ID: <1490476474.1.0.0374949918597.issue29905@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +giampaolo.rodola, haypo, josiahcarlson, stutzbach, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 17:21:35 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 25 Mar 2017 21:21:35 +0000 Subject: [issue21071] struct.Struct.format is bytes, but should be str In-Reply-To: <1395856133.5.0.672707015318.issue21071@psf.upfronthosting.co.za> Message-ID: <1490476895.88.0.979076150648.issue21071@psf.upfronthosting.co.za> Martin Panter added the comment: A backwards-compatible way forward would be to preserve (and document) the ?format? attribute as a byte string, and add a new attribute which is definitely a text string. Not sure of a good name; perhaps ?Struct.text_format? or ?format_str? is a start. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 17:32:25 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 25 Mar 2017 21:32:25 +0000 Subject: [issue29903] struct.Struct Addition In-Reply-To: <1490456688.43.0.618194339702.issue29903@psf.upfronthosting.co.za> Message-ID: <1490477545.48.0.763742890768.issue29903@psf.upfronthosting.co.za> Martin Panter added the comment: For the native alignment case (prefix code @), perhaps you can already use the ?ctypes? module, which supports structures with more complicated embedded fields. For the the unaligned modes (prefixes =, <, > and !), I am a little sympathetic. In the past, I wanted to make various structures that extended from a common base structure: HSF_VOL_DESC = Struct("< B 5s B") # Python 3's "Struct.format" is a byte string! NSR_DESC = Struct(HSF_VOL_DESC.format.decode() + "B") But I think if Issue 21071 was fixed (change Struct.format to text string, or perhaps add a new attribute), I would be happy enough writing NSR_DESC = Struct(HSF_VOL_DESC.format_str + "B") Transforming Aviv?s examples: s3 = Struct(s1.format_str + s2.format_str[1:]) s3 = Struct(s1.format_str + "B") # if s2 is not needed on its own ver2 = Struct(ver1.format_str + "I") version_a = Struct(start.format_str + union_b.format_str[1:]) ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 18:32:34 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sat, 25 Mar 2017 22:32:34 +0000 Subject: [issue29905] TypeErrors not formatting values correctly In-Reply-To: <1490476220.4.0.605506915687.issue29905@psf.upfronthosting.co.za> Message-ID: <1490481154.57.0.9300106401.issue29905@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- pull_requests: +725 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 21:18:35 2017 From: report at bugs.python.org (Aron Bordin) Date: Sun, 26 Mar 2017 01:18:35 +0000 Subject: [issue29906] Add callback parameter to concurrent.futures.Executor.map Message-ID: <1490491114.58.0.0924318232997.issue29906@psf.upfronthosting.co.za> New submission from Aron Bordin: I'm facing some situations where would be helpful to be able to add a default function callback when calling the Executor.map. So, when making calls with this command we could get the executor result easily. I think that we could provide a callback parameter to the map function, that adds the callable to the future (similar to add_done_callback). ---------- components: Library (Lib) messages: 290502 nosy: aron.bordin priority: normal severity: normal status: open title: Add callback parameter to concurrent.futures.Executor.map type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 22:26:08 2017 From: report at bugs.python.org (Robert Baker) Date: Sun, 26 Mar 2017 02:26:08 +0000 Subject: [issue29907] Unicode encoding failure Message-ID: <1490495168.15.0.580990833474.issue29907@psf.upfronthosting.co.za> New submission from Robert Baker: Using Python 2.7 (not IDLE) on Windows 10. I have tried to use a Python 2.7 program to print the name of Czech composer Anton?n Dvo??k. I remembered to add the "u" before the string, but regardless of whether I encode the caron-r as a literal character (pasted from Windows Character Map) or as \u0159, it gives the error that character 0159 is undefined. This is incorrect; that character has been defined as "lower case r with caron above" for several years now. (The interpreter has no problem with the ANSI characters in the string.) ---------- messages: 290503 nosy: Robert Baker priority: normal severity: normal status: open title: Unicode encoding failure type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Mar 25 23:53:33 2017 From: report at bugs.python.org (Cameron Mckain) Date: Sun, 26 Mar 2017 03:53:33 +0000 Subject: [issue29908] Inconsistent crashing with an access violation Message-ID: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> New submission from Cameron Mckain: Almost every time I attempt to run my Django server ("python manage.py runserver") from PyCharm, python.exe crashes with the error "Unhandled exception at 0x7647BD9E (ucrtbase.dll) in python.exe: 0xC0000005: Access violation reading location 0x03BF8000." and "Process finished with exit code -1073741819 (0xC0000005)" is printed in the console. These errors only happen about 90% of the time. ---------- messages: 290504 nosy: Cameron Mckain priority: normal severity: normal status: open title: Inconsistent crashing with an access violation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 00:15:44 2017 From: report at bugs.python.org (Cameron Mckain) Date: Sun, 26 Mar 2017 04:15:44 +0000 Subject: [issue29908] Inconsistent crashing with an access violation In-Reply-To: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> Message-ID: <1490501744.01.0.444012725497.issue29908@psf.upfronthosting.co.za> Changes by Cameron Mckain : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 01:47:51 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 26 Mar 2017 05:47:51 +0000 Subject: [issue27446] struct: allow per-item byte order In-Reply-To: <1467562809.45.0.522502679617.issue27446@psf.upfronthosting.co.za> Message-ID: <1490507271.14.0.472882091871.issue27446@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with the other reviewers. Am going to mark this as closed. If the need arises, just make multiple struct unpacks. ---------- nosy: +rhettinger stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 02:06:32 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 26 Mar 2017 06:06:32 +0000 Subject: [issue29907] Unicode encoding failure In-Reply-To: <1490495168.15.0.580990833474.issue29907@psf.upfronthosting.co.za> Message-ID: <1490508392.9.0.162929658934.issue29907@psf.upfronthosting.co.za> Martin Panter added the comment: I presume you are trying to print to the normal Windows console. I understand the console was not well supported until Python 3.6 (see Issue 1602). Have you tried that version? I?ll leave this open for someone more experienced to confirm, but I suspect what you want may not be possible with 2.7. ---------- components: +Unicode, Windows nosy: +ezio.melotti, haypo, martin.panter, paul.moore, steve.dower, tim.golden, zach.ware resolution: -> out of date superseder: -> windows console doesn't print or input Unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 02:09:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 06:09:50 +0000 Subject: [issue21322] Pathlib .owner() and .group() methods fail on broken links In-Reply-To: <1398098569.86.0.723629898468.issue21322@psf.upfronthosting.co.za> Message-ID: <1490508590.18.0.537916929193.issue21322@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 02:19:27 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 26 Mar 2017 06:19:27 +0000 Subject: [issue23901] Force console stdout to use UTF8 on Windows In-Reply-To: <1428600157.62.0.0673126456323.issue23901@psf.upfronthosting.co.za> Message-ID: <1490509167.83.0.951097567901.issue23901@psf.upfronthosting.co.za> Martin Panter added the comment: This seems to be discussing the same sort of stuff that ended up with the Issue 1602 implementation. ---------- nosy: +martin.panter resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> windows console doesn't print or input Unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 02:31:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 06:31:25 +0000 Subject: [issue23241] shutil should accept pathlib types In-Reply-To: <1421240576.75.0.719151648499.issue23241@psf.upfronthosting.co.za> Message-ID: <1490509885.75.0.156619901411.issue23241@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is this issue outdated since implementing a file system path protocol (PEP 519) in 3.6? ---------- nosy: +serhiy.storchaka status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 02:35:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 06:35:27 +0000 Subject: [issue24154] pathlib.Path.rename moves file to Path.cwd() when argument is a string In-Reply-To: <1431221868.46.0.281125917567.issue24154@psf.upfronthosting.co.za> Message-ID: <1490510127.48.0.0260060364887.issue24154@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This would contradict to all other functions and commands. The current behavior is correct. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 02:51:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 06:51:19 +0000 Subject: [issue21301] pathlib missing Path.expandvars(env=os.environ) In-Reply-To: <1397849465.53.0.177138390921.issue21301@psf.upfronthosting.co.za> Message-ID: <1490511079.79.0.624798331653.issue21301@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: expanduser() is path handling function, but not expandvars(). expandvars() is defined in posixpath and ntpath because different OSes use different syntax for interpolated strings, and we sometimes need to use a foreign syntax. It doesn't have any special relations to paths, it handles them just as strings. Actually expandvars() functions are the fifth and the sixth ways of string formatting in Python. I suggest to close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 03:05:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 07:05:25 +0000 Subject: [issue22062] Fix pathlib.Path.(r)glob doc glitches. In-Reply-To: <1406239862.0.0.293742999811.issue22062@psf.upfronthosting.co.za> Message-ID: <1490511925.28.0.0685926336321.issue22062@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can you create a pull request on GitHub Mike? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 03:08:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 07:08:45 +0000 Subject: [issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support In-Reply-To: <1385449388.05.0.507393772442.issue19791@psf.upfronthosting.co.za> Message-ID: <1490512124.99.0.865048363759.issue19791@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can you create a pull request on GitHub Vajrasky? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 03:41:15 2017 From: report at bugs.python.org (Paul Moore) Date: Sun, 26 Mar 2017 07:41:15 +0000 Subject: [issue29907] Unicode encoding failure In-Reply-To: <1490495168.15.0.580990833474.issue29907@psf.upfronthosting.co.za> Message-ID: <1490514075.96.0.693814083814.issue29907@psf.upfronthosting.co.za> Paul Moore added the comment: Also, you need to: 1. Ensure you are using characters that are available in the encoding that sys.stdout uses - in Python prior to 3.6, this would be your Windows *console* code page, and in 3.6+ would be UTF-8. 2. Declare the encoding of your source code if you are not using the default (which is ASCII in Python 2, and UTF-8 in Python 3). Specifically, if you write your source in UTF-8, or use an encoding declaration or \u escapes, and you use Python 3.6, this problem will likely have gone away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 03:58:33 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Sun, 26 Mar 2017 07:58:33 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490515113.44.0.051461116439.issue29888@psf.upfronthosting.co.za> Changes by Kinebuchi Tomohiko : ---------- pull_requests: +726 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 04:00:49 2017 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 26 Mar 2017 08:00:49 +0000 Subject: [issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support In-Reply-To: <1385449388.05.0.507393772442.issue19791@psf.upfronthosting.co.za> Message-ID: <1490515249.04.0.0529813087882.issue19791@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Okay, Serhiy. I'll create a pull request. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 04:04:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 08:04:54 +0000 Subject: [issue27827] pathlib is_reserved fails for some reserved paths on Windows In-Reply-To: <1471858428.08.0.847859442583.issue27827@psf.upfronthosting.co.za> Message-ID: <1490515494.32.0.0905044222334.issue27827@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Are 'COM\u0661' or 'COM\u2074' reserved names? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 04:14:29 2017 From: report at bugs.python.org (kyren) Date: Sun, 26 Mar 2017 08:14:29 +0000 Subject: [issue29899] zlib missing when --enable--optimizations option appended In-Reply-To: <1490419181.2.0.645690574744.issue29899@psf.upfronthosting.co.za> Message-ID: <1490516069.38.0.998540346373.issue29899@psf.upfronthosting.co.za> kyren added the comment: There's no build errors. The compiling and installing process is error-free. Take 3.5.3 as example, it's all good until you enter 3.5.3 python shell and type `import zlib`, it gives `No module name zlib`. I solved by make a `libz.so` link in my `/lib` dir to the `libz.so.1` file in my `/lib/x86_64-linux-gnu` dir according to a thread in Ubuntu forum. It may be system specific, I don't know yet. ---------- nosy: +kyren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 04:18:43 2017 From: report at bugs.python.org (Marco Buttu) Date: Sun, 26 Mar 2017 08:18:43 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1490516323.52.0.283930594915.issue27200@psf.upfronthosting.co.za> Changes by Marco Buttu : ---------- pull_requests: +727 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 04:24:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 26 Mar 2017 08:24:40 +0000 Subject: [issue29907] Unicode encoding failure In-Reply-To: <1490514075.96.0.693814083814.issue29907@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: For Python 2, there is https://pypi.python.org/pypi/win_unicode_console ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 04:59:57 2017 From: report at bugs.python.org (Eric Hopper) Date: Sun, 26 Mar 2017 08:59:57 +0000 Subject: [issue29909] types.coroutine monkey patches original function Message-ID: <1490518797.37.0.740685001336.issue29909@psf.upfronthosting.co.za> New submission from Eric Hopper: The types.coroutine decorator for Python 3.6 (and I suspect for Python 3.6.1 as well) simply monkey patches the function it's passed and then returns it. This results in behavior that I found somewhat surprising. def bar(): yield 5 foo = types.coroutine(bar) foo is bar And, so now both foo and bar are now awaitable. I wasn't really expecting this, and while it's minor, it also doesn't really seem like the right thing to do. ---------- components: asyncio messages: 290518 nosy: Omnifarious, yselivanov priority: normal severity: normal status: open title: types.coroutine monkey patches original function type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 05:47:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 09:47:55 +0000 Subject: [issue1697943] msgfmt cannot cope with BOM Message-ID: <1490521675.18.0.25017621807.issue1697943@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Corresponding GNU gettext issue [1] was closed as "Not a Bug". [1] https://savannah.gnu.org/bugs/?18345 ---------- nosy: +serhiy.storchaka resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 06:12:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 10:12:56 +0000 Subject: [issue7913] Enhance Cmd support for docstrings and document it. In-Reply-To: <1265914642.07.0.496715269242.issue7913@psf.upfronthosting.co.za> Message-ID: <1490523176.07.0.801977925948.issue7913@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can you create a pull request David? ---------- nosy: +serhiy.storchaka versions: +Python 3.7 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 06:13:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 10:13:29 +0000 Subject: [issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode() In-Reply-To: <1369059208.07.0.0770184639372.issue18022@psf.upfronthosting.co.za> Message-ID: <1490523209.31.0.647752293873.issue18022@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. ---------- versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 06:30:02 2017 From: report at bugs.python.org (Gary van der Merwe) Date: Sun, 26 Mar 2017 10:30:02 +0000 Subject: [issue22962] ipaddress: Add optional prefixlen argument to ip_interface and ip_network In-Reply-To: <1417164846.5.0.804919214198.issue22962@psf.upfronthosting.co.za> Message-ID: <1490524202.9.0.385027115183.issue22962@psf.upfronthosting.co.za> Gary van der Merwe added the comment: Indeed. Thanks to whoever fixed this. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 06:37:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 10:37:20 +0000 Subject: [issue11989] deprecate shutil.copy2 In-Reply-To: <1304457480.12.0.859066442239.issue11989@psf.upfronthosting.co.za> Message-ID: <1490524640.95.0.263371183033.issue11989@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 06:45:53 2017 From: report at bugs.python.org (Vajrasky Kok) Date: Sun, 26 Mar 2017 10:45:53 +0000 Subject: [issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support In-Reply-To: <1385449388.05.0.507393772442.issue19791@psf.upfronthosting.co.za> Message-ID: <1490525153.1.0.597816812984.issue19791@psf.upfronthosting.co.za> Vajrasky Kok added the comment: Okay, this is the pull request: https://github.com/python/cpython/pull/822 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 06:53:38 2017 From: report at bugs.python.org (Christoph Zwerschke) Date: Sun, 26 Mar 2017 10:53:38 +0000 Subject: [issue1697943] msgfmt cannot cope with BOM Message-ID: <1490525618.04.0.254601495143.issue1697943@psf.upfronthosting.co.za> Christoph Zwerschke added the comment: > Corresponding GNU gettext issue [1] was closed as "Not a Bug". Though I think the rationale given there pointing to RFC3629 section 6 is wrong, since that section explicitly refers to Internet protocols, but PO files are not an Internet protocol. Anyway, if silently ignoring BOMs is considered a bad idea, then at least there should be a more helpful error message. Because the BOM is invisible, users - who may not even be aware that something like a BOM exist or that their editor saves files with BOM - may be frustrated about the current error message because they don't see any invalid character when they open the PO file in their editor. A more explicit error message like "PO files should not be saved with a byte order mark" might point users in the right direction. After all, these tools are supposed to be used directly by human beings on the command line. Who said that command line tools must not be user friendly? ---------- status: pending -> open versions: +Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 08:08:43 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 26 Mar 2017 12:08:43 +0000 Subject: [issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode() In-Reply-To: <1369059208.07.0.0770184639372.issue18022@psf.upfronthosting.co.za> Message-ID: <1490530123.95.0.136286121265.issue18022@psf.upfronthosting.co.za> Martin Panter added the comment: The double equals "==" case for the ?quopri? implementation in Python is now consistent with the others thanks to the fix in Issue 23681 (see also Issue 21511). According to Issue 20121, the quopri (Python) implementation only supports LF (\n) characters as line breaks, and the binascii (C) implementation also supports CRLF. So I agree that the whitespace-before-newline case "= \n" is a genuine bug (see Issue 16473). But the CR case "=\r" is not supported because neither quopri nor binascii support universal newlines or CR line breaks on their own. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 08:54:32 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 26 Mar 2017 12:54:32 +0000 Subject: [issue27827] pathlib is_reserved fails for some reserved paths on Windows In-Reply-To: <1471858428.08.0.847859442583.issue27827@psf.upfronthosting.co.za> Message-ID: <1490532872.79.0.603014732784.issue27827@psf.upfronthosting.co.za> Eryk Sun added the comment: For COM[n] and LPT[n], only ASCII 1-9 and superscript 1-3 (U+00b9, U+00b2, and U+00b3) are handled as decimal digits. For example: >>> print(*(ascii(chr(c)) for c in range(1, 65536) ... if _getfullpathname('COM%s' % chr(c))[0] == '\\'), sep=', ') '1', '2', '3', '4', '5', '6', '7', '8', '9', '\xb2', '\xb3', '\xb9' The implementation uses iswdigit in ntdll.dll. (ntdll.dll is the system DLL that has the user-mode runtime library and syscall stubs -- except the Win32k syscall stubs are in win32u.dll.) ntdll's private CRT uses the C locale (Latin-1, not just ASCII), and it classifies these superscript digits as decimal digits: >>> ntdll = ctypes.WinDLL('ntdll') >>> print(*(chr(c) for c in range(1, 65536) if ntdll.iswdigit(c))) 0 1 2 3 4 5 6 7 8 9 ? ? ? Unicode, and thus Python, does not classify these superscript digits as decimal digits, so I just hard-coded the list. Here's an example with an attached debugger to show the runtime library calling iswdigit: >>> name = 'COM\u2074' >>> _getfullpathname(name) Breakpoint 0 hit ntdll!iswdigit: 00007ffe`9ad89d90 ba04000000 mov edx,4 0:000> kc 6 Call Site ntdll!iswdigit ntdll!RtlpIsDosDeviceName_Ustr ntdll!RtlGetFullPathName_Ustr ntdll!RtlGetFullPathName_UEx KERNELBASE!GetFullPathNameW python36_d!os__getfullpathname_impl The argument is in register rcx: 0:000> r rcx rcx=0000000000002074 Skip to the ret instruction, and check the result in register rax: 0:000> pt ntdll!iswctype+0x20: 00007ffe`9ad89e40 c3 ret 0:000> r rax rax=0000000000000000 0:000> g Since U+2074 isn't considered a decimal digit, 'COM?' is not a reserved DOS device name. The system handles it as a regular filename: 'C:\\Temp\\COM?' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 09:13:18 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Sun, 26 Mar 2017 13:13:18 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490533998.59.0.212831410163.issue29888@psf.upfronthosting.co.za> Changes by Kinebuchi Tomohiko : ---------- pull_requests: +728 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 09:36:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 13:36:02 +0000 Subject: [issue8488] Docstrings of non-data descriptors "ignored" In-Reply-To: <1271874309.07.0.567011993617.issue8488@psf.upfronthosting.co.za> Message-ID: <1490535362.01.0.186655133036.issue8488@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since the descriptor is classified as a routine (inspect.isroutine() returns True because inspect.ismethoddescriptor() returns True), pydoc outputs it in the "Methods defined here" section and uses the docroutine(). But docroutine() requires the __name__ attribute for determining whether this is an original method or an alias. That descriptor doesn't have the __name__ attribute. Actually it is even not callable, so it is questionable whether it can be classified as a method. I don't know on what level this should be fixed. docroutine()? classify_class_attrs()? isroutine()? ismethoddescriptor()? ---------- nosy: +serhiy.storchaka, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 09:40:02 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 26 Mar 2017 13:40:02 +0000 Subject: [issue29907] Unicode encoding failure In-Reply-To: <1490495168.15.0.580990833474.issue29907@psf.upfronthosting.co.za> Message-ID: <1490535602.74.0.00888524520314.issue29907@psf.upfronthosting.co.za> Eryk Sun added the comment: I'm closing this issue since Python's encodings in this case -- 852 (OEM) and 1250 (ANSI) -- both correctly map U+0159: >>> u'\u0159'.encode('852') '\xfd' >>> u'\u0159'.encode('1250') '\xf8' You must be using an encoding that doesn't map U+0159. If you're using the console's default codepage (i.e. you haven't run chcp.com, mode.com, or called SetConsoleOutputCP), then Python started with stdout.encoding set to your locale's OEM codepage encoding. For example, if you're using a U.S. locale, it's cp437, and if you're using a Western Europe locale, it's cp850. Neither of these includes U+0159. We're presented with this codepage hell because the WriteFile and WriteConsoleA functions write a stream of bytes to the console, and it needs to be told how to decode these bytes to get Unicode text. It would be nice if the console's UTF-8 implementation (codepage 65001) wasn't buggy, but Microsoft has never cared enough to fix it (at least not completely; it's still broken for input in Windows 10). That leaves the wide-character UTF-16 function, WriteConsoleW, as the best alternative. Using this function requires bypassing Python's normal standard I/O implementation. This has been implemented as of 3.6. But for older versions you'll need to install and enable win_unicode_console. ---------- nosy: +eryksun stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 09:49:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 13:49:22 +0000 Subject: [issue12414] getsizeof() on code objects is wrong In-Reply-To: <1309060401.87.0.459388249467.issue12414@psf.upfronthosting.co.za> Message-ID: <1490536162.09.0.258679205286.issue12414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Martin. sys.getsizeof() should only count the memory that is not exposed as separate Python objects. In case of a code object this is the memory of the PyCodeObject structure and the memory of dynamic array co_cellvars (issue15456). Other subobjects are exposed as code object attributes and by gc.get_referents(). For counting the summary size you should recursively call sys.getsizeof() for objects returned by gc.get_referents(). But be aware that some subobjects (for example interned strings) can be shared between different code objects, so the average memory consumption is less than the simple sum. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 09:51:56 2017 From: report at bugs.python.org (ppperry) Date: Sun, 26 Mar 2017 13:51:56 +0000 Subject: [issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support In-Reply-To: <1385449388.05.0.507393772442.issue19791@psf.upfronthosting.co.za> Message-ID: <1490536316.73.0.235085812776.issue19791@psf.upfronthosting.co.za> Changes by ppperry : ---------- pull_requests: +729 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 09:55:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 13:55:42 +0000 Subject: [issue27827] pathlib is_reserved fails for some reserved paths on Windows In-Reply-To: <1471858428.08.0.847859442583.issue27827@psf.upfronthosting.co.za> Message-ID: <1490536542.31.0.882484416015.issue27827@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks for the estimation Eryk. Can you create a pull request for your patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 10:00:32 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Sun, 26 Mar 2017 14:00:32 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490536832.32.0.777068066262.issue29888@psf.upfronthosting.co.za> Changes by Kinebuchi Tomohiko : ---------- pull_requests: +730 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 10:02:27 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Sun, 26 Mar 2017 14:02:27 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490536947.8.0.78267570756.issue29888@psf.upfronthosting.co.za> Kinebuchi Tomohiko added the comment: I just created two pull requests. + PR for 2.7 -> https://github.com/python/cpython/pull/823 + PR for 3.5 or newer -> https://github.com/python/cpython/pull/824 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 11:08:21 2017 From: report at bugs.python.org (R. David Murray) Date: Sun, 26 Mar 2017 15:08:21 +0000 Subject: [issue29909] types.coroutine monkey patches original function In-Reply-To: <1490518797.37.0.740685001336.issue29909@psf.upfronthosting.co.za> Message-ID: <1490540901.8.0.511808513477.issue29909@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, that looks wrong to me. IMO it should be returning a new function object, not updating the __code__ of the existing object. I couldn't figure when that is actually triggered, though. There are also some other oddnesses, given the definition of 'coroutine' in the 'types' module docs. type(x) returns 'coroutine' only when you actually *call* the async def function. I think that's correct, but the docs need rewording. However, if I call coroutine on the equivalent non-async-def generator, types(x()) returns generator, not coroutine. So it doesn't seem to be doing what it says on the label, at least not in all cases. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 11:08:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 15:08:41 +0000 Subject: [issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode() In-Reply-To: <1369059208.07.0.0770184639372.issue18022@psf.upfronthosting.co.za> Message-ID: <1490540921.94.0.195198355098.issue18022@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thus currently the table of discrepancies looks as: quoprimime binascii quopri b'=' '' b'' b'=' b'= ' '' b'= ' b'= ' b'= \n' '' b'= \n' b'' b'=\r' '' b'' b'=\r' b'==41' '=A' b'=41' b'=41' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 11:13:36 2017 From: report at bugs.python.org (R. David Murray) Date: Sun, 26 Mar 2017 15:13:36 +0000 Subject: [issue29909] types.coroutine monkey patches original function In-Reply-To: <1490518797.37.0.740685001336.issue29909@psf.upfronthosting.co.za> Message-ID: <1490541216.56.0.73590631603.issue29909@psf.upfronthosting.co.za> R. David Murray added the comment: Oops, I didn't meant to close this. ---------- resolution: not a bug -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 12:01:15 2017 From: report at bugs.python.org (Alain Mellan) Date: Sun, 26 Mar 2017 16:01:15 +0000 Subject: [issue21301] pathlib missing Path.expandvars(env=os.environ) In-Reply-To: <1490511079.79.0.624798331653.issue21301@psf.upfronthosting.co.za> Message-ID: <3CC6C1AB-3CA3-46A6-96D4-41E448C6CD7F@gmail.com> Alain Mellan added the comment: Yes, you can close it. ? alain. On Mar 25, 2017, at 23:51 , Serhiy Storchaka wrote: http://bugs.python.org/issue21301 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 12:02:43 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 26 Mar 2017 16:02:43 +0000 Subject: [issue12414] getsizeof() on code objects is wrong In-Reply-To: <1309060401.87.0.459388249467.issue12414@psf.upfronthosting.co.za> Message-ID: <1490544163.31.0.764435638456.issue12414@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Not including the Python accessible referred-to objects is consistent with how sys.getsizeof() works elsewhere (i.e. for object instances, the size of __dict__ is not included). >>> import sys >>> class A: pass >>> a = A() >>> sys.getsizeof(a) 56 >>> sys.getsizeof(a.__dict__) 112 The result is easily misleading but this seems to have been an early design decision about the semanatics __sizeof__. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 12:08:42 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 26 Mar 2017 16:08:42 +0000 Subject: [issue29908] Inconsistent crashing with an access violation In-Reply-To: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> Message-ID: <1490544522.35.0.153877618992.issue29908@psf.upfronthosting.co.za> Eryk Sun added the comment: The offset in ucrtbase.dll where it's crashing may hint at the culprit. The following command should print the full event log for the most recent crash: wevtutil qe application /rd:true /c:1 /format:text /q:"*[System[Provider[@Name='Application Error']]][EventData[Data='python.exe'][Data='ucrtbase.dll']]" ---------- components: +Windows nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 12:43:21 2017 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 26 Mar 2017 16:43:21 +0000 Subject: [issue29909] types.coroutine monkey patches original function In-Reply-To: <1490518797.37.0.740685001336.issue29909@psf.upfronthosting.co.za> Message-ID: <1490546601.37.0.858662330808.issue29909@psf.upfronthosting.co.za> Yury Selivanov added the comment: Yeah, we can fix this. However, I don't want to push the fix to 3.6, too much code uses this function now. So it's going to be 3.7 only. ---------- assignee: -> yselivanov versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 13:25:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 17:25:01 +0000 Subject: [issue29910] Ctrl-D eats a character on IDLE Message-ID: <1490549101.95.0.397312441336.issue29910@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Ctrl-D is binded to commenting out a block in IDLE. But additionally it deletes the first character of the line after the block. The default binding of Ctrl-D in Text widget is deleting a character under cursor. IDLE first comment out selected block, and after that runs the default handler. Proposed patch fixes this issue and presumably other potential conflicts with default bindings. It just adds `return "break"` at the end of most event handlers. ---------- assignee: terry.reedy components: IDLE messages: 290539 nosy: serhiy.storchaka, terry.reedy priority: normal severity: normal stage: patch review status: open title: Ctrl-D eats a character on IDLE type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 13:31:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 17:31:10 +0000 Subject: [issue29910] Ctrl-D eats a character on IDLE In-Reply-To: <1490549101.95.0.397312441336.issue29910@psf.upfronthosting.co.za> Message-ID: <1490549470.25.0.420412798837.issue29910@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +731 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 13:32:27 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 26 Mar 2017 17:32:27 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490549547.16.0.879477297535.issue29888@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset f8beb9831acd5cf80b9c56aea5864e16118c5400 by Ned Deily (cocoatomo) in branch 'master': bpo-29888: Fix the link referring to the "Python download page" (GH-824) https://github.com/python/cpython/commit/f8beb9831acd5cf80b9c56aea5864e16118c5400 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 13:44:11 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 26 Mar 2017 17:44:11 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490550251.59.0.814977644067.issue29888@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +732 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 13:47:07 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 26 Mar 2017 17:47:07 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490550427.03.0.9876940303.issue29888@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- pull_requests: +733 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 13:58:15 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 26 Mar 2017 17:58:15 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490551095.26.0.116967837071.issue29888@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset ceff32fb833e7be42508ffa73344e2e56865e54b by Ned Deily in branch '3.6': bpo-29888: Fix the link referring to the "Python download page" (GH-824) (GH-826) https://github.com/python/cpython/commit/ceff32fb833e7be42508ffa73344e2e56865e54b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 13:59:03 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 26 Mar 2017 17:59:03 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490551143.78.0.0682473839032.issue29888@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 8ce3085bf167b702989a9db466078b5676e825e3 by Ned Deily in branch '3.5': bpo-29888: Fix the link referring to the "Python download page" (GH-824) (GH-827) https://github.com/python/cpython/commit/8ce3085bf167b702989a9db466078b5676e825e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 14:05:03 2017 From: report at bugs.python.org (Ned Deily) Date: Sun, 26 Mar 2017 18:05:03 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490551503.63.0.381026527977.issue29888@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the pull requests! I've merged to master, 3.6, and 3.5 and I left a comment for the 2.7 PR. By the way, next time you make a PR, please feel free to add your name to Misc/ACKS. ---------- stage: -> commit review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 14:09:34 2017 From: report at bugs.python.org (Christian Ullrich) Date: Sun, 26 Mar 2017 18:09:34 +0000 Subject: [issue29911] Uninstall command line in Windows registry does not uninstall Message-ID: <1490551774.28.0.407532543156.issue29911@psf.upfronthosting.co.za> New submission from Christian Ullrich: The Windows installation package registers a command line for uninstalling the package. Running this command line does not uninstall the package. The command line ends with "/modify". For uninstallation, it should be "/passive /uninstall". Windows provides for separate command lines for modifying and uninstalling packages to be set in the "Uninstall" subkey: - ModifyPath: Command line for modifying the package - UninstallString: Command line for removing the package By setting both keys, the ARP control panel will display separate buttons for the two operations. Having an uninstallation command line that does not do what it says, and in fact causes modal UI to be presented, also interferes with automated package management. Ceterum censeo: This bug would have been avoided by using MSI as the distribution package format, because "msiexec /qn /x [ProductCode]" would have been correct regardless of what the registry says, and even if the registry does not say anything because the Uninstall key (as well as the uninstaller executable itself) were actually deleted months ago as part of some expired user profile. See bug #25166. ---------- components: Windows messages: 290544 nosy: Christian.Ullrich, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Uninstall command line in Windows registry does not uninstall type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 14:21:13 2017 From: report at bugs.python.org (Cameron Mckain) Date: Sun, 26 Mar 2017 18:21:13 +0000 Subject: [issue29908] Inconsistent crashing with an access violation In-Reply-To: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> Message-ID: <1490552473.92.0.918646749735.issue29908@psf.upfronthosting.co.za> Cameron Mckain added the comment: C:\Users\cmcka\PycharmProjects\test>wevtutil qe application /rd:true /c:1 /format:text /q:"*[System[Provider[@Name='Application Error']]][EventData[Data='python.exe'][Data='ucrtbase.dll']]" Event[0]: Log Name: Application Source: Application Error Date: 2017-03-26T01:46:20.230 Event ID: 1000 Task: Application Crashing Events Level: Error Opcode: Info Keyword: Classic User: N/A User Name: N/A Computer: CAMERON-OMEN Description: Faulting application name: python.exe, version: 3.6.1150.1013, time stamp: 0x58d169bd Faulting module name: ucrtbase.dll, version: 10.0.14393.0, time stamp: 0x57898db2 Exception code: 0xc0000005 Fault offset: 0x0003bd9e Faulting process id: 0x4464 Faulting application start time: 0x01d2a60d6fdf23d2 Faulting application path: C:\Python36\python.exe Faulting module path: C:\windows\System32\ucrtbase.dll Report Id: 109058c0-4e02-4bb6-a799-d6a975fe0d6f Faulting package full name: Faulting package-relative application ID: This is from Python's faulthandler as well: Windows fatal exception: access violation Thread 0x000044b0 (most recent call first): File "C:\Users\cmcka\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\171.3780.115\helpers\pydev\pydevd.py", line 96 in _on_run File "C:\Users\cmcka\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\171.3780.115\helpers\pydev\_pydevd_bundle\pydevd_comm.py", line 291 in run File "C:\Python36\lib\threading.py", line 916 in _bootstrap_inner File "C:\Python36\lib\threading.py", line 884 in _bootstrap Thread 0x000044ac (most recent call first): File "C:\Users\cmcka\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\171.3780.115\helpers\pydev\_pydevd_bundle\pydevd_comm.py", line 353 in _on_run File "C:\Users\cmcka\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\171.3780.115\helpers\pydev\_pydevd_bundle\pydevd_comm.py", line 291 in run File "C:\Python36\lib\threading.py", line 916 in _bootstrap_inner File "C:\Python36\lib\threading.py", line 884 in _bootstrap Thread 0x000039d4 (most recent call first): File "C:\Python36\lib\threading.py", line 299 in wait File "C:\Python36\lib\queue.py", line 173 in get File "C:\Users\cmcka\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\171.3780.115\helpers\pydev\_pydevd_bundle\pydevd_comm.py", line 430 in _on_run File "C:\Users\cmcka\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\171.3780.115\helpers\pydev\_pydevd_bundle\pydevd_comm.py", line 291 in run File "C:\Python36\lib\threading.py", line 916 in _bootstrap_inner File "C:\Python36\lib\threading.py", line 884 in _bootstrap Current thread 0x0000446c (most recent call first): File "C:\Users\cmcka\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\171.3780.115\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 380 in new_spawnve File "C:\Python36\lib\site-packages\django\utils\autoreload.py", line 290 in restart_with_reloader File "C:\Python36\lib\site-packages\django\utils\autoreload.py", line 304 in python_reloader File "C:\Python36\lib\site-packages\django\utils\autoreload.py", line 333 in main File "C:\Python36\lib\site-packages\django\core\management\commands\runserver.py", line 106 in run File "C:\Python36\lib\site-packages\django\core\management\commands\runserver.py", line 97 in handle File "C:\Python36\lib\site-packages\django\core\management\base.py", line 345 in execute File "C:\Python36\lib\site-packages\django\core\management\commands\runserver.py", line 58 in execute File "C:\Python36\lib\site-packages\django\core\management\base.py", line 294 in run_from_argv File "C:\Python36\lib\site-packages\django\core\management\__init__.py", line 359 in execute File "C:\Python36\lib\site-packages\django\core\management\__init__.py", line 367 in execute_from_command_line File "C:/Users/cmcka/PycharmProjects/test/manage.py", line 22 in File "C:\Users\cmcka\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\171.3780.115\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18 in execfile File "C:\Users\cmcka\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\171.3780.115\helpers\pydev\pydevd.py", line 1015 in run File "C:\Users\cmcka\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\171.3780.115\helpers\pydev\pydevd.py", line 1578 in Process finished with exit code -1073741819 (0xC0000005) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 14:32:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 18:32:36 +0000 Subject: [issue12414] getsizeof() on code objects is wrong In-Reply-To: <1309060401.87.0.459388249467.issue12414@psf.upfronthosting.co.za> Message-ID: <1490553156.04.0.506202141645.issue12414@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See gettotalsizeof.py attached to issue19048. It contains two functions that calculates the total size of the object with subobjects recursively. The problem is that virtually all objects are linked, two functions use slightly different criteria for stopping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 15:17:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Mar 2017 19:17:24 +0000 Subject: [issue19824] string.Template: Add PHP-style variable expansion example In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1490555844.18.0.482139498742.issue19824@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Formatting with locals() and globals() should be used with careful. This is not the most idiomatic way of formatting. I think that the post in specialised blog would be better place for describing it than Python stdlib documentation. Peoples coming from PHP world can use f-strings. ---------- nosy: +serhiy.storchaka status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 16:17:31 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 26 Mar 2017 20:17:31 +0000 Subject: [issue19824] string.Template: Add PHP-style variable expansion example In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1490559451.2.0.0368440781312.issue19824@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: We should really restructure string.Template documentation to emphasize i18n. That's always been its prime use case, and f-strings don't change that (because f-strings are not really appropriate for translations). Before f-strings, string.Template had other common uses. But f-strings do fulfill most other cases where people were using string.Template, so let's make sure that distinction is clear to people. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 18:18:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 26 Mar 2017 22:18:00 +0000 Subject: [issue29910] Ctrl-D eats a character on IDLE In-Reply-To: <1490549101.95.0.397312441336.issue29910@psf.upfronthosting.co.za> Message-ID: <1490566680.28.0.625296578886.issue29910@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Checking, I see that the default ^D binding to DEL is documented in IDLE Help, section 2, Editing and Navigation, along with other Text defaults. (I need to determine if the list is complete. Is it the same on all systems?) I question whether IDLE should allow these to be changed, or whether at least some should be fixed. The information should certainly be made available somehow in the key customization UI. The UI should inform users when a proposed customization creates a conflict with existing bindings. (This last is more or less covered by other issues.) In Shell, ^D is treated as EOF and closes the window (but not IDLE if another window is open), even (recently) on Windows. > Ctrl-D is binded to commenting out a block in IDLE. This is only true in the IDLE Modern UNIX binding that you wrote for 3.6 (and possibly in user customizations). All other builtin bindings use Alt-3 for 'comment-region'. If I had noticed the conflict before pushing, I would have brought it up. Too late. As for the patch. Adding "return 'break'" in general looks good, but I have not checked each case yet. (Not having side by side diffs as with Rietveld makes this much harder.) In some places, you add "return None" instead. I am not sure why the difference. If there is a masked binding, having 'key-x' do one thing sometimes and something else other times would seem disconcerting. Removing "assertIsNone()" in test_parenmatch.py appears valid since the assert did not really test much for calls that always returned None (and now always 'break'). Improving that test file would be a new issue. Testing the change in wrapper functions of the form def xyz_event(event): xyz() return 'break' will be easy: check that a mock xyz is called and that the wrapper returns 'break'. Testing xyz itself can be deferred. Testing event handlers that do the work internally, as in (un)comment_region_event, will require some fixture setup. As before, I expect to work on adding tests. Since idelib essentially identical in 3.6 and 3.7, I think your original cherry-pick 3.6 tag was correct in that the patch should work as is. It would have to be changed at least as far as file names is concerned for other versions, but since the Modern Unix keyset and associated changes were new in 3.6 and not backported, I am not inclined to backport this either. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 19:42:37 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Sun, 26 Mar 2017 23:42:37 +0000 Subject: [issue29912] Overlapping tests between list_tests and seq_tests Message-ID: <1490571757.15.0.357120556689.issue29912@psf.upfronthosting.co.za> New submission from Jim Fasarakis-Hilliard: Seems the CommonTests class defined in list_tests duplicates the testing performed by seq_tests.CommonTests in the following functions: test_index, test_count Additionally, a part of test_imul from list_tests.CommonTests can be moved to seq_tests.CommonTests. (specifically, up until ` self.assertEqual(u, self.type2test([]))`). Am I missing some non-obvious thing here or can I safely remove the two test functions in list_tests.CommonTests and move (while also adding a super call) part of test_imul from list_tests.CommonTests to test_imul in seq_tests.CommonTests? Some links: [1a] seq_tests test_index: https://github.com/python/cpython/blob/1e73dbbc29c96d0739ffef92db36f63aa1aa30da/Lib/test/seq_tests.py#L363 [1b] list_tests test_index: https://github.com/python/cpython/blob/1e73dbbc29c96d0739ffef92db36f63aa1aa30da/Lib/test/list_tests.py#L376 [2a] seq_tests test_count: https://github.com/python/cpython/blob/1e73dbbc29c96d0739ffef92db36f63aa1aa30da/Lib/test/seq_tests.py#L344 [2b] list_tests test_count: https://github.com/python/cpython/blob/1e73dbbc29c96d0739ffef92db36f63aa1aa30da/Lib/test/list_tests.py#L357 [3a] seq_tests test_imul: https://github.com/python/cpython/blob/1e73dbbc29c96d0739ffef92db36f63aa1aa30da/Lib/test/seq_tests.py#L300 [3b] list_tests test_imul: https://github.com/python/cpython/blob/1e73dbbc29c96d0739ffef92db36f63aa1aa30da/Lib/test/list_tests.py#L550 ---------- components: Tests messages: 290550 nosy: Jim Fasarakis-Hilliard priority: normal severity: normal status: open title: Overlapping tests between list_tests and seq_tests type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 20:03:13 2017 From: report at bugs.python.org (Eric Hopper) Date: Mon, 27 Mar 2017 00:03:13 +0000 Subject: [issue29909] types.coroutine monkey patches original function In-Reply-To: <1490518797.37.0.740685001336.issue29909@psf.upfronthosting.co.za> Message-ID: <1490572993.28.0.462391456082.issue29909@psf.upfronthosting.co.za> Eric Hopper added the comment: Here's an update to types.coroutine that fixes the problem for me. ---------- Added file: http://bugs.python.org/file46756/types.coroutine.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 20:48:25 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 27 Mar 2017 00:48:25 +0000 Subject: [issue19824] string.Template: Rewrite docs to emphasize i18n use case In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1490575705.49.0.0338395057397.issue19824@psf.upfronthosting.co.za> R. David Murray added the comment: Let's retitle this, then. ---------- nosy: +r.david.murray title: string.Template: Add PHP-style variable expansion example -> string.Template: Rewrite docs to emphasize i18n use case _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 21:06:51 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 27 Mar 2017 01:06:51 +0000 Subject: [issue29908] Inconsistent crashing with an access violation In-Reply-To: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> Message-ID: <1490576811.63.0.615815178577.issue29908@psf.upfronthosting.co.za> Steve Dower added the comment: Have you confirmed this occurring with 3.5? PyCharm has a very invasive debugger that is almost certainly responsible, but there's a significant difference between the 3.5 and 3.6 implementations that is probably relevant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 21:12:57 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 27 Mar 2017 01:12:57 +0000 Subject: [issue29911] Uninstall command line in Windows registry does not uninstall In-Reply-To: <1490551774.28.0.407532543156.issue29911@psf.upfronthosting.co.za> Message-ID: <1490577177.35.0.648792623443.issue29911@psf.upfronthosting.co.za> Steve Dower added the comment: I'll take a look at having separate commands set, but the component responsible is external and this may be an issue for them. Also, for future reference, continuing to point out that you would have preferred an MSI does not help you get faster assistance, and does not count as more "votes" towards any change. Continuing to add it will eventually annoy the volunteers who work on CPython sufficiently that you may find it very hard to get any attention at all. ---------- assignee: -> steve.dower versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 21:43:22 2017 From: report at bugs.python.org (Lisa Roach) Date: Mon, 27 Mar 2017 01:43:22 +0000 Subject: [issue20774] collections.deque should ship with a stdlib json serializer In-Reply-To: <1393362950.58.0.308283739635.issue20774@psf.upfronthosting.co.za> Message-ID: <1490579002.31.0.741733611861.issue20774@psf.upfronthosting.co.za> Lisa Roach added the comment: I made PR 830 for this issue, it seems to be a nice feature to have in my opinion. Let me know if I should add some unit tests :) ---------- nosy: +lisroach pull_requests: +734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 21:52:12 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Mon, 27 Mar 2017 01:52:12 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490579532.5.0.212103016716.issue29888@psf.upfronthosting.co.za> Kinebuchi Tomohiko added the comment: @ned.deily Thank you for the commend. I updated the 2.7 PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 22:04:02 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 27 Mar 2017 02:04:02 +0000 Subject: [issue29162] pyshell.py: name 'sys' is not defined In-Reply-To: <1483579208.82.0.533923327462.issue29162@psf.upfronthosting.co.za> Message-ID: <1490580242.76.0.29231456053.issue29162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Reopening because I missed file=sys.__stderr__ in the print() above sys.exit ;-(. Reported by JelleZijlstra in PR. I wonder if there is any way to force an import to fail when testing. I could at least partly test by moving the code for import failure and that for "if TkVersion < 8.5" into functions. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 22:13:41 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Mon, 27 Mar 2017 02:13:41 +0000 Subject: [issue29162] pyshell.py: name 'sys' is not defined In-Reply-To: <1483579208.82.0.533923327462.issue29162@psf.upfronthosting.co.za> Message-ID: <1490580821.03.0.413208297723.issue29162@psf.upfronthosting.co.za> Changes by Jelle Zijlstra : ---------- pull_requests: +735 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 22:25:13 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 27 Mar 2017 02:25:13 +0000 Subject: [issue29162] pyshell.py: name 'sys' is not defined In-Reply-To: <1483579208.82.0.533923327462.issue29162@psf.upfronthosting.co.za> Message-ID: <1490581513.03.0.0652046907192.issue29162@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +736 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 22:47:47 2017 From: report at bugs.python.org (Christian Ullrich) Date: Mon, 27 Mar 2017 02:47:47 +0000 Subject: [issue29911] Uninstall command line in Windows registry does not uninstall In-Reply-To: <1490551774.28.0.407532543156.issue29911@psf.upfronthosting.co.za> Message-ID: <1490582867.09.0.356767228472.issue29911@psf.upfronthosting.co.za> Christian Ullrich added the comment: Thank you. As for the pointing out: It worked for Cato, didn't it? He may not have lived to see it, but his perseverance in the face of rejection eventually brought about the years-long bloody war he had dreamed about. (Any historical inaccuracies in the above are the property of the author.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 22:48:39 2017 From: report at bugs.python.org (Zachary Ware) Date: Mon, 27 Mar 2017 02:48:39 +0000 Subject: [issue29911] Uninstall command line in Windows registry does not uninstall In-Reply-To: <1490551774.28.0.407532543156.issue29911@psf.upfronthosting.co.za> Message-ID: <1490582919.6.0.900576998176.issue29911@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: -zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 22:59:16 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 27 Mar 2017 02:59:16 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490583556.6.0.177752946382.issue29888@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 6f95b37f290e0225aed5f8f7733ad0730601201b by Ned Deily (cocoatomo) in branch '2.7': bpo-29888: Fix the link referring to "Python download page" (GH-823) https://github.com/python/cpython/commit/6f95b37f290e0225aed5f8f7733ad0730601201b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 23:02:26 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 27 Mar 2017 03:02:26 +0000 Subject: [issue29888] The link referring to "Python download page" is broken In-Reply-To: <1490292263.44.0.884300917971.issue29888@psf.upfronthosting.co.za> Message-ID: <1490583746.65.0.824776334389.issue29888@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 23:16:46 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 27 Mar 2017 03:16:46 +0000 Subject: [issue20552] Use specific asserts in bytes tests In-Reply-To: <1391804856.25.0.0710909652112.issue20552@psf.upfronthosting.co.za> Message-ID: <1490584606.81.0.857476803261.issue20552@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Raymond, Am I correct in thinking that your comment is not specific to bytes but applies to all patches like this? If so, I think I agree because any future changes that break tests will almost certain happen in 3.7+, so that the extra work of backporting will have almost 0 gain. In a few years, the changes will be in all currently active branches for free. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Mar 26 23:24:55 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 27 Mar 2017 03:24:55 +0000 Subject: [issue20774] collections.deque should ship with a stdlib json serializer In-Reply-To: <1393362950.58.0.308283739635.issue20774@psf.upfronthosting.co.za> Message-ID: <1490585095.07.0.140496245724.issue20774@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks Lisa. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 00:41:19 2017 From: report at bugs.python.org (Eryk Sun) Date: Mon, 27 Mar 2017 04:41:19 +0000 Subject: [issue29908] Inconsistent crashing with an access violation In-Reply-To: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> Message-ID: <1490589679.02.0.738185391715.issue29908@psf.upfronthosting.co.za> Eryk Sun added the comment: Steve, I added 3.5 because the crash involved ucrtbase.dll. I'll remove it for now since the problem is only confirmed in 3.6. Offset 0x3bd9e in 32-bit ucrtbase.dll is in wdupenv_s [1]. It's probably from calling new_spawnve in pydev_monkey.py, as shown in the faulthandler output. I don't use PyCharm, so I can't confirm this, but we know wdupenv_s is called by the CRT's wspawnve function. For example: >>> os.spawnve(os.P_WAIT, sys.executable, ['python', '-V'], os.environ) Breakpoint 0 hit eax=01b412b0 ebx=00000000 ecx=01b41280 edx=01b412b2 esi=01b41280 edi=00000000 eip=7672bd9e esp=013ef368 ebp=013ef380 iopl=0 nv up ei pl nz na po nc cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202 ucrtbase!wdupenv_s+0x18e: 7672bd9e 668b08 mov cx,word ptr [eax] ds:002b:01b412b0=0070 0:000> kc 7 ucrtbase!wdupenv_s ucrtbase!wsearchenv_s ucrtbase!wspawnlpe ucrtbase!wspawnlpe ucrtbase!wspawnve python36!os_spawnve_impl python36!os_spawnve [1]: https://msdn.microsoft.com/en-us/library/ms175774.aspx ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 01:35:24 2017 From: report at bugs.python.org (Zachary Ware) Date: Mon, 27 Mar 2017 05:35:24 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1490592924.75.0.178367067682.issue27425@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- pull_requests: +737 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 01:37:58 2017 From: report at bugs.python.org (Zachary Ware) Date: Mon, 27 Mar 2017 05:37:58 +0000 Subject: [issue29763] test_site failing on AppVeyor In-Reply-To: <1489009179.7.0.320606146583.issue29763@psf.upfronthosting.co.za> Message-ID: <1490593078.36.0.275447932457.issue29763@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- pull_requests: +738 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 01:38:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 05:38:04 +0000 Subject: [issue19824] string.Template: Rewrite docs to emphasize i18n use case In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1490593084.22.0.342125123093.issue19824@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In that case issue20314 looks related. ---------- stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 01:58:06 2017 From: report at bugs.python.org (Cameron Mckain) Date: Mon, 27 Mar 2017 05:58:06 +0000 Subject: [issue29908] Inconsistent crashing with an access violation In-Reply-To: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> Message-ID: <1490594286.5.0.957645936544.issue29908@psf.upfronthosting.co.za> Cameron Mckain added the comment: The problem was fixed after updating to Django 1.11; apparently, Django 1.10 is not fully compatible with Python 3.6. Thanks for your time. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 02:01:25 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 27 Mar 2017 06:01:25 +0000 Subject: [issue29162] pyshell.py: name 'sys' is not defined In-Reply-To: <1483579208.82.0.533923327462.issue29162@psf.upfronthosting.co.za> Message-ID: <1490594485.78.0.92670130749.issue29162@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 02:54:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 06:54:25 +0000 Subject: [issue20774] collections.deque should ship with a stdlib json serializer In-Reply-To: <1393362950.58.0.308283739635.issue20774@psf.upfronthosting.co.za> Message-ID: <1490597665.64.0.237588174622.issue20774@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems there are reference leaks. And I afraid that importing a module for every serialized object can significantly hit the performance. Can you run some benchmarks? > An __json__ attribute would have to convert to a list first. Adding support directly to the json module would allow the deque to be read directly. With PR 830 the deque is converted to a list by json encoder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 03:23:36 2017 From: report at bugs.python.org (Sanjay) Date: Mon, 27 Mar 2017 07:23:36 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation Message-ID: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> New submission from Sanjay: according to the docs compare_networks only checks the network address but the implementation is also taking the mask length into account. It returns '0' only if both the network address and the mask are equal but this can be done with just equality check ( ip1 == ip2 ) Example: >>> ip1=ipaddress.ip_network("1.1.1.0/24") >>> ip2=ipaddress.ip_network("1.1.1.0/25") >>> ip1.compare_networks(ip2) -1 >>> ip1 == ip2 False >>> ip1.network_address IPv4Address('1.1.1.0') >>> ip2.network_address IPv4Address('1.1.1.0') >>> shouldn't we ignore the mask length ? I have tried it here: https://github.com/s-sanjay/cpython/commit/942073c1ebd29891e047b5e784750c2b6f74494a ---------- components: Library (Lib) messages: 290566 nosy: Sanjay priority: normal severity: normal status: open title: ipadress compare_networks does not work according to documentation type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 03:25:27 2017 From: report at bugs.python.org (Sanjay) Date: Mon, 27 Mar 2017 07:25:27 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation In-Reply-To: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> Message-ID: <1490599527.41.0.984394498352.issue29913@psf.upfronthosting.co.za> Changes by Sanjay : ---------- pull_requests: +739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 04:01:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 08:01:08 +0000 Subject: [issue29914] Incorrect signatures of object.__reduce__() and object.__reduce_ex__() Message-ID: <1490601668.43.0.188654711703.issue29914@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The special method __reduce__() doesn't take arguments, the special method __reduce_ex__() takes one mandatory argument. But default implementations in the object class takes one optional argument. This looks as an oversign. Proposed patch fixes signatures of object.__reduce__() and object.__reduce_ex__(). ---------- components: Interpreter Core messages: 290567 nosy: alexandre.vassalotti, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Incorrect signatures of object.__reduce__() and object.__reduce_ex__() type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 04:12:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 08:12:13 +0000 Subject: [issue29914] Incorrect signatures of object.__reduce__() and object.__reduce_ex__() In-Reply-To: <1490601668.43.0.188654711703.issue29914@psf.upfronthosting.co.za> Message-ID: <1490602333.45.0.598075247277.issue29914@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +740 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 04:21:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 08:21:04 +0000 Subject: [issue29910] Ctrl-D eats a character on IDLE In-Reply-To: <1490549101.95.0.397312441336.issue29910@psf.upfronthosting.co.za> Message-ID: <1490602864.95.0.589394376158.issue29910@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > (Not having side by side diffs as with Rietveld makes this much harder.) Click on the "Files changed" tab on the PR page: https://github.com/python/cpython/pull/825/files . You can add inline comments when click on the "+" button that follows your mouse cursor. After entering the comment press the GREEN "Start a review" button rather than "Add single comment". This will allow to send all your comments at once rather than sending them as separate emails, and will allow to edit or remove comments before sending them. After reviewing all changes press the GREEN button at the top right corner of the page for sending your comments. Yes, it is my fault that I missed the conflict. But the user can add conflicting shortcuts for other events, so it would be better to make them safe even if there re not conflicts in standard configuration. > In some places, you add "return None" instead. PEP 8: "Be consistent in return statements. Either all return statements in a function should return an expression, or none of them should. If any return statement returns an expression, any return statements where no value is returned should explicitly state this as return None , and an explicit return statement should be present at the end of the function (if reachable)." > If there is a masked binding, having 'key-x' do one thing sometimes and something else other times would seem disconcerting. I think this is okay. In the specific context one this is done, but if this context does not exist fall back to doing other thing. I don't think special tests are needed. There are too much event handlers, and testing them with monkey-patching will just complicate the code and will not check anything beside the fact that that event handlers are written in special style. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 04:36:43 2017 From: report at bugs.python.org (ioanatia) Date: Mon, 27 Mar 2017 08:36:43 +0000 Subject: [issue1025395] email.Utils.parseaddr fails to parse valid addresses Message-ID: <1490603803.9.0.138034873576.issue1025395@psf.upfronthosting.co.za> Changes by ioanatia : ---------- nosy: +ioanatia _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 04:43:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 08:43:09 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation In-Reply-To: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> Message-ID: <1490604189.59.0.487424842592.issue29913@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +ncoghlan, pmoody _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 04:55:06 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 27 Mar 2017 08:55:06 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation In-Reply-To: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> Message-ID: <1490604906.41.0.518497878891.issue29913@psf.upfronthosting.co.za> Xiang Zhang added the comment: In my mind this is the wanted behaviour. `compare_networks` means compare one network to another and a network should count its mask in. Your example would look rather weird if 1.1.1.0/24 == 1.1.1.0/25. Maybe make the doc from 'network addresses' to 'network bits' is easier to understand. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 05:29:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 09:29:04 +0000 Subject: [issue29915] Drop Mac OS X Tiger support in Python 3.7? Message-ID: <1490606944.79.0.982783891513.issue29915@psf.upfronthosting.co.za> New submission from STINNER Victor: Hi, Last september I already proposed the same thing for Python 3.6 (issue #28099), but Ned Deily asked to keep OS X Tiger supper. The Tiger buildbot fails since many years: http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/479/steps/test/logs/stdio It doesn't seem like anyone take care of this buildbot. Mac OS X Tiger was released in 2004 (13 years ago). The last update was 10.4.11: November 14, 2007 (9 years ago). "Support status: Unsupported as of September 2009, Safari support ended November 2010." https://en.wikipedia.org/wiki/Mac_OS_X_Tiger ---------- components: Build messages: 290570 nosy: haypo, ned.deily priority: normal severity: normal status: open title: Drop Mac OS X Tiger support in Python 3.7? versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 05:34:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 09:34:17 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1490607257.86.0.552115880752.issue27425@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +741 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 05:37:23 2017 From: report at bugs.python.org (Sanjay) Date: Mon, 27 Mar 2017 09:37:23 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation In-Reply-To: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> Message-ID: <1490607443.57.0.547190565066.issue29913@psf.upfronthosting.co.za> Sanjay added the comment: yes but compare_networks is not used to implement equality check. __eq__ correctly returns False when we do 1.1.1.0/24 == 1.1.1.0/25. If compare_networks works exactly like __eq__ then it seems a bit redundant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 05:44:12 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 27 Mar 2017 09:44:12 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation In-Reply-To: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> Message-ID: <1490607852.65.0.391933003449.issue29913@psf.upfronthosting.co.za> Nick Coghlan added the comment: Looking into it, this appears to be a holdover from the original ipaddr design where rather than being modelled as separate objects, host interfaces are modelled as denormalised network objects (i.e. a host address with a netmask). So the stdlib equivalent of the original ipaddr compare_networks() operation would be: >>> ip_interface('192.0.2.1/31').network == ip_network('192.0.2.0/31') True As Sanjay noted, compare_networks() itself is fairly redundant given the stricter stdlib data model, since we don't allow the creation of denormalised network definitions in the first place: ``` >>> ip_network('192.0.2.1/31') Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.5/ipaddress.py", line 74, in ip_network return IPv4Network(address, strict) File "/usr/lib64/python3.5/ipaddress.py", line 1536, in __init__ raise ValueError('%s has host bits set' % self) ValueError: 192.0.2.1/31 has host bits set ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 06:10:16 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 27 Mar 2017 10:10:16 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation In-Reply-To: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> Message-ID: <1490609416.23.0.757711339103.issue29913@psf.upfronthosting.co.za> Xiang Zhang added the comment: I still hold my opinion that the current behaviour is correct. You are comparing two networks and you should count the mask in. And notice that `neta == netb` is not totally equal to `neta.compare_networks(netb)`. The former can only results True or False but the later could result -1, 0 and 1. For example: >>> IPv4Network('192.0.2.0/25') == IPv4Network('192.0.2.0/25') True >>> IPv4Network('192.0.2.0/25').compare_networks(IPv4Network('192.0.2.0/25')) 0 >>> They can't be used exchangably. `compare_networks` actually does the work of all <, >, ==. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 06:26:54 2017 From: report at bugs.python.org (Michael Seifert) Date: Mon, 27 Mar 2017 10:26:54 +0000 Subject: [issue29916] No explicit documentation for PyGetSetDef and getter and setter C-API Message-ID: <1490610414.6.0.8634942266.issue29916@psf.upfronthosting.co.za> New submission from Michael Seifert: A copy of the struct definition can be found in the typeobject documentation [1]. There is also some explanation of the "closure" function pointer in the extending tutorial [2]. However the struct isn't explicitly defined as "c:type" so the 6 links to it in the documentations go nowhere. I also submitted a pull request. [1] https://docs.python.org/3.6/c-api/typeobj.html#c.PyTypeObject.tp_getset [2] https://docs.python.org/3/extending/newtypes.html ---------- assignee: docs at python components: Documentation messages: 290574 nosy: MSeifert, docs at python priority: normal pull_requests: 742 severity: normal status: open title: No explicit documentation for PyGetSetDef and getter and setter C-API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 06:31:12 2017 From: report at bugs.python.org (Michael Seifert) Date: Mon, 27 Mar 2017 10:31:12 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation Message-ID: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> New submission from Michael Seifert: The `link`-target of the "type" struct member is the python built-in "type". See [1]. I think it should not be a link at all. [1] https://docs.python.org/3.7/c-api/structures.html#c.PyMemberDef ---------- assignee: docs at python components: Documentation messages: 290575 nosy: MSeifert, docs at python priority: normal severity: normal status: open title: Wrong link target in PyMethodDef documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 06:33:59 2017 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Mon, 27 Mar 2017 10:33:59 +0000 Subject: [issue18059] Add multibyte encoding support to pyexpat In-Reply-To: <1369507288.26.0.471852341095.issue18059@psf.upfronthosting.co.za> Message-ID: <1490610839.11.0.77105436516.issue18059@psf.upfronthosting.co.za> Walter D?rwald added the comment: This looks to me like a limited reimplementation of the codec machinery. Why not use incremental codecs as a preprocessor? Would this be to slow? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 06:37:52 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 27 Mar 2017 10:37:52 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation In-Reply-To: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> Message-ID: <1490611072.56.0.920470434145.issue29913@psf.upfronthosting.co.za> Nick Coghlan added the comment: Right, I agree compare_networks() is behaving correctly according to its original design. However: - it was designed for Python 2, where cmp() style idioms were still more common. Those idioms have largely been removed in Python 3 (no cmp() builtin, no __cmp__ magic method, no cmp argument to list.sort() and sorted()) - it was designed for the ipaddr data model, where network equality comparisons are more like ipaddress.ip_interface comparisons than they ipaddress.ip_network comparisons Since there isn't any real maintenance burden in keeping the code around, I'm flipping this to be purely a documentation issue and suggesting that we: - mark the method as deprecated in the docs, but *not* in the code (using the method form is just kind of pointless, not actively harmful) - update the docs to say that it uses the same ordering and comparison algorithm as "<", "==", and ">" (the current confusion stems from the fact that the algorithms were different in ipaddr, but in the stdlib that other algorithm is the one used by interface objects, not network objects) ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 06:48:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 10:48:10 +0000 Subject: [issue12414] getsizeof() on code objects is wrong In-Reply-To: <1309060401.87.0.459388249467.issue12414@psf.upfronthosting.co.za> Message-ID: <1490611690.85.0.0864737862128.issue12414@psf.upfronthosting.co.za> STINNER Victor added the comment: code_sizeof() must be updated to take in account co_extra memory: co_extra.ce_size * sizeof(co_extra.ce_extras[0]) bytes. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 06:48:20 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 27 Mar 2017 10:48:20 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation In-Reply-To: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> Message-ID: <1490611700.87.0.0675714305324.issue29913@psf.upfronthosting.co.za> Xiang Zhang added the comment: +1 for the doc change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 06:49:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 10:49:19 +0000 Subject: [issue11989] deprecate shutil.copy2 In-Reply-To: <1304457480.12.0.859066442239.issue11989@psf.upfronthosting.co.za> Message-ID: <1490611759.59.0.702051462212.issue11989@psf.upfronthosting.co.za> STINNER Victor added the comment: I like proposed changed. ---------- nosy: +haypo status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 06:52:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 10:52:13 +0000 Subject: [issue29899] zlib missing when --enable--optimizations option appended In-Reply-To: <1490419181.2.0.645690574744.issue29899@psf.upfronthosting.co.za> Message-ID: <1490611933.13.0.277835919358.issue29899@psf.upfronthosting.co.za> STINNER Victor added the comment: Can you please attach config.log file? And maybe also redirect the output of "make" into a log file and then attach this log file as well? Example: make 2>&1 >make.log. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 06:57:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 10:57:17 +0000 Subject: [issue23241] shutil should accept pathlib types In-Reply-To: <1421240576.75.0.719151648499.issue23241@psf.upfronthosting.co.za> Message-ID: <1490612237.07.0.637263011253.issue23241@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm unable to reproduce the bug on Python 3.6: --- from pathlib import Path import shutil import os def touch(name): with open(name, "x"): pass os.mkdir('a') touch('a/x') touch('a/y') touch('a/z') os.mkdir('b') source_path = Path('a') destination_path = Path('b') for file_name in source_path.glob('*'): file_name = file_name.name src = source_path / file_name dst = destination_path / file_name print("%r -> %r" % (src, dst)) shutil.copyfile(src, dst) --- Output: --- PosixPath('a/y') -> PosixPath('b/y') PosixPath('a/x') -> PosixPath('b/x') PosixPath('a/z') -> PosixPath('b/z') --- Thank you PEP 519 ;-) ---------- nosy: +haypo resolution: -> fixed stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 06:59:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 10:59:09 +0000 Subject: [issue20552] Use specific asserts in bytes tests In-Reply-To: <1391804856.25.0.0710909652112.issue20552@psf.upfronthosting.co.za> Message-ID: <1490612349.65.0.631205129653.issue20552@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 604e74c6beb2585c81083fa85f0e5a4d46965cbc by Victor Stinner (Serhiy Storchaka) in branch 'master': bpo-20552: Use specific asserts in bytes tests (#790) https://github.com/python/cpython/commit/604e74c6beb2585c81083fa85f0e5a4d46965cbc ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:11:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 11:11:36 +0000 Subject: [issue21071] struct.Struct.format is bytes, but should be str In-Reply-To: <1395856133.5.0.672707015318.issue21071@psf.upfronthosting.co.za> Message-ID: <1490613096.47.0.844637716583.issue21071@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +743 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:14:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 11:14:00 +0000 Subject: [issue21071] struct.Struct.format is bytes, but should be str In-Reply-To: <1395856133.5.0.672707015318.issue21071@psf.upfronthosting.co.za> Message-ID: <1490613240.64.0.0175429067557.issue21071@psf.upfronthosting.co.za> STINNER Victor added the comment: I created https://github.com/python/cpython/pull/845 to change struct.Struct.format type to str (Unicode). struct.Struct() accepts bytes and str format strings, so it's not really a backward incompatible change. It's just a minor enhancement to help development: $ ./python Python 3.7.0a0 (heads/master-dirty:b8a7daf, Mar 27 2017, 13:02:20) >>> print(struct.Struct('hi').format) hi Without the patch: haypo at selma$ python3 Python 3.5.2 (default, Sep 14 2016, 11:28:32) [GCC 6.2.1 20160901 (Red Hat 6.2.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import struct >>> print(struct.Struct('hi').format) b'hi' haypo at selma$ python3 -bb Python 3.5.2 (default, Sep 14 2016, 11:28:32) >>> import struct >>> print(struct.Struct('hi').format) Traceback (most recent call last): ... BytesWarning: str() on a bytes instance ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:15:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 11:15:29 +0000 Subject: [issue29176] /tmp does not exist on Android and is used by curses.window.putwin() In-Reply-To: <1483699620.77.0.827616599041.issue29176@psf.upfronthosting.co.za> Message-ID: <1490613329.17.0.876404936354.issue29176@psf.upfronthosting.co.za> STINNER Victor added the comment: Chi Hsuan Yen confirmed that "python3.7m -m test test_curses -u curses" now pass on Android, so I close the issue. Thanks. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:17:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 11:17:53 +0000 Subject: [issue29720] potential silent truncation in PyLong_AsVoidPtr In-Reply-To: <1488643924.71.0.864156118334.issue29720@psf.upfronthosting.co.za> Message-ID: <1490613473.58.0.540166755305.issue29720@psf.upfronthosting.co.za> STINNER Victor added the comment: "I am not sure whether such a platform exists, but on a platform where SIZEOF_VOID_P < SIZEOF_LONG, PyLong_AsVoidPtr ..." I'm suite sure that every C function of CPython breaks if this assumption becomes wrong :-) Such platform doesn't exist. You can add the build assertion if it makes you more confortable ;-) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:21:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 11:21:30 +0000 Subject: [issue29680] gdb/libpython.py does not work with gdb 7.2 In-Reply-To: <1488335804.47.0.122589974382.issue29680@psf.upfronthosting.co.za> Message-ID: <1490613690.17.0.463429077975.issue29680@psf.upfronthosting.co.za> STINNER Victor added the comment: @belopolsky: Tools/gdb/libpython.py still uses gdb.error in gdb.selected_frame(): try: frame = cls.get_selected_frame() except gdb.error: # No frame: Python didn't start yet return None See my commit 610f5d739dd22bce352bde59dce3985c73aaefab. Should we change this line as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:30:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 11:30:45 +0000 Subject: [issue29918] Missed "const" modifiers in C API documentation Message-ID: <1490614245.98.0.401745534622.issue29918@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch adds missed "const" modifiers in C API documentation. ---------- assignee: docs at python components: Documentation messages: 290588 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Missed "const" modifiers in C API documentation type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:31:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 11:31:09 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1490614269.47.0.771348585154.issue29572@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI I started to track OpenSSL versions in my "Python security" documentation: http://python-security.readthedocs.io/ssl.html#openssl-versions It seems like all pull requests are merged. Can the issue be closed now? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:32:01 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Mon, 27 Mar 2017 11:32:01 +0000 Subject: [issue29912] Overlapping tests between list_tests and seq_tests In-Reply-To: <1490571757.15.0.357120556689.issue29912@psf.upfronthosting.co.za> Message-ID: <1490614321.11.0.990473771787.issue29912@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Correction: test_index *partially* duplicates the base class method. It too can be modified to use super like test_imul. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:32:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 11:32:10 +0000 Subject: [issue29918] Missed "const" modifiers in C API documentation In-Reply-To: <1490614245.98.0.401745534622.issue29918@psf.upfronthosting.co.za> Message-ID: <1490614330.64.0.0532164792715.issue29918@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +744 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:46:39 2017 From: report at bugs.python.org (kyren) Date: Mon, 27 Mar 2017 11:46:39 +0000 Subject: [issue29899] zlib missing when --enable--optimizations option appended In-Reply-To: <1490419181.2.0.645690574744.issue29899@psf.upfronthosting.co.za> Message-ID: <1490615199.81.0.380530376685.issue29899@psf.upfronthosting.co.za> kyren added the comment: This is the config.log. ---------- Added file: http://bugs.python.org/file46757/config.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:47:09 2017 From: report at bugs.python.org (kyren) Date: Mon, 27 Mar 2017 11:47:09 +0000 Subject: [issue29899] zlib missing when --enable--optimizations option appended In-Reply-To: <1490419181.2.0.645690574744.issue29899@psf.upfronthosting.co.za> Message-ID: <1490615229.15.0.952993812958.issue29899@psf.upfronthosting.co.za> kyren added the comment: This is make.log. ---------- Added file: http://bugs.python.org/file46758/make.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:50:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 11:50:34 +0000 Subject: [issue29720] potential silent truncation in PyLong_AsVoidPtr In-Reply-To: <1488643924.71.0.864156118334.issue29720@psf.upfronthosting.co.za> Message-ID: <1490615434.47.0.779948843578.issue29720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I'm suite sure that every C function of CPython breaks if this assumption becomes wrong :-) Such platform doesn't exist. Did you meant 64-bit Windows? ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:55:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 11:55:21 +0000 Subject: [issue29720] potential silent truncation in PyLong_AsVoidPtr In-Reply-To: <1488643924.71.0.864156118334.issue29720@psf.upfronthosting.co.za> Message-ID: <1490615721.57.0.634776943811.issue29720@psf.upfronthosting.co.za> STINNER Victor added the comment: > Did you meant 64-bit Windows? ;-) On Windows 64-bit, sizeof(void*) > sizeof(long), not the opposite. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:55:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 11:55:22 +0000 Subject: [issue21071] struct.Struct.format is bytes, but should be str In-Reply-To: <1395856133.5.0.672707015318.issue21071@psf.upfronthosting.co.za> Message-ID: <1490615722.03.0.653776273444.issue21071@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This should be discussed on Python-Dev first. I already raised this issue on Python-Dev, but don't remember what is the result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 07:55:52 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 27 Mar 2017 11:55:52 +0000 Subject: [issue21071] struct.Struct.format is bytes, but should be str In-Reply-To: <1395856133.5.0.672707015318.issue21071@psf.upfronthosting.co.za> Message-ID: <1490615751.98.0.0951145779815.issue21071@psf.upfronthosting.co.za> Martin Panter added the comment: Hi Victor, I?m not sure about changing the data type. As Python 3 grows older, there is potentially more code being written that you break by fixing a bug like this. It is incompatible if you used to write >>> print(struct.Struct('hi').format.decode()) hi I have used this decode() trick in the past to build composite format strings; e.g.: . If you change the data type this code will raise AttributeError. At a minimum you should acknowledge it in the ?porting? section of What?s New. Also, if you make this change, maybe update the module doc string. See the end of format-str.patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 08:01:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 12:01:40 +0000 Subject: [issue29899] zlib missing when --enable--optimizations option appended In-Reply-To: <1490419181.2.0.645690574744.issue29899@psf.upfronthosting.co.za> Message-ID: <1490616100.49.0.728391225215.issue29899@psf.upfronthosting.co.za> STINNER Victor added the comment: Strange, I don't see any obvious error related to the C "z" lib or to the Python "zlib" module. Example on my system: haypo at selma$ python3 Python 3.5.2 (default, Sep 14 2016, 11:28:32) [GCC 6.2.1 20160901 (Red Hat 6.2.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import zlib >>> zlib >>> haypo at selma$ ldd /usr/lib64/python3.5/lib-dynload/zlib.cpython-35m-x86_64-linux-gnu.so linux-vdso.so.1 (0x00007fff22f2e000) libz.so.1 => /lib64/libz.so.1 (0x00007f88e1fe0000) libpython3.5m.so.1.0 => /lib64/libpython3.5m.so.1.0 (0x00007f88e1b13000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f88e18f5000) libc.so.6 => /lib64/libc.so.6 (0x00007f88e152f000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f88e132b000) libutil.so.1 => /lib64/libutil.so.1 (0x00007f88e1126000) libm.so.6 => /lib64/libm.so.6 (0x00007f88e0e1d000) /lib64/ld-linux-x86-64.so.2 (0x000055d00b915000) haypo at selma$ ldd /usr/lib64/python3.5/lib-dynload/zlib.cpython-35m-x86_64-linux-gnu.so^C haypo at selma$ ls -l /lib64/libz.so.1 lrwxrwxrwx. 1 root root 13 5 f?vr. 2016 /lib64/libz.so.1 -> libz.so.1.2.8 Can you check if you have a "zlib.(...).so" file in /usr/lib64/python3.5/lib-dynload/? (ajust to the right directory) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 08:02:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 12:02:21 +0000 Subject: [issue29899] zlib missing when --enable--optimizations option appended In-Reply-To: <1490419181.2.0.645690574744.issue29899@psf.upfronthosting.co.za> Message-ID: <1490616141.26.0.000128791579137.issue29899@psf.upfronthosting.co.za> STINNER Victor added the comment: See also the issue #29641 "make install failure when using ./configure --enable-optimizations". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 08:04:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 12:04:16 +0000 Subject: [issue29720] potential silent truncation in PyLong_AsVoidPtr In-Reply-To: <1488643924.71.0.864156118334.issue29720@psf.upfronthosting.co.za> Message-ID: <1490616256.2.0.525181213763.issue29720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, you are right. I don't know whether Python supports such platform after dropping support of DOS. But in any case I don't see any issue here. Oren will be not active until August, so we should make the decision about closing the issue or changing the code without him. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 08:10:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 12:10:07 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490616607.04.0.182162215835.issue27593@psf.upfronthosting.co.za> STINNER Victor added the comment: The 3.5, 3.6 and master branches of Python have a new sys._git attribute and lost their sys._mercurial attribute. But the 2.7 branch is still stuck at sys._mercurial: version and tag are empty. Should we backport sys._git from master to 2.7 and remove sys._mercurial? Maybe on 2.7 we can keep sys._mercurial. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 08:10:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 12:10:13 +0000 Subject: [issue29918] Missed "const" modifiers in C API documentation In-Reply-To: <1490614245.98.0.401745534622.issue29918@psf.upfronthosting.co.za> Message-ID: <1490616613.48.0.324818184669.issue29918@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 08:14:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 12:14:46 +0000 Subject: [issue21071] struct.Struct.format is bytes, but should be str In-Reply-To: <1490615751.98.0.0951145779815.issue21071@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Ok, I opened a thread on python-dev: https://mail.python.org/pipermail/python-dev/2017-March/147688.html Martin: "At a minimum you should acknowledge it in the ?porting? section of What?s New." I wasn't sure if the change was worth it to be mentionned in What's New in Python 3.7. Ok, will do for the next round (I'm now waiting for more feedback on my python-dev thread and this issue.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 08:15:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 12:15:25 +0000 Subject: [issue29720] potential silent truncation in PyLong_AsVoidPtr In-Reply-To: <1488643924.71.0.864156118334.issue29720@psf.upfronthosting.co.za> Message-ID: <1490616925.62.0.453457811028.issue29720@psf.upfronthosting.co.za> STINNER Victor added the comment: I closed the issue. @Oren: Please reopen the issue with a pull request if you consider that the assertion is worth it. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 08:47:14 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Mon, 27 Mar 2017 12:47:14 +0000 Subject: [issue29912] Overlapping tests between list_tests and seq_tests In-Reply-To: <1490571757.15.0.357120556689.issue29912@psf.upfronthosting.co.za> Message-ID: <1490618834.19.0.639868125496.issue29912@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- pull_requests: +745 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 08:57:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 12:57:26 +0000 Subject: [issue29893] create_subprocess_exec doc doesn't match software In-Reply-To: <1490332817.83.0.92510042207.issue29893@psf.upfronthosting.co.za> Message-ID: <1490619446.28.0.990895370912.issue29893@psf.upfronthosting.co.za> STINNER Victor added the comment: Ah, I wrote "def create_subprocess_exec(program, *args," to implicitly check that args is non empty. We can either change the function prototype to check that args is non-empty in the body, or just update the documentation. The documentation is not exactly wrong :-) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 08:59:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 12:59:28 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" In-Reply-To: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> Message-ID: <1490619568.04.0.137119178147.issue29798@psf.upfronthosting.co.za> STINNER Victor added the comment: Tools/scripts/patchcheck.py still checks isdir() in get_base_branch(): @status("Getting base branch for PR", info=lambda x: x if x is not None else "not a PR branch") def get_base_branch(): if not os.path.isdir(os.path.join(SRCDIR, '.git')): # Not a git checkout, so there's no base branch return None ... Was it deliberate to not change this line? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 09:02:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 13:02:22 +0000 Subject: [issue29887] test_normalization doesn't work In-Reply-To: <1490288230.58.0.523545383484.issue29887@psf.upfronthosting.co.za> Message-ID: <1490619742.82.0.967182555567.issue29887@psf.upfronthosting.co.za> STINNER Victor added the comment: http://www.pythontest.net/unicode/7.0.0/NormalizationTest.txt exists, but not http://www.pythontest.net/unicode/8.0.0/NormalizationTest.txt nor http://www.pythontest.net/unicode/9.0.0/NormalizationTest.txt Maybe the dev who upgrade Unicode to 8.0 and then 9.0 forgot to upload required files to the pythontest website? I confirm that 8.0 and 9.0 lacks from https://github.com/python/pythontestdotnet/tree/master/www/unicode ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 09:03:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 13:03:41 +0000 Subject: [issue29840] Avoid raising OverflowError in bool() In-Reply-To: <1489782446.56.0.355449112547.issue29840@psf.upfronthosting.co.za> Message-ID: <1490619821.96.0.275264137918.issue29840@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy: Can you please create a pull request? It would be easier to review. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 09:05:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 13:05:13 +0000 Subject: [issue29919] Remove unused imports found by pyflakes Message-ID: <1490619913.4.0.443050658966.issue29919@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached PR removes unused imports found by pyflakes. It makes also minor PEP 8 coding style fixes on modified imports. ---------- messages: 290607 nosy: haypo priority: normal pull_requests: 746 severity: normal status: open title: Remove unused imports found by pyflakes versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 09:16:49 2017 From: report at bugs.python.org (Xavier Morel) Date: Mon, 27 Mar 2017 13:16:49 +0000 Subject: [issue29920] Document cgitb.text and cgitb.html Message-ID: <1490620609.02.0.405950190914.issue29920@psf.upfronthosting.co.za> New submission from Xavier Morel: Currently, cgitb documents the hook (enable) and somewhat unclearly the ability to dump the HTML traceback to stdout, but despite that being technically available it does not document the ability to dump the traceback to a string as either text or html. Possible further improvement: make ``cgitb.html`` and ``cgitb.text`` implicitly call `sys.exc_info()` if not given a parameter (much like `cgitb.handler` does). ---------- assignee: docs at python components: Documentation messages: 290608 nosy: docs at python, xmorel priority: normal pull_requests: 747 severity: normal status: open title: Document cgitb.text and cgitb.html type: enhancement versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 09:48:47 2017 From: report at bugs.python.org (m-parry) Date: Mon, 27 Mar 2017 13:48:47 +0000 Subject: [issue29921] datetime validation is stricter in 3.6.1 than previous versions Message-ID: <1490622527.46.0.936939014549.issue29921@psf.upfronthosting.co.za> New submission from m-parry: The change in issue #29100 - intended AFAICS simply to fix a regression in 3.6 - seems to have made datetime validation via certain code paths stricter than it was in 2.7 or 3.5. I think it's the case that some routes via the C API now reject out of range values that were previously permitted. Even if this previous behaviour was incorrect, was it intentional to alter that in a maintenance release? Here's a quick example using pywin32: --- > import getpass, sspi, sspicon, win32security > client_name = getpass.getuser() > auth_info = (client_name, 'wherever.com', None) > pkg_info = win32security.QuerySecurityPackageInfo('Kerberos') > win32security.AcquireCredentialsHandle( > client_name, pkg_info['Name'], > sspicon.SECPKG_CRED_OUTBOUND, > None, auth_info) ValueError: year 30828 is out of range --- Of course, this is probably a mishandling of the 'never expires' value returned by the Windows API in this case, and indeed I have also created a pywin32 ticket. However, I'm guessing that the linked issue wasn't supposed to break such code. ---------- components: Library (Lib) messages: 290609 nosy: m-parry priority: normal severity: normal status: open title: datetime validation is stricter in 3.6.1 than previous versions type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 09:49:48 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 27 Mar 2017 13:49:48 +0000 Subject: [issue29920] Document cgitb.text and cgitb.html In-Reply-To: <1490620609.02.0.405950190914.issue29920@psf.upfronthosting.co.za> Message-ID: <1490622588.55.0.121798452525.issue29920@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 09:55:39 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 27 Mar 2017 13:55:39 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490622939.82.0.599588774069.issue27593@psf.upfronthosting.co.za> Steve Dower added the comment: It needs to be backported there too, or we need to unmigrate 2.7 back to mercurial. Otherwise we can't make a release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 09:57:28 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 27 Mar 2017 13:57:28 +0000 Subject: [issue29908] Inconsistent crashing with an access violation In-Reply-To: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> Message-ID: <1490623048.65.0.477807453527.issue29908@psf.upfronthosting.co.za> Steve Dower added the comment: Do you have a reference to an issue from their side about this? Python should never crash due to pure Python code, so we'd like to be able to prevent this in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 09:57:38 2017 From: report at bugs.python.org (Xavier Morel) Date: Mon, 27 Mar 2017 13:57:38 +0000 Subject: [issue29920] Document cgitb.text and cgitb.html In-Reply-To: <1490620609.02.0.405950190914.issue29920@psf.upfronthosting.co.za> Message-ID: <1490623058.23.0.617936684043.issue29920@psf.upfronthosting.co.za> Xavier Morel added the comment: PR targetted to master rather than 2.7 ---------- pull_requests: +748 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 09:57:49 2017 From: report at bugs.python.org (Xavier Morel) Date: Mon, 27 Mar 2017 13:57:49 +0000 Subject: [issue29920] Document cgitb.text and cgitb.html In-Reply-To: <1490620609.02.0.405950190914.issue29920@psf.upfronthosting.co.za> Message-ID: <1490623069.4.0.97901638162.issue29920@psf.upfronthosting.co.za> Changes by Xavier Morel : ---------- pull_requests: -747 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 10:04:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 14:04:00 +0000 Subject: [issue29919] Remove unused imports found by pyflakes In-Reply-To: <1490619913.4.0.443050658966.issue29919@psf.upfronthosting.co.za> Message-ID: <1490623440.43.0.631026167012.issue29919@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- nosy: +serhiy.storchaka stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 10:04:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 14:04:13 +0000 Subject: [issue26657] Directory traversal with http.server and SimpleHTTPServer on windows In-Reply-To: <1459179015.77.0.509336394494.issue26657@psf.upfronthosting.co.za> Message-ID: <1490623453.86.0.531001255052.issue26657@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +749 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 10:05:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 14:05:29 +0000 Subject: [issue29919] Remove unused imports found by pyflakes In-Reply-To: <1490619913.4.0.443050658966.issue29919@psf.upfronthosting.co.za> Message-ID: <1490623529.54.0.616103108839.issue29919@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d6debb24e06152a827769b0cac24c47deccdeac1 by Victor Stinner in branch 'master': bpo-29919: Remove unused imports found by pyflakes (#137) https://github.com/python/cpython/commit/d6debb24e06152a827769b0cac24c47deccdeac1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 10:06:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 14:06:27 +0000 Subject: [issue29840] Avoid raising OverflowError in bool() In-Reply-To: <1489782446.56.0.355449112547.issue29840@psf.upfronthosting.co.za> Message-ID: <1490623587.54.0.719140667378.issue29840@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue depends on issue29839. Tests are failed until the patch of issue29839 is merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 10:06:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 14:06:56 +0000 Subject: [issue29919] Remove unused imports found by pyflakes In-Reply-To: <1490619913.4.0.443050658966.issue29919@psf.upfronthosting.co.za> Message-ID: <1490623616.11.0.447271204019.issue29919@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 10:10:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 14:10:58 +0000 Subject: [issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter() In-Reply-To: <1489155449.02.0.609817047168.issue29783@psf.upfronthosting.co.za> Message-ID: <1490623858.45.0.786243068262.issue29783@psf.upfronthosting.co.za> STINNER Victor added the comment: I abandonned my pull request. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 10:11:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 14:11:36 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1490623896.29.0.496221960173.issue27425@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset cf57fe13b44e3994096ae79f32c11475f333a94f by Victor Stinner in branch '3.5': bpo-27425: Add .gitattributes, fix Windows tests (#844) https://github.com/python/cpython/commit/cf57fe13b44e3994096ae79f32c11475f333a94f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 10:16:39 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 27 Mar 2017 14:16:39 +0000 Subject: [issue19824] string.Template: Rewrite docs to emphasize i18n use case In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1490624199.95.0.210915103951.issue19824@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: docs at python -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 10:17:15 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 27 Mar 2017 14:17:15 +0000 Subject: [issue19824] string.Template: Rewrite docs to emphasize i18n use case In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1490624235.08.0.829626995041.issue19824@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'll take this one, and see if I can address 20314 also. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 11:00:30 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 27 Mar 2017 15:00:30 +0000 Subject: [issue20552] Use specific asserts in bytes tests In-Reply-To: <1391804856.25.0.0710909652112.issue20552@psf.upfronthosting.co.za> Message-ID: <1490626830.11.0.837093036709.issue20552@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Close? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 11:36:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 15:36:58 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1490629018.88.0.958157217238.issue29782@psf.upfronthosting.co.za> STINNER Victor added the comment: The change is an optimization, so it requires a benchmark, think you provided. Ok. But the speedup is a few nanoseconds on a function which takes currently 40 nanoseconds. It's not really what I would call significant: $ ./python -m perf compare_to ref.json patch.json --table +---------------------+---------+-----------------------------+ | Benchmark | ref | patch | +=====================+=========+=============================+ | int==float 8 digits | 39.2 ns | 37.9 ns: 1.03x faster (-3%) | +---------------------+---------+-----------------------------+ | int==float 1 digit | 38.0 ns | 37.9 ns: 1.00x faster (-0%) | +---------------------+---------+-----------------------------+ | int.bit_length() | 42.0 ns | 41.2 ns: 1.02x faster (-2%) | +---------------------+---------+-----------------------------+ (See attached bench_bit_length.py script.) So I'm not really convinced that the change is useful. Is bit_length() used in hot loops? ---------- nosy: +haypo Added file: http://bugs.python.org/file46759/bench_bit_length.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 11:39:39 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 27 Mar 2017 15:39:39 +0000 Subject: [issue29921] datetime validation is stricter in 3.6.1 than previous versions In-Reply-To: <1490622527.46.0.936939014549.issue29921@psf.upfronthosting.co.za> Message-ID: <1490629179.01.0.161669672744.issue29921@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 11:41:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 15:41:13 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1490629273.7.0.304502784912.issue29782@psf.upfronthosting.co.za> STINNER Victor added the comment: > $ ./python -m timeit "12345678 == 12345678.0" > 5000000 loops, best of 5: 40 nsec per loop By the way, I check the bytecode to make sure that the compiler doesn't optimize that. I'm suprised that it's not replaced with True! Is there a reason to perform the test at runtime? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 11:45:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 15:45:40 +0000 Subject: [issue29782] Use __builtin_clzl for bits_in_digit if available In-Reply-To: <1489143237.03.0.753738364063.issue29782@psf.upfronthosting.co.za> Message-ID: <1490629540.49.0.23810327367.issue29782@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are not good reasons to optimize this case at compile time. This is very obscure way of writing True. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 11:46:55 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 27 Mar 2017 15:46:55 +0000 Subject: [issue29915] Drop Mac OS X Tiger support in Python 3.7? In-Reply-To: <1490606944.79.0.982783891513.issue29915@psf.upfronthosting.co.za> Message-ID: <1490629615.21.0.506968783286.issue29915@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Is there any downside to keeping this code? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 12:01:52 2017 From: report at bugs.python.org (Aaron Whitehouse) Date: Mon, 27 Mar 2017 16:01:52 +0000 Subject: [issue28718] '*' matches entire path in fnmatch In-Reply-To: <1479327127.15.0.931047394142.issue28718@psf.upfronthosting.co.za> Message-ID: <1490630512.09.0.11807783418.issue28718@psf.upfronthosting.co.za> Aaron Whitehouse added the comment: Posted to the [Python-ideas] mailing list, as it is proposing a change to a standard library: https://mail.python.org/pipermail/python-ideas/2017-February/044880.html Nobody has responded so far, however. I take this as at least no vehement objection to the idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 12:27:22 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 27 Mar 2017 16:27:22 +0000 Subject: [issue29915] Drop Mac OS X Tiger support in Python 3.7? In-Reply-To: <1490606944.79.0.982783891513.issue29915@psf.upfronthosting.co.za> Message-ID: <1490632042.87.0.811176665087.issue29915@psf.upfronthosting.co.za> Ned Deily added the comment: >The Tiger buildbot fails since many years: >http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/479/steps/test/logs/stdio That's not true. The one failing test, test_uuid, was just added last month. Note that the 3.5 Tiger buildbot has not test failures. So, one question that perhaps you and Barry can answer is what is the significance of that failure. >It doesn't seem like anyone take care of this buildbot. That's also not true. David Bolen, the owner of the buildbot, is very responsive to requests for updates of third-party libraries on the buildbot. Getting back to the support of OS X 10.4, to the best of my knowledge we currently do not document anywhere exactly what levels of OS X we support. We could do that and, yes, we could explicitly drop support for 10.4. However, at the moment, there just seems to be this one issue which we should understand better before deciding anything. But, more importantly, at the moment, the 10.4 Tiger buildbot is the *only* working Mac buildbot we have. Two other Mac buildbots we've had, the "Snow Leopard" and "Yosemite" buildbots have been off-line for many months. Until we have other working OS X buildbots, the Tiger one should remain. It is serving a useful purpose. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 12:29:28 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 27 Mar 2017 16:29:28 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490632168.77.0.395441921118.issue27593@psf.upfronthosting.co.za> Ned Deily added the comment: I'll be doing backports to 2.7 for this and some other things shortly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 12:30:54 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 27 Mar 2017 16:30:54 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1490632254.59.0.260266455774.issue29572@psf.upfronthosting.co.za> Ned Deily added the comment: > It seems like all pull requests are merged. Can the issue be closed now? Not quite yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 13:09:26 2017 From: report at bugs.python.org (AlbertZhuang) Date: Mon, 27 Mar 2017 17:09:26 +0000 Subject: [issue24739] allow argparse.FileType to accept newline argument In-Reply-To: <1438049324.32.0.674993969885.issue24739@psf.upfronthosting.co.za> Message-ID: <1490634566.41.0.285772960637.issue24739@psf.upfronthosting.co.za> Changes by AlbertZhuang : ---------- pull_requests: +750 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 13:19:13 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 27 Mar 2017 17:19:13 +0000 Subject: [issue29915] Drop Mac OS X Tiger support in Python 3.7? In-Reply-To: <1490606944.79.0.982783891513.issue29915@psf.upfronthosting.co.za> Message-ID: <1490635153.32.0.0926875139205.issue29915@psf.upfronthosting.co.za> Ned Deily added the comment: Here's where the Tiger 3.x buildbot started failing: http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/363 with this commit 0b8432538acf45d7a605fe68648b4712e8d9cee3 ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 13:19:40 2017 From: report at bugs.python.org (Jaysinh shukla) Date: Mon, 27 Mar 2017 17:19:40 +0000 Subject: [issue19382] tabnanny unit tests In-Reply-To: <1382655525.74.0.119259261788.issue19382@psf.upfronthosting.co.za> Message-ID: <1490635180.19.0.374407807853.issue19382@psf.upfronthosting.co.za> Changes by Jaysinh shukla : ---------- pull_requests: +751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 13:21:15 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 27 Mar 2017 17:21:15 +0000 Subject: [issue29506] Incorrect documentation for the copy module In-Reply-To: <1486591364.1.0.297030175166.issue29506@psf.upfronthosting.co.za> Message-ID: <1490635275.44.0.393733970721.issue29506@psf.upfronthosting.co.za> R. David Murray added the comment: Looking over the PR, and especially in the context of Serhiy's point about this being about 'deep copy' and not 'deepcopy', I think this would be clearer if it were shortened even further, to just: "Because deep copy copies everything, it may copy data that is intended to be shared between copies." After all, what deepcopy does it provide a way for a class to implement that sharing when a deepcopy is done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 13:24:22 2017 From: report at bugs.python.org (Tadhg McDonald-Jensen) Date: Mon, 27 Mar 2017 17:24:22 +0000 Subject: [issue29922] error message when __aexit__ is not async Message-ID: <1490635462.94.0.877144122619.issue29922@psf.upfronthosting.co.za> New submission from Tadhg McDonald-Jensen: When creating a asynchronous context manager if the __aexit__ method is not labeled as async (so it returns None instead of a coroutine) the error has a generic error message: TypeError: object NoneType can't be used in 'await' expression Would it be possible to change this so it indicates that it was the context that was invalid not an `await` statement? Since the traceback points to the last statement of the with block it can create very confusing errors if the last statement was an await. Example: import asyncio class Test(): async def __aenter__(self): print("aenter used") value = asyncio.Future() value.set_result(True) return value #FORGOT TO MARK AS async !! def __aexit__(self, *errors): print("aexit used") return None async def my_test(): async with Test() as x: print("inside async with, now awaiting on", x) await x my_test().send(None) Give the output: aenter used inside async with, now awaiting on aexit used Traceback (most recent call last): File ".../test.py", line 19, in my_test().send(None) File ".../test.py", line 16, in my_test await x TypeError: object NoneType can't be used in 'await' expression Which indicates to me that `x` was None when it was await-ed for. ---------- components: asyncio messages: 290630 nosy: Tadhg McDonald-Jensen, yselivanov priority: normal severity: normal status: open title: error message when __aexit__ is not async type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 13:33:56 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 27 Mar 2017 17:33:56 +0000 Subject: [issue29922] error message when __aexit__ is not async In-Reply-To: <1490635462.94.0.877144122619.issue29922@psf.upfronthosting.co.za> Message-ID: <1490636036.24.0.679794366795.issue29922@psf.upfronthosting.co.za> R. David Murray added the comment: This is a specific example of the general problem reported in issue 25538. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Traceback from __exit__ method is misleading _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 13:35:19 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 27 Mar 2017 17:35:19 +0000 Subject: [issue25538] Traceback from __exit__ method is misleading In-Reply-To: <1446505683.0.0.402181965789.issue25538@psf.upfronthosting.co.za> Message-ID: <1490636119.27.0.330394162888.issue25538@psf.upfronthosting.co.za> R. David Murray added the comment: See also issue 29922. ---------- nosy: +Tadhg McDonald-Jensen, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 13:46:10 2017 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 27 Mar 2017 17:46:10 +0000 Subject: [issue29922] error message when __aexit__ is not async In-Reply-To: <1490635462.94.0.877144122619.issue29922@psf.upfronthosting.co.za> Message-ID: <1490636770.11.0.708304673176.issue29922@psf.upfronthosting.co.za> Yury Selivanov added the comment: > This is a specific example of the general problem reported in issue 25538. It's a bit different code path/problem. But I agree, we should work on making both `with` and `async with` a bit more usable. > Would it be possible to change this so it indicates that it was the context that was invalid not an `await` statement? I'm not sure if we can do anything about this. We compile 'async with' into a set of opcodes. The first ones resolve __aexit__, the latter ones await on it. The one that prepares to await on the aexit (GET_AWAITABLE) is the same that 'await' expression compiles to, and that opcode has no idea what exactly it awaits on. We could probably add GET_AEXIT_AWAITABLE opcode specifically to improve the error message (other than that it would be a copy of GET_AWAITABLE). I'll think about it. ---------- assignee: -> yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 13:54:29 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 27 Mar 2017 17:54:29 +0000 Subject: [issue11913] sdist refuses README.rst In-Reply-To: <1303613322.81.0.629577121535.issue11913@psf.upfronthosting.co.za> Message-ID: <1490637269.43.0.541959992708.issue11913@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: wont fix -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 14:06:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 18:06:06 +0000 Subject: [issue29894] Deprecate returning a subclass of complex from __complex__ In-Reply-To: <1490344044.5.0.0943427930901.issue29894@psf.upfronthosting.co.za> Message-ID: <1490637966.26.0.615326094617.issue29894@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 14:37:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 18:37:15 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490639835.68.0.581695851649.issue29917@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Agree. I noticed this when making a review of PR 831, but forgot to open an issue. ---------- nosy: +serhiy.storchaka stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 14:44:32 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 27 Mar 2017 18:44:32 +0000 Subject: [issue29144] Implicit namespace packages in Python 3.6 In-Reply-To: <1483468021.78.0.379899829208.issue29144@psf.upfronthosting.co.za> Message-ID: <1490640272.48.0.271597773016.issue29144@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Bumped upon a similar issue today where a package I was working on couldn't import a module from one of its dependencies (which was not the case in python 3.5). One of the lines that fail is this [0] with: ModuleNotFoundError: No module named 'repoze.who._compat' And the project that it depends on is this [1] The projects are old, however what might have caused this behavior change? It seems kinda isolated but that the exact cause has not been pinpointed. [0] https://github.com/repoze/repoze.who-sqlalchemy/blob/master/tests/databasesetup_elixir.py#L25 [1] https://github.com/repoze/repoze.who/tree/master/repoze/who ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 14:45:19 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 27 Mar 2017 18:45:19 +0000 Subject: [issue29887] test_normalization doesn't work In-Reply-To: <1490288230.58.0.523545383484.issue29887@psf.upfronthosting.co.za> Message-ID: <1490640319.43.0.53579691749.issue29887@psf.upfronthosting.co.za> Brett Cannon added the comment: Benjamin did the update to 9.0.0. We should probably update Tools/unicode/makeunicodedata.py to print out in the end that the appropriate file needs to be added to pythontest.net **before** merging an update to unicodedata. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 14:56:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 18:56:52 +0000 Subject: [issue29878] Add global instances of int 0 and 1 In-Reply-To: <1490163311.47.0.711325721357.issue29878@psf.upfronthosting.co.za> Message-ID: <1490641012.47.0.303316250786.issue29878@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +752 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 15:01:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Mar 2017 19:01:49 +0000 Subject: [issue29867] Add asserts in PyXXX_GET_SIZE macros In-Reply-To: <1490082783.53.0.325668446272.issue29867@psf.upfronthosting.co.za> Message-ID: <1490641309.39.0.561344753018.issue29867@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It would be enough to compile them. New macros produce compiler error when used as lvalue. But I afraid it will take too much time on my netbook. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 15:35:54 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 27 Mar 2017 19:35:54 +0000 Subject: [issue29912] Overlapping tests between list_tests and seq_tests In-Reply-To: <1490571757.15.0.357120556689.issue29912@psf.upfronthosting.co.za> Message-ID: <1490643354.45.0.625826106996.issue29912@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset d702c50049207d825c1d5925fbc7306514fa9a0a by Brett Cannon (Jim Fasarakis-Hilliard) in branch 'master': bpo-29912: Remove redundant tests in list_tests that are found in seq_tests (GH-847) https://github.com/python/cpython/commit/d702c50049207d825c1d5925fbc7306514fa9a0a ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 15:36:11 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 27 Mar 2017 19:36:11 +0000 Subject: [issue29912] Overlapping tests between list_tests and seq_tests In-Reply-To: <1490571757.15.0.357120556689.issue29912@psf.upfronthosting.co.za> Message-ID: <1490643371.05.0.745714856951.issue29912@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 15:38:27 2017 From: report at bugs.python.org (Michael Seifert) Date: Mon, 27 Mar 2017 19:38:27 +0000 Subject: [issue1234] semaphore errors on AIX 5.2 In-Reply-To: <1191489495.02.0.0992368584163.issue1234@psf.upfronthosting.co.za> Message-ID: <1490643507.31.0.487267384115.issue1234@psf.upfronthosting.co.za> Changes by Michael Seifert : ---------- pull_requests: +753 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 15:43:15 2017 From: report at bugs.python.org (Ryan Gonzalez) Date: Mon, 27 Mar 2017 19:43:15 +0000 Subject: [issue11913] sdist refuses README.rst In-Reply-To: <1303613322.81.0.629577121535.issue11913@psf.upfronthosting.co.za> Message-ID: <1490643795.67.0.440401803908.issue11913@psf.upfronthosting.co.za> Changes by Ryan Gonzalez : ---------- pull_requests: +754 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 15:49:38 2017 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 27 Mar 2017 19:49:38 +0000 Subject: [issue1234] semaphore errors on AIX 5.2 In-Reply-To: <1191489495.02.0.0992368584163.issue1234@psf.upfronthosting.co.za> Message-ID: <1490644178.98.0.365453505306.issue1234@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 15:53:36 2017 From: report at bugs.python.org (Tadhg McDonald-Jensen) Date: Mon, 27 Mar 2017 19:53:36 +0000 Subject: [issue29922] error message when __aexit__ is not async In-Reply-To: <1490635462.94.0.877144122619.issue29922@psf.upfronthosting.co.za> Message-ID: <1490644416.45.0.400333071932.issue29922@psf.upfronthosting.co.za> Tadhg McDonald-Jensen added the comment: > This is a specific example of the general problem reported in issue 25538. Definitely related, although the part of giving an error "... can't be used in 'await' expression" when no await expression is used isn't covered by that thread so I'm not sure I'd call this a direct duplicate. Currently when __anext__ return a non-awaitable this error is shown: TypeError: 'async for' received an invalid object from __anext__: NoneType So having __aenter__ and __aexit__ have similar error messages would be nice. Would it maybe make sense to implement this as adding an argument to GET_AWAITABLE to indicate whether it was called from await, __anext__, __aenter__ or __aexit__? (or others that may exist in future) I don't know enough about bytecode to know how it'd compare to an instruction for each case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 15:56:30 2017 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 27 Mar 2017 19:56:30 +0000 Subject: [issue29922] error message when __aexit__ is not async In-Reply-To: <1490635462.94.0.877144122619.issue29922@psf.upfronthosting.co.za> Message-ID: <1490644590.95.0.212722987734.issue29922@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Would it maybe make sense to implement this as adding an argument to GET_AWAITABLE to indicate whether it was called from await, __anext__, __aenter__ or __aexit__? Yes, but it will make it a tad slower (which will also affect await performance). I'll run some benchmarks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 15:56:48 2017 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 27 Mar 2017 19:56:48 +0000 Subject: [issue29922] error message when __aexit__ is not async In-Reply-To: <1490635462.94.0.877144122619.issue29922@psf.upfronthosting.co.za> Message-ID: <1490644608.1.0.820391060418.issue29922@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: duplicate -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 16:15:16 2017 From: report at bugs.python.org (Brian Petersen) Date: Mon, 27 Mar 2017 20:15:16 +0000 Subject: [issue29923] PEP487 __init_subclass__ incompatible with abc.ABCMeta Message-ID: <1490645716.61.0.370506837908.issue29923@psf.upfronthosting.co.za> New submission from Brian Petersen: First time issue reporter here. I really love PEP 487, but I'm finding the new __init_subclass__ functionality is not playing nicely with existing abstract class functionality. For example, taking the Quest example given in PEP 487 but simply adding ABCMeta metaclass results in a runtime error: ``` class QuestBase(metaclass=abc.ABCMeta): # this is implicitly a @classmethod (see below for motivation) def __init_subclass__(cls, swallow, **kwargs): cls.swallow = swallow super().__init_subclass__(**kwargs) class Quest(QuestBase, swallow="african"): pass print(Quest.swallow) Traceback (most recent call last): File "credentials.py", line 23, in class Quest(QuestBase, swallow="african"): TypeError: __new__() got an unexpected keyword argument 'swallow' ``` ---------- components: Library (Lib) messages: 290641 nosy: Brian Petersen priority: normal severity: normal status: open title: PEP487 __init_subclass__ incompatible with abc.ABCMeta versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 16:17:48 2017 From: report at bugs.python.org (Brian Petersen) Date: Mon, 27 Mar 2017 20:17:48 +0000 Subject: [issue29923] PEP487 __init_subclass__ incompatible with abc.ABCMeta In-Reply-To: <1490645716.61.0.370506837908.issue29923@psf.upfronthosting.co.za> Message-ID: <1490645868.41.0.68904320819.issue29923@psf.upfronthosting.co.za> Changes by Brian Petersen : ---------- components: -Library (Lib) type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 16:27:37 2017 From: report at bugs.python.org (Christian Heimes) Date: Mon, 27 Mar 2017 20:27:37 +0000 Subject: [issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted In-Reply-To: <1487193679.14.0.35599130933.issue29573@psf.upfronthosting.co.za> Message-ID: <1490646457.25.0.814103945064.issue29573@psf.upfronthosting.co.za> Christian Heimes added the comment: Raymond, I think Richard's approach is problematic at best. Richard, you cannot use a NamedTempFile with an external process like that. At least you have to flush the file to disk. Even flushing is not safely portable. The safest and most portable approach is to close the file, call the other process and then unlink the file manually: with tempfile.NamedTemporaryFile(delete=False) as f: try: f.write(b'data') f.close() subprocess.Popen(['binutil', f.name, ...]) finally: os.unlink(f.name) It's too bad that close() on a NamedTemporaryFile(delete=True) deletes the files. For your problem it would be beneficial to have __exit__() perform the unlink operation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 16:30:45 2017 From: report at bugs.python.org (Cameron Mckain) Date: Mon, 27 Mar 2017 20:30:45 +0000 Subject: [issue29908] Inconsistent crashing with an access violation In-Reply-To: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> Message-ID: <1490646645.37.0.149116987972.issue29908@psf.upfronthosting.co.za> Cameron Mckain added the comment: No, my PyCharm issue has not been responded to by any of their people. Here is the link: https://youtrack.jetbrains.com/issue/PY-23297 Also, I have uploaded a screenshot of VS's debugging of the crash if it will be helpful. ---------- Added file: http://bugs.python.org/file46760/Desctop screenshot.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 16:54:00 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 27 Mar 2017 20:54:00 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490648040.24.0.330500347208.issue29677@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I'm new to contributing. Can I work on this one? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 16:55:22 2017 From: report at bugs.python.org (SylvainDe) Date: Mon, 27 Mar 2017 20:55:22 +0000 Subject: [issue29924] Useless argument in call to PyErr_Format Message-ID: <1490648122.87.0.778103510722.issue29924@psf.upfronthosting.co.za> New submission from SylvainDe: Very uninteresting issue I've found while looking at the code. In Objects/call.c, in _PyMethodDef_RawFastCallDict(PyMethodDef *method, PyObject *self, PyObject **arg...), we have no_keyword_error: PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", method->ml_name, nargs); The `nargs` seems pointless. This issue is mosly opened to have a record number to open a commit but it raises a few questions: - would it make sense to try to use GCC/CLang's logic around __attribute__ to have this kind of things checked during compilation as much as possible ? - would it make sense to define very small functions wrapping some calls to `PyErr_Format` so that one can use function with a very clear signature at (almost) no cost? This would be specially relevant for error raised in multiple places with the same message (The trio PyMethodDef *method/PyExc_TypeError/"%.200s() takes no keyword arguments" is a good candidate for this). I'd be happy for work on this but I'm afraid this would correspond to something Raymond Hettinger asks new comers not to do : "Don't be a picture straightener" ( https://speakerdeck.com/pybay2016/raymond-hettinger-keynote-core-developer-world ). I've filled the impacted version as 3.7 as there is no real impacted version from a user point of view. ---------- components: Argument Clinic messages: 290645 nosy: SylvainDe, larry priority: normal severity: normal status: open title: Useless argument in call to PyErr_Format type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 16:55:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 20:55:25 +0000 Subject: [issue29921] datetime validation is stricter in 3.6.1 than previous versions In-Reply-To: <1490622527.46.0.936939014549.issue29921@psf.upfronthosting.co.za> Message-ID: <1490648125.07.0.161242350498.issue29921@psf.upfronthosting.co.za> STINNER Victor added the comment: > The change in issue #29100 - intended AFAICS simply to fix a regression in 3.6 - seems to have made datetime validation via certain code paths stricter than it was in 2.7 or 3.5. What do you mean by "stricter than 2.7 & 3.5"? The year 30828 was never valid. Python 2.7 and 3.5: >>> datetime.datetime(30828, 1, 1) Traceback (most recent call last): File "", line 1, in ValueError: year is out of range >>> datetime.datetime.fromtimestamp(2**37) datetime.datetime(6325, 4, 8, 17, 4, 32) >>> datetime.datetime.fromtimestamp(2**38) Traceback (most recent call last): ... ValueError: year is out of range Python 3.6.1 should only be stricter than Python 3.6.0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 16:57:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 20:57:29 +0000 Subject: [issue29921] datetime validation is stricter in 3.6.1 than previous versions In-Reply-To: <1490622527.46.0.936939014549.issue29921@psf.upfronthosting.co.za> Message-ID: <1490648249.48.0.476251210663.issue29921@psf.upfronthosting.co.za> STINNER Victor added the comment: The range of valid timestamp is the same since the module was added to Python 2.3: >>> datetime.datetime.min datetime.datetime(1, 1, 1, 0, 0) >>> datetime.datetime.max datetime.datetime(9999, 12, 31, 23, 59, 59, 999999) https://docs.python.org/2/library/datetime.html#datetime.datetime.max https://docs.python.org/dev/library/datetime.html#datetime.datetime.max ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 16:57:54 2017 From: report at bugs.python.org (SylvainDe) Date: Mon, 27 Mar 2017 20:57:54 +0000 Subject: [issue29924] Useless argument in call to PyErr_Format In-Reply-To: <1490648122.87.0.778103510722.issue29924@psf.upfronthosting.co.za> Message-ID: <1490648274.88.0.992934012859.issue29924@psf.upfronthosting.co.za> SylvainDe added the comment: I forgot to copy the link but here is a description of what I had in mind for the first idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 16:58:26 2017 From: report at bugs.python.org (SylvainDe) Date: Mon, 27 Mar 2017 20:58:26 +0000 Subject: [issue29924] Useless argument in call to PyErr_Format In-Reply-To: <1490648122.87.0.778103510722.issue29924@psf.upfronthosting.co.za> Message-ID: <1490648306.92.0.961380251723.issue29924@psf.upfronthosting.co.za> SylvainDe added the comment: http://julio.meroh.net/2011/06/validating-format-strings-in-custom-c.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:02:40 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 27 Mar 2017 21:02:40 +0000 Subject: [issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted In-Reply-To: <1487193679.14.0.35599130933.issue29573@psf.upfronthosting.co.za> Message-ID: <1490648560.36.0.265697689858.issue29573@psf.upfronthosting.co.za> R. David Murray added the comment: He's still going to get an error using your code, Christian. But if he knows that the file being gone is OK, he can catch and ignore the error. Having exit do the unlink wouldn't help him; in that case he'd have to wrap the whole 'with' clause in a try/except. So I think delete=False and handling the error "manually" is the correct solution here, since I doubt we want to add a "already_deleted_ok=False" flag to the API for this limited use case that can be handled with delete=False. I vote for closing this as rejected. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:03:39 2017 From: report at bugs.python.org (Roundup Robot) Date: Mon, 27 Mar 2017 21:03:39 +0000 Subject: [issue29924] Useless argument in call to PyErr_Format In-Reply-To: <1490648122.87.0.778103510722.issue29924@psf.upfronthosting.co.za> Message-ID: <1490648619.4.0.964079246537.issue29924@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:05:01 2017 From: report at bugs.python.org (Christian Heimes) Date: Mon, 27 Mar 2017 21:05:01 +0000 Subject: [issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted In-Reply-To: <1487193679.14.0.35599130933.issue29573@psf.upfronthosting.co.za> Message-ID: <1490648701.15.0.590237755536.issue29573@psf.upfronthosting.co.za> Christian Heimes added the comment: RDM, I don't see how my example is going to fail. It uses delete=False with an explicit unlink. Please educate me. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:05:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 21:05:46 +0000 Subject: [issue29925] test_uuid fails on OS X Tiger Message-ID: <1490648746.25.0.479483160976.issue29925@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/363/steps/test/logs/stdio ====================================================================== FAIL: test_uuid1_safe (test.test_uuid.TestUUID) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_uuid.py", line 351, in test_uuid1_safe self.assertNotEqual(u.is_safe, uuid.SafeUUID.unknown) AssertionError: == According to Ned Deily, the test started to fail with the the commit 0b8432538acf45d7a605fe68648b4712e8d9cee3. PR: https://github.com/python/cpython/pull/388 See also the issue #29915 (OS X Tiger). ---------- components: Tests, macOS messages: 290652 nosy: benjamin.peterson, haypo, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: test_uuid fails on OS X Tiger versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:07:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 21:07:47 +0000 Subject: [issue29915] Drop Mac OS X Tiger support in Python 3.7? In-Reply-To: <1490606944.79.0.982783891513.issue29915@psf.upfronthosting.co.za> Message-ID: <1490648867.4.0.770208634192.issue29915@psf.upfronthosting.co.za> STINNER Victor added the comment: Raymond Hettinger: "Is there any downside to keeping this code?" I don't think that we have much code specific to Tiger, except maybe some skips in unit tests. Maybe we can just remove the buildbot but don't touch the code. My issue is more that I would like to see green buildbots. I don't see the purpose of having a buildbot if it's known to be broken. It's a pain to recall which buildbots are known to be broken or not. > That's not true. The one failing test, test_uuid, was just added last month. Note that the 3.5 Tiger buildbot has not test failures. Ah? I didn't know. Maybe my issue was more that Tiger fails randomly. In fact, I don't recall exactly why I wanted to drop Tiger support :-) > But, more importantly, at the moment, the 10.4 Tiger buildbot is the *only* working Mac buildbot we have. Oh wow, I didn't know. Travis CI provides Linux containers, AppVeyor provides Windows VMs. Is there a similar free service for macOS? Or maybe not free for everyone, but free for the Python CI? > Here's where the Tiger 3.x buildbot started failing: (...) I created the issue #29925 for test_uuid failure. > Until we have other working OS X buildbots, the Tiger one should remain. It is serving a useful purpose. My general view on buildbots is that one buildbot needs a maintainer or should go away. Yeah, I have to long term plan to remove most buildbots :-D For example, the situation didn't evolved for the OpenIndiana buildbot... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:16:00 2017 From: report at bugs.python.org (Larry Hastings) Date: Mon, 27 Mar 2017 21:16:00 +0000 Subject: [issue29924] Useless argument in call to PyErr_Format In-Reply-To: <1490648122.87.0.778103510722.issue29924@psf.upfronthosting.co.za> Message-ID: <1490649360.12.0.0857387339217.issue29924@psf.upfronthosting.co.za> Larry Hastings added the comment: This is not an Argument Clinic issue. ---------- components: +Interpreter Core -Argument Clinic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:16:13 2017 From: report at bugs.python.org (Larry Hastings) Date: Mon, 27 Mar 2017 21:16:13 +0000 Subject: [issue29924] Useless argument in call to PyErr_Format In-Reply-To: <1490648122.87.0.778103510722.issue29924@psf.upfronthosting.co.za> Message-ID: <1490649373.3.0.348180594266.issue29924@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- nosy: -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:19:01 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Mon, 27 Mar 2017 21:19:01 +0000 Subject: [issue29251] Class __dict__ is only a mapping proxy In-Reply-To: <1484222660.7.0.65822313324.issue29251@psf.upfronthosting.co.za> Message-ID: <1490649541.0.0.672979234268.issue29251@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Isn't the fact that it's read-only a CPython implementation detail? That is, shouldn't that just read: "gives a :term:`mapping` object representing the class's namespace" so as to not enforce anything on any other implementations? ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:20:22 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 27 Mar 2017 21:20:22 +0000 Subject: [issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted In-Reply-To: <1487193679.14.0.35599130933.issue29573@psf.upfronthosting.co.za> Message-ID: <1490649622.43.0.330584615222.issue29573@psf.upfronthosting.co.za> R. David Murray added the comment: His problem is that the file has already been deleted by the time the subprocess returns, so the unlink is going to raise an exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:26:42 2017 From: report at bugs.python.org (SylvainDe) Date: Mon, 27 Mar 2017 21:26:42 +0000 Subject: [issue29924] Useless argument in call to PyErr_Format In-Reply-To: <1490648122.87.0.778103510722.issue29924@psf.upfronthosting.co.za> Message-ID: <1490650002.2.0.407075022408.issue29924@psf.upfronthosting.co.za> SylvainDe added the comment: Seems to be introduced via 250e4b0063fab35770719b64d1e36209c4aa2596 in January this year. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:34:41 2017 From: report at bugs.python.org (Richard Xia) Date: Mon, 27 Mar 2017 21:34:41 +0000 Subject: [issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted In-Reply-To: <1487193679.14.0.35599130933.issue29573@psf.upfronthosting.co.za> Message-ID: <1490650481.63.0.962945881999.issue29573@psf.upfronthosting.co.za> Richard Xia added the comment: Thanks for the discussion. I ended up doing something similar to the code snippet Christian posted, except I also had a second try/except FileNotFoundError within the original finally block to catch the case that David pointed out. In retrospect, I probably should have used TemporaryDirectory since I am using Python 3.5 and because the file I was creating with NamedTemporaryFile was only being used as an output file, not an input file, to the subprocess command. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:36:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 21:36:10 +0000 Subject: [issue29924] Useless argument in call to PyErr_Format In-Reply-To: <1490648122.87.0.778103510722.issue29924@psf.upfronthosting.co.za> Message-ID: <1490650570.98.0.290204790539.issue29924@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d67a103702cf57de90a62c90f7ae969c23d96218 by Victor Stinner (Sylvain) in branch 'master': bpo-29924: Remove useless argument (#854) https://github.com/python/cpython/commit/d67a103702cf57de90a62c90f7ae969c23d96218 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:39:51 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 27 Mar 2017 21:39:51 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490650791.29.0.100259152487.issue29677@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:40:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 21:40:03 +0000 Subject: [issue29924] Useless argument in call to PyErr_Format In-Reply-To: <1490648122.87.0.778103510722.issue29924@psf.upfronthosting.co.za> Message-ID: <1490650803.65.0.870677134816.issue29924@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you SylvainDe, I merged your fix! About the GCC __attribute__ idea: I'm not sure, since Python uses some extra formatters (I don't recall which one). If you succeed to write something working, please open a new issue! Since the initial bug is fixed, I close the issue now. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 17:50:00 2017 From: report at bugs.python.org (Christian Heimes) Date: Mon, 27 Mar 2017 21:50:00 +0000 Subject: [issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted In-Reply-To: <1487193679.14.0.35599130933.issue29573@psf.upfronthosting.co.za> Message-ID: <1490651400.96.0.52841553939.issue29573@psf.upfronthosting.co.za> Christian Heimes added the comment: Ah! I missed the fact that the subprocess removes the file. It's easily fixable, wrap the unlink and catch FileNotFoundError / ENOENT. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 18:03:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 22:03:20 +0000 Subject: [issue29240] Implementation of the PEP 540: Add a new UTF-8 mode In-Reply-To: <1484133592.17.0.263024020483.issue29240@psf.upfronthosting.co.za> Message-ID: <1490652200.46.0.245405491833.issue29240@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: -15 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 18:03:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 22:03:35 +0000 Subject: [issue29240] Implementation of the PEP 540: Add a new UTF-8 mode In-Reply-To: <1484133592.17.0.263024020483.issue29240@psf.upfronthosting.co.za> Message-ID: <1490652215.34.0.0103455311598.issue29240@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 18:15:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 22:15:22 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490652922.56.0.140987705024.issue29677@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6003db7db5fec545c01923c198a5fdfca5a91538 by Victor Stinner (Gerrit Holl) in branch 'master': bpo-29677: DOC: clarify documentation for `round` (#357) https://github.com/python/cpython/commit/6003db7db5fec545c01923c198a5fdfca5a91538 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 18:22:16 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 27 Mar 2017 22:22:16 +0000 Subject: [issue20314] Potentially confusing formulation in 6.1.4. Template strings In-Reply-To: <1390237853.97.0.751678212058.issue20314@psf.upfronthosting.co.za> Message-ID: <1490653336.91.0.937650670649.issue20314@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: docs at python -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 18:36:40 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 27 Mar 2017 22:36:40 +0000 Subject: [issue19824] string.Template: Rewrite docs to emphasize i18n use case In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1490654200.49.0.745099711331.issue19824@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- pull_requests: +758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 18:36:40 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 27 Mar 2017 22:36:40 +0000 Subject: [issue20314] Potentially confusing formulation in 6.1.4. Template strings In-Reply-To: <1390237853.97.0.751678212058.issue20314@psf.upfronthosting.co.za> Message-ID: <1490654200.59.0.641286193101.issue20314@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- pull_requests: +759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 18:37:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 22:37:12 +0000 Subject: [issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1490654232.9.0.889769083508.issue17870@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 18:42:13 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 27 Mar 2017 22:42:13 +0000 Subject: [issue4928] tempfile.NamedTemporaryFile: automatic cleanup by OS In-Reply-To: <1231838566.25.0.143957228078.issue4928@psf.upfronthosting.co.za> Message-ID: <1490654533.15.0.188886078174.issue4928@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- title: Problem with tempfile.NamedTemporaryFile -> tempfile.NamedTemporaryFile: automatic cleanup by OS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 18:51:11 2017 From: report at bugs.python.org (Mark) Date: Mon, 27 Mar 2017 22:51:11 +0000 Subject: [issue29926] time.sleep ignores keyboard interrupt in IDLE Message-ID: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> New submission from Mark: Consider the following code, typed interactively: >>> import time >>> time.sleep(1e6) This will sleep for a bit over one and a half weeks. If this was typed in error, you may want to interrupt it. If using the command line, this is easy: just use Ctrl-C. If using IDLE, Ctrl-C has no effect. One could attempt to restart the shell with Ctrl-F6, which seems to work, but in fact the process remains in the background, hung until the timeout expires. There are two obvious workarounds: one is to sleep in a separate thread, so as to avoid blocking the main thread, and the other is to use a loop with smaller sleep increments: for ii in range(1e5): sleep(10) Now it only takes 10 seconds to interrupt a sleep. But these are both clumsy workarounds. They're so clumsy that I think I'm not going to use IDLE for this particular program and just use python -I. Would be nice if this were fixed. ---------- assignee: terry.reedy components: IDLE messages: 290663 nosy: Mark, terry.reedy priority: normal severity: normal status: open title: time.sleep ignores keyboard interrupt in IDLE versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 18:56:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 22:56:31 +0000 Subject: [issue23890] assertRaises increases reference counter In-Reply-To: <1428518225.53.0.665360255509.issue23890@psf.upfronthosting.co.za> Message-ID: <1490655391.25.0.790974861867.issue23890@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset bbd3cf8f1ef1e91a8d6dac6411e18b4b9084abf5 by Victor Stinner in branch 'master': Fix ref cycles in TestCase.assertRaises() (#193) https://github.com/python/cpython/commit/bbd3cf8f1ef1e91a8d6dac6411e18b4b9084abf5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 18:57:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 22:57:43 +0000 Subject: [issue23890] assertRaises increases reference counter In-Reply-To: <1428518225.53.0.665360255509.issue23890@psf.upfronthosting.co.za> Message-ID: <1490655463.78.0.505512987081.issue23890@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 18:58:11 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 27 Mar 2017 22:58:11 +0000 Subject: [issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted In-Reply-To: <1487193679.14.0.35599130933.issue29573@psf.upfronthosting.co.za> Message-ID: <1490655491.22.0.730857614873.issue29573@psf.upfronthosting.co.za> Martin Panter added the comment: See also Issue 27425, about making the deletion step more flexible after the file has been created, which might help here. I?m not sure about security problems, but IMO failure to remove a temporary file (because it is already gone, or some other reason) is likely to be a programming mistake, so I would not want it silenced. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 19:04:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Mar 2017 23:04:57 +0000 Subject: [issue23890] assertRaises increases reference counter In-Reply-To: <1428518225.53.0.665360255509.issue23890@psf.upfronthosting.co.za> Message-ID: <1490655897.94.0.287592814655.issue23890@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like Python 2.7 is not affected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 19:28:06 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 27 Mar 2017 23:28:06 +0000 Subject: [issue29908] Inconsistent crashing with an access violation In-Reply-To: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> Message-ID: <1490657286.2.0.600212045551.issue29908@psf.upfronthosting.co.za> Steve Dower added the comment: I was thinking of a Django issue. It'd be nice to know what they fixed that prevents the problem occurring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 19:55:01 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 27 Mar 2017 23:55:01 +0000 Subject: [issue29251] Class __dict__ is only a mapping proxy In-Reply-To: <1484222660.7.0.65822313324.issue29251@psf.upfronthosting.co.za> Message-ID: <1490658901.67.0.441477256355.issue29251@psf.upfronthosting.co.za> Martin Panter added the comment: I don?t know if it is an implementation detail or not. Maybe it is the documentation itself which defines that. Anyway, I think your wording would have been fine for my original problem. I wonder if we should clarify that only reading the mapping is supported, even if we don?t define any particular behaviour for modifying it (like updating the namespace, raising an exception, ignoring the change, etc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 19:56:38 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 27 Mar 2017 23:56:38 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490658998.63.0.00231849562209.issue29677@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 19:57:16 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 27 Mar 2017 23:57:16 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490659036.19.0.0243080164728.issue29677@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 20:02:31 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 00:02:31 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490659351.97.0.862689914937.issue29677@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 596506216104613591218c2896cdb49fa0b7e5bb by Mariatta in branch '3.6': bpo-29677: DOC: clarify documentation for `round` (GH-357) (GH-862) https://github.com/python/cpython/commit/596506216104613591218c2896cdb49fa0b7e5bb ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 20:09:23 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 00:09:23 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490659763.49.0.303474732866.issue29677@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 8994f36287b068e8ea9a9230fc90eda72bf5fff0 by Mariatta in branch '3.5': bpo-29677: DOC: clarify documentation for `round` (GH-357) (GH-863) https://github.com/python/cpython/commit/8994f36287b068e8ea9a9230fc90eda72bf5fff0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 20:19:46 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 00:19:46 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490660386.18.0.449316900204.issue29677@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Cheryl, thank you for your interest in working on this issue. The original issue has been addressed in Gerrit Holl's PR. But it seems like the docs can be further improved. Here is Victor's comment about it: (copied from GH-357) ``` while we are modifying the doc, I dislike the start: "Return the floating point value number": number can be an integer. round(123, -2) doesn't use floating point numbers. Maybe rephrase to following text? Return number rounded to (...). number can be an integer or a floating point number. Or just remove "floating pointer number"? ``` Will you be interested in preparing a PR to address Victor's comment above? Thanks :) ---------- stage: -> needs patch versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 20:22:05 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 00:22:05 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490660525.95.0.452663116797.issue29677@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: GH-357 is: https://github.com/python/cpython/pull/357/files :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 20:44:19 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 28 Mar 2017 00:44:19 +0000 Subject: [issue12518] In string.Template it's impossible to transform delimiter in the derived class In-Reply-To: <1310085409.68.0.478281072881.issue12518@psf.upfronthosting.co.za> Message-ID: <1490661859.4.0.968328334718.issue12518@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: As this issue has been open for a long time, and I don't think it's worth changing the implementation, I am changing this to a documentation bug and will fix it along with the rewrites for bpo-19824 and bpo-20314 ---------- assignee: -> barry components: +Documentation -Library (Lib) versions: +Python 3.7 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 21:42:32 2017 From: report at bugs.python.org (Alexander Mohr) Date: Tue, 28 Mar 2017 01:42:32 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1490665352.3.0.736836182771.issue29302@psf.upfronthosting.co.za> Alexander Mohr added the comment: ok I've updated the gist with a base class and sync + async sub-classes. The way it worked out I think is nice because we can have the same method names across both sync+async. Let me know what you guys think! btw, it seems the test_dont_reraise_RuntimeError test hangs even with the release version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 21:42:50 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 28 Mar 2017 01:42:50 +0000 Subject: [issue29926] time.sleep ignores keyboard interrupt in IDLE In-Reply-To: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> Message-ID: <1490665370.07.0.793552851713.issue29926@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I verified on Win 10 with 3.6.1. What system are you running on? An automatic unittest test would be nice, but I cannot imagine how to write one. Even a human-verified htest (IDLE private term) would be good. Maybe I should write a live-interaction test script. ^C is bound to pyshell.PyShell.cancel_callback. When code is executing, this calls pyshell.ModifiedInterpreter.interrupt_subprocess. In a new thread, this starts pyshell.ModifiedInterpreter.__request_interrupt. I verified the calls thus far, with debug prints, while the user execution thread is sleeping. __request_interrupt sends vua rpc ('exec', 'interrupt_the_server'). 'interrupt_the_server' refers to a method of run.Executor: if interruptable: _thread.interrupt_main() Here I am unsure which thread this executes in and when. Interrupting "while True: a=1" is no problem. Does interrup_main not work while the main thread is sleeping, or does the above not get executed? ---------- stage: -> needs patch type: -> behavior versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 22:01:49 2017 From: report at bugs.python.org (Cameron Mckain) Date: Tue, 28 Mar 2017 02:01:49 +0000 Subject: [issue29908] Inconsistent crashing with an access violation In-Reply-To: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> Message-ID: <1490666509.24.0.514453848156.issue29908@psf.upfronthosting.co.za> Cameron Mckain added the comment: See this here: https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/18355615-ucrtbase-bug-wspawnve-is-broken ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 22:16:24 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 28 Mar 2017 02:16:24 +0000 Subject: [issue29926] time.sleep ignores _thread.interrupt_main() In-Reply-To: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> Message-ID: <1490667384.87.0.319855277008.issue29926@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Scratch my confusion. I added "print('after')" immediately after _thread.interrupt_main() in idlelib.run.Executor.interrupt_the_server() and 'after' is printed in Shell right after I hit ^C but a time.sleep(10) is not immediately interrupted and 'KeyboardInterrupt' does not show for nearly 10 seconds. I don't know if this is a bug or unavoidable limitation not mentioned in the _thread doc. I might be system dependent. https://docs.python.org/3/library/_thread.html#_thread.interrupt_main ---------- assignee: terry.reedy -> components: +Library (Lib) -IDLE title: time.sleep ignores keyboard interrupt in IDLE -> time.sleep ignores _thread.interrupt_main() versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 22:23:00 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Tue, 28 Mar 2017 02:23:00 +0000 Subject: [issue29927] Unnecessary code in the c-api/exceptions.c Message-ID: <1490667780.76.0.56540941039.issue29927@psf.upfronthosting.co.za> New submission from Kinebuchi Tomohiko: 1. BufferError is PRE_INIT'ed twice, and also POST_INIT'ed twice. 2. Using macros (PRE_INIT, POST_INIT and ADD_ERRNO) with following unnecessary semicolons. These unnecessary code have no semantic effect, but is somehow confusing. ---------- components: Interpreter Core messages: 290678 nosy: cocoatomo priority: normal severity: normal status: open title: Unnecessary code in the c-api/exceptions.c versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 22:33:27 2017 From: report at bugs.python.org (Eryk Sun) Date: Tue, 28 Mar 2017 02:33:27 +0000 Subject: [issue29926] time.sleep ignores _thread.interrupt_main() In-Reply-To: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> Message-ID: <1490668407.88.0.18808223785.issue29926@psf.upfronthosting.co.za> Eryk Sun added the comment: It's simple to fix this in Python 3 on Windows. PyErr_SetInterrupt in Modules/signalmodule.c needs the following addition: #ifdef MS_WINDOWS SetEvent(sigint_event); #endif In the main thread on Windows, time.sleep() waits on this event. On Unix, time.sleep() uses select(). We could interrupt it by signaling the process, or explicitly the main thread, via kill() or pthread_kill(). See issue 21895 for a related discussion. ---------- nosy: +eryksun versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Mar 27 23:38:25 2017 From: report at bugs.python.org (Sanjay) Date: Tue, 28 Mar 2017 03:38:25 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation In-Reply-To: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> Message-ID: <1490672305.71.0.330182803962.issue29913@psf.upfronthosting.co.za> Sanjay added the comment: ok I will update the doc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 00:57:53 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 28 Mar 2017 04:57:53 +0000 Subject: [issue29923] PEP487 __init_subclass__ incompatible with abc.ABCMeta In-Reply-To: <1490645716.61.0.370506837908.issue29923@psf.upfronthosting.co.za> Message-ID: <1490677073.45.0.22032888866.issue29923@psf.upfronthosting.co.za> Xiang Zhang added the comment: #29581 has reported a same one. :-) ---------- nosy: +xiang.zhang resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 01:07:33 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 05:07:33 +0000 Subject: [issue29928] Add f-strings to Glossary Message-ID: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> New submission from Mariatta Wijaya: The Glossary section should mention f-strings, starting in Python 3.6. ---------- assignee: docs at python components: Documentation messages: 290682 nosy: Mariatta, docs at python priority: normal severity: normal status: open title: Add f-strings to Glossary versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 01:09:27 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 05:09:27 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490677767.24.0.503814743031.issue29928@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +764 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 01:18:51 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 05:18:51 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490678331.8.0.444923062118.issue29928@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 01:39:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 Mar 2017 05:39:18 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490679558.81.0.264680467931.issue29928@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: "f-string" is widely used, but misleading term. It is not used in the documentation. But "formatted string literal" is not better. This isn't literal, this isn't special kind of strings, this is a special formatting expression resulting to string. There was a discussion on Python-Dev about better term, but it didn't come to any conclusion. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 01:49:04 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 28 Mar 2017 05:49:04 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation In-Reply-To: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> Message-ID: <1490680144.69.0.592189053422.issue29913@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +765 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 02:36:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 Mar 2017 06:36:54 +0000 Subject: [issue17870] Python does not provide PyLong_FromIntMax_t() or PyLong_FromUintMax_t() function In-Reply-To: <1367269025.02.0.400879045482.issue17870@psf.upfronthosting.co.za> Message-ID: <1490683014.51.0.739960139735.issue17870@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch adds too much code, but there is very little need of new feature. In all cases where PyLong_FromLong() and PyLong_FromLongLong() are used conditionally, PyLong_FromLongLong() can be used unconditionally. PyLong_FromLong() is used only because the support of "long long" was optional and for optimisation. Actually there is not supported platform that can't manage with long long and needs intmax_t. We can't test the new feature. While it can be useful in future, I think this is not a time for adding it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 02:37:53 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 28 Mar 2017 06:37:53 +0000 Subject: [issue29927] Unnecessary code in the c-api/exceptions.c In-Reply-To: <1490667780.76.0.56540941039.issue29927@psf.upfronthosting.co.za> Message-ID: <1490683073.6.0.91810427088.issue29927@psf.upfronthosting.co.za> Louie Lu added the comment: It seems somehow the patch at #3295 make the mistake, commit faa54a39295 at 2007-08-19 add the PRE_INIT(BufferError) and POST_INIT(BufferError), but in #3295 `buffererror.patch` didn't saw it. ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 02:45:13 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 28 Mar 2017 06:45:13 +0000 Subject: [issue29927] Unnecessary code in the c-api/exceptions.c In-Reply-To: <1490667780.76.0.56540941039.issue29927@psf.upfronthosting.co.za> Message-ID: <1490683513.78.0.787200074772.issue29927@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +767 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 03:07:24 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 28 Mar 2017 07:07:24 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490684844.36.0.115779519104.issue29928@psf.upfronthosting.co.za> Martin Panter added the comment: When I wrote the documentation , I think I tried to avoid ?f-string?, being jargon, and used more formal terminology from PEP 498 instead. But I agree they more than regular literals. Serhiy do you have a link/message-id/etc of the Python-dev discussion? All I found with Google was . One other goal is to differentiate these from other formatted strings, such as from str.format and percent formatting. * formatted strings (doesn?t differentiate from str.format, etc) * string interpolations * string expressions * string comprehensions (apparently too far removed from set comprehensions) * Maybe format(ted) string displays? (parallelling list etc displays) ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 03:22:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 Mar 2017 07:22:37 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490685757.72.0.767333177399.issue29928@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't have a link. There were a lot of threads about this feature and I didn't follow them. After implementing PEP 498 there was a discussion about terminology. I read discussions about coming and released Python 3.6 on StackOverflow, Reddit and other resources and seen a lot of misinterpretation due to using terms "string" and "literal". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 03:40:47 2017 From: report at bugs.python.org (Chewy) Date: Tue, 28 Mar 2017 07:40:47 +0000 Subject: [issue29922] error message when __aexit__ is not async In-Reply-To: <1490635462.94.0.877144122619.issue29922@psf.upfronthosting.co.za> Message-ID: <1490686847.36.0.731103331703.issue29922@psf.upfronthosting.co.za> Changes by Chewy : ---------- nosy: +Chewy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 04:17:34 2017 From: report at bugs.python.org (m-parry) Date: Tue, 28 Mar 2017 08:17:34 +0000 Subject: [issue29921] datetime validation is stricter in 3.6.1 than previous versions In-Reply-To: <1490622527.46.0.936939014549.issue29921@psf.upfronthosting.co.za> Message-ID: <1490689054.3.0.765012771681.issue29921@psf.upfronthosting.co.za> m-parry added the comment: >From my opening comment (with new emphasis): "I think it's the case that **some routes via the C API** now reject out of range values that were previously permitted." The pywin32 repro I gave above eventually calls PyDateTimeAPI->DateTime_FromDateAndTime(): http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/file/85c1c99b1cb8/win32/src/PyTime.cpp#l980 AFAICT, under Python < 3.6.1 such out of range values were tolerated there. Under Python 2.7, for example, the datetime that results from this call is somewhere in 1899. I am not claiming that these invalid values should be tolerated forever more, or that this was ever the correct behaviour, but I would have expected a backwards incompatible change like this to happen in, say, Python 3.7, rather than a maintenance release. (Particularly when it breaks a library that's practically standard on Windows.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 05:22:30 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 28 Mar 2017 09:22:30 +0000 Subject: [issue29929] Idea: Make __main__ an implied package Message-ID: <1490692950.43.0.231452338576.issue29929@psf.upfronthosting.co.za> New submission from Nick Coghlan: In just the last 24 hours, I've run across two cases where the default "the script directory is on sys.path" behaviour confused even experienced programmers: 1. a GitHub engineer thought the Python version in their Git-for-Windows bundle was broken because "from random import randint" failed (from a script called "random.py" 2. a Red Hat engineer was thoroughly confused when their systemd.py script was executed a second time when an unhandled exception was raised (Fedora's system Python is integrated with the ABRT crash reporter, and the except hook implementation does "from systemd import journal" while dealing with an unhandled exception) This isn't a new problem, we've known for a long time that people are regularly confused by this, and it earned a mention as one of my "Traps for the Unwary in Python's Import System": http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#the-name-shadowing-trap However, what's changed is that for the first time I think I see a potential way out of this: rather than injecting the script directory as sys.path[0], we could set it as "__main__.__path__ = []". Cross-version compatible code would then be written as: if "__path__" in globals(): from . import relative_module_name else: import relative_module_name This approach would effectively be a continuation of PEP 328 (which eliminated implicit relative imports from within packages) and PEP 366 (which allowed implicit relative imports from modules executed with the '-m' switch). ---------- components: Interpreter Core messages: 290689 nosy: ncoghlan priority: normal severity: normal status: open title: Idea: Make __main__ an implied package type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 05:45:54 2017 From: report at bugs.python.org (Metathink) Date: Tue, 28 Mar 2017 09:45:54 +0000 Subject: [issue29930] asyncio.StreamWriter.drain raises an AssertionError under heavy use Message-ID: <1490694354.71.0.0417616939951.issue29930@psf.upfronthosting.co.za> New submission from Metathink: While trying to break some code in a project using asyncio, I found that under certain circumstances, asyncio.StreamWriter.drain raises an AssertionError. 1. There must be a lot of concurrent uses of "await writer.drain()" 2. The server on which we send data must be public, no AssertionError occurs while connected to 127.0.0.1 Task exception was never retrieved future: exception=AssertionError()> Traceback (most recent call last): File "client.py", line 12, in flooding await writer.drain() File "/usr/local/lib/python3.6/asyncio/streams.py", line 333, in drain yield from self._protocol._drain_helper() File "/usr/local/lib/python3.6/asyncio/streams.py", line 208, in _drain_helper assert waiter is None or waiter.cancelled() AssertionError I don't know much about how the drain function is working or how networking is handled by the OS, but I'm assuming that I'v reached some OS limitation which trigger this AssertionError. I'm not sure how I'm supposed to handle that. Am I supposed to add some throttling because I should not send too much data concurrently? Is this considered as a bug? Any explanations are welcome. Here some minimal client and server exemples if you want to try to reproduce it: - Server: https://pastebin.com/SED89pwB - Client: https://pastebin.com/ikJKHxi9 Also, I don't think this is limited to python 3.6, I'v found this old issue on the aaugustin's websockets repo which looks the same: https://github.com/aaugustin/websockets/issues/16 ---------- components: asyncio messages: 290690 nosy: metathink, yselivanov priority: normal severity: normal status: open title: asyncio.StreamWriter.drain raises an AssertionError under heavy use type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 05:48:19 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 28 Mar 2017 09:48:19 +0000 Subject: [issue29929] Idea: Make __main__ an implied package In-Reply-To: <1490692950.43.0.231452338576.issue29929@psf.upfronthosting.co.za> Message-ID: <1490694499.88.0.53522303002.issue29929@psf.upfronthosting.co.za> Nick Coghlan added the comment: A key enabler for actually pursuing this idea would be coming up with a feasible way of emitting a deprecation warning for code that relied on the old implicit relative imports. A reasonable fast check for that would be to: 1. Start populating a private sys._main_path_entry in the sys module in addition to including it in both __main__.__path__ and sys.path 2. During the deprecation period, emit a warning when an import is satisfied from the sys._main_path_entry directory and the fully qualified module name *doesn't* start with "__main__." 3. After the deprecation period, stop populating sys.path[0], stop setting sys._main_path_entry, and stop emitting the deprecation warning There's still plenty of details to be worked out before this idea could become reality (especially in terms of how it relates to module execution with the -m switch), but both the idea and a managed migration away from the status quo seem like they should be feasible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 06:00:30 2017 From: report at bugs.python.org (Eryk Sun) Date: Tue, 28 Mar 2017 10:00:30 +0000 Subject: [issue29908] Inconsistent crashing with an access violation In-Reply-To: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> Message-ID: <1490695230.46.0.275804987849.issue29908@psf.upfronthosting.co.za> Eryk Sun added the comment: I can confirm that the CRT function construct_environment_block() does cause an access violation sometimes when no "=x:" shell variables are defined in the current environment. These "=x:" environment variables are the way that Windows emulates DOS per-drive working directories in a shell. The API itself never sets these variables; it only uses them if they're defined. You should be able to avoid this bug by defining the environment variable "=C:". The simplest way to do this in Python is via os.chdir. For example: import os cwd = os.getcwd() try: os.chdir('C:') finally: os.chdir(cwd) The implementation of os.chdir calls SetCurrentDirectoryW, which, for a drive-relative path such as "C:", will first look for an "=x:" environment variable and otherwise default to the root directory. After it changes the process current working directory, chdir() calls GetCurrentDirectoryW and SetEnvironmentVariableW to set the new value of the "=x:" variable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 06:02:03 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 28 Mar 2017 10:02:03 +0000 Subject: [issue29929] Eliminate implicit __main__ relative imports In-Reply-To: <1490692950.43.0.231452338576.issue29929@psf.upfronthosting.co.za> Message-ID: <1490695323.33.0.0197751802867.issue29929@psf.upfronthosting.co.za> Nick Coghlan added the comment: In formulating a post to import-sig about this, I realised it made more sense to describe it in terms of the goal (eliminating implicit __main__ relative imports) rather than one possible technique for achieving that goal. ---------- title: Idea: Make __main__ an implied package -> Eliminate implicit __main__ relative imports _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 06:13:49 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 28 Mar 2017 10:13:49 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490696029.77.0.285222979843.issue29677@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Mariatta, Yes, thank you, I will work on a pull request to address Victor's comment. Since it's my first time, I hope to read through the contributing docs and get this done today or tomorrow. Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 06:37:20 2017 From: report at bugs.python.org (Sanjay) Date: Tue, 28 Mar 2017 10:37:20 +0000 Subject: [issue29931] ipaddress.ip_interface __lt__ check seems to be broken Message-ID: <1490697440.73.0.104969617886.issue29931@psf.upfronthosting.co.za> New submission from Sanjay: The less than check for ip_interface behavior seems weird. I am not sure if this is by design. We are just comparing the network address but when network address is equal we should compare the ip address. The expectation is if a < b is False then b <= a must be True >>> import ipaddress >>> a = ipaddress.ip_interface("1.1.1.1/24") >>> b = ipaddress.ip_interface("1.1.1.2/24") >>> a < b False >>> b <= a False >>> a == b False >>> This happens with both v4 and v6 The tests were passing because in ComparisonTests we were testing with prefix length of 32 which means the whole ip address became the network address. I have made a fix here: https://github.com/s-sanjay/cpython/commit/14975f58539308b7af5a1519705fb8cd95ad7951 I can add more tests and send PR but before that I wanted to confirm the behavior. ---------- components: Library (Lib) messages: 290695 nosy: Sanjay, ncoghlan, pmoody, xiang.zhang priority: normal severity: normal status: open title: ipaddress.ip_interface __lt__ check seems to be broken type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 06:53:05 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 28 Mar 2017 10:53:05 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490698385.41.0.0682429785983.issue29928@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: It's odd how 'f-string' just caught on when byte, raw and unicode strings never really did (at least I personally don't see many people using b-string, r-string and u-string respectively). Shouldn't an entry for them be made too if 'f-string' would be added? As for the name used by everyone, you can't blame them, f-string is a term used throughout PEP 498. I guess a a new discussion might be warranted where people can decide if a new term should be thought of or if the negative effects of using the current aren't all that bad. ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 07:00:44 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 28 Mar 2017 11:00:44 +0000 Subject: [issue29798] Handle "git worktree" in "make patchcheck" In-Reply-To: <1489299211.77.0.0188090534059.issue29798@psf.upfronthosting.co.za> Message-ID: <1490698844.34.0.59881335636.issue29798@psf.upfronthosting.co.za> Nick Coghlan added the comment: No, that's the bug that prompted me to reopen the issue. I just got distracted and never submitted the follow-up PR :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 07:07:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 11:07:07 +0000 Subject: [issue29921] datetime validation is stricter in 3.6.1 than previous versions In-Reply-To: <1490689054.3.0.765012771681.issue29921@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2017-03-28 10:17 GMT+02:00 m-parry : > "I think it's the case that **some routes via the C API** now reject out of range values that were previously permitted." > > The pywin32 repro I gave above eventually calls PyDateTimeAPI->DateTime_FromDateAndTime(): > > http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/file/85c1c99b1cb8/win32/src/PyTime.cpp#l980 You can please identify which C function is called and dump which parameters are passed to the function? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 08:23:58 2017 From: report at bugs.python.org (m-parry) Date: Tue, 28 Mar 2017 12:23:58 +0000 Subject: [issue29921] datetime validation is stricter in 3.6.1 than previous versions In-Reply-To: <1490622527.46.0.936939014549.issue29921@psf.upfronthosting.co.za> Message-ID: <1490703838.1.0.814733102576.issue29921@psf.upfronthosting.co.za> m-parry added the comment: That's just a Python C API call. It looks like it eventually resolves to new_datetime_ex(30828, 9, 13, 3, 48, 5, 480000, Py_None, PyDateTime_DateTimeType). We also have some internal code that sees a similar problem from calling PyTime_FromTime(), that was similarly affected by this change. In one example, that appears to resolve to new_time_ex(24, 0, 0, 0, Py_None, PyDateTime_TimeType). Again, under <3.6.1, that was accepted. (And again, I am making no argument about the validity of this code, just with regards to backwards compatibility.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 08:31:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 Mar 2017 12:31:47 +0000 Subject: [issue29931] ipaddress.ip_interface __lt__ check seems to be broken In-Reply-To: <1490697440.73.0.104969617886.issue29931@psf.upfronthosting.co.za> Message-ID: <1490704307.43.0.836680019171.issue29931@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed, this looks as a bug. >>> a < b False >>> b > a True ---------- nosy: +serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 08:35:05 2017 From: report at bugs.python.org (SylvainDe) Date: Tue, 28 Mar 2017 12:35:05 +0000 Subject: [issue29932] Missing word ("be") in error message ("first argument must a type object") Message-ID: <1490704505.47.0.339319801351.issue29932@psf.upfronthosting.co.za> New submission from SylvainDe: Very uninteresting issue but error message should probably be "first argument must BE a type object" in `array__array_reconstructor_impl` in Modules/arraymodule.c . This has been introduced with ad077154d0f305ee0ba5bf41d3cb47d1d9c43e7b . I'll handle this issue in the next day. ---------- messages: 290701 nosy: SylvainDe priority: normal severity: normal status: open title: Missing word ("be") in error message ("first argument must a type object") type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 08:35:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 12:35:08 +0000 Subject: [issue29930] asyncio.StreamWriter.drain raises an AssertionError under heavy use In-Reply-To: <1490694354.71.0.0417616939951.issue29930@psf.upfronthosting.co.za> Message-ID: <1490704508.93.0.444528036061.issue29930@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file46761/server.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 08:35:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 12:35:35 +0000 Subject: [issue29930] asyncio.StreamWriter.drain raises an AssertionError under heavy use In-Reply-To: <1490694354.71.0.0417616939951.issue29930@psf.upfronthosting.co.za> Message-ID: <1490704535.63.0.641130918238.issue29930@psf.upfronthosting.co.za> STINNER Victor added the comment: Modified client and server to be able to reproduce the issue on a LAN. ---------- nosy: +haypo Added file: http://bugs.python.org/file46762/client.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 08:36:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 12:36:03 +0000 Subject: [issue29930] asyncio.StreamWriter.drain raises an AssertionError under heavy use In-Reply-To: <1490694354.71.0.0417616939951.issue29930@psf.upfronthosting.co.za> Message-ID: <1490704563.83.0.746573120259.issue29930@psf.upfronthosting.co.za> STINNER Victor added the comment: The bug occurs when the transport pauses writing and the client code calls drain() multiple times in parallel. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 08:47:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 12:47:06 +0000 Subject: [issue29930] asyncio.StreamWriter.drain raises an AssertionError under heavy use In-Reply-To: <1490694354.71.0.0417616939951.issue29930@psf.upfronthosting.co.za> Message-ID: <1490705226.39.0.069430439636.issue29930@psf.upfronthosting.co.za> STINNER Victor added the comment: I understood that: * code fills the write buffer of the transport until writing is paused because of the high water mark * a function calls drain() which waits until the server reads until packets to reduce the size of the write buffer * a second function calls drain(), but the first function is already waiting on drain(): bug occurs since the code doesn't support having two coroutines waiting on drain() in parallel Notes: * the minimum is to document that drain() must not be called twice in parallel. Right now, nothing is said about that: https://docs.python.org/dev/library/asyncio-stream.html#asyncio.StreamWriter.drain * we can probably design something to allow to have multiple coroutines waiting on the same event -- Metathink told me that he got the bug on a much more complex code using websockets. Thank you Metathink for isolating the bug to a few lines of Python code with simpler asyncio functions! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 08:50:53 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 28 Mar 2017 12:50:53 +0000 Subject: [issue29643] --enable-optimizations compiler flag has no effect In-Reply-To: <1487978410.86.0.66468070718.issue29643@psf.upfronthosting.co.za> Message-ID: <1490705453.79.0.827265555633.issue29643@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 8cea5929f52801b0ce5928b46ef836e99a24321a by INADA Naoki (Alex Wang) in branch 'master': bpo-29643: Fix check for --enable-optimizations (GH-129) https://github.com/python/cpython/commit/8cea5929f52801b0ce5928b46ef836e99a24321a ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 08:57:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 12:57:03 +0000 Subject: [issue29930] asyncio.StreamWriter.drain raises an AssertionError under heavy use In-Reply-To: <1490694354.71.0.0417616939951.issue29930@psf.upfronthosting.co.za> Message-ID: <1490705823.26.0.0582002697468.issue29930@psf.upfronthosting.co.za> STINNER Victor added the comment: Proof-of-concept of patched drain() to support multiple waiters. I don't see any strong reason to not allow two coroutines to wait on drain() in parallel? I'm too lazy to write a full patch with unit tests, doc changed, etc. I started with a PoC to discuss the solution. ---------- keywords: +patch Added file: http://bugs.python.org/file46763/drain_multiple_waiters.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 08:57:29 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 28 Mar 2017 12:57:29 +0000 Subject: [issue29643] --enable-optimizations compiler flag has no effect In-Reply-To: <1487978410.86.0.66468070718.issue29643@psf.upfronthosting.co.za> Message-ID: <1490705849.85.0.407254037008.issue29643@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:00:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 13:00:49 +0000 Subject: [issue29643] --enable-optimizations compiler flag has no effect In-Reply-To: <1487978410.86.0.66468070718.issue29643@psf.upfronthosting.co.za> Message-ID: <1490706049.17.0.831181202119.issue29643@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +769 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:07:26 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 28 Mar 2017 13:07:26 +0000 Subject: [issue29643] --enable-optimizations compiler flag has no effect In-Reply-To: <1487978410.86.0.66468070718.issue29643@psf.upfronthosting.co.za> Message-ID: <1490706446.41.0.262610116683.issue29643@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +770 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:09:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 13:09:58 +0000 Subject: [issue29921] datetime validation is stricter in 3.6.1 than previous versions In-Reply-To: <1490622527.46.0.936939014549.issue29921@psf.upfronthosting.co.za> Message-ID: <1490706598.64.0.0603234159366.issue29921@psf.upfronthosting.co.za> STINNER Victor added the comment: > Again, under <3.6.1, that was accepted. (And again, I am making no argument about the validity of this code, just with regards to backwards compatibility.) You are right that I modified the C API of datetime in Python 3.6.1 to make it stricter and reject invalid dates. I disagree that the "backward incompatibility" part: I consider that it's a bugfix, and not a behaviour change. The datetime module was enhanced in Python 3.6 with the PEP 495 to handle better DST changes: a new "fold" attribute was added. Computing this attribute requires to handle valid dates in the [datetime.datetime.min; datetime.datetime.max] range. Otherwise, you get strange errors like OverflowError: see issue #29100. If Python older than 3.6.1 allowed creating invalid dates, it was a bug, and now this bug can lead to new bugs because of the implementation of the PEP 495. Please fix you code. I now close this issue as NOTABUG. Stricter input validation was a deliberate choice. ---------- nosy: +belopolsky resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:11:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 13:11:33 +0000 Subject: [issue29100] datetime.fromtimestamp() doesn't check min/max year anymore: regression of Python 3.6 In-Reply-To: <1482972647.78.0.524140289263.issue29100@psf.upfronthosting.co.za> Message-ID: <1490706693.58.0.115402095967.issue29100@psf.upfronthosting.co.za> STINNER Victor added the comment: m-parry reported the issue #29921 "datetime validation is stricter in 3.6.1 than previous versions". He is right, the C API of Python 3.6.1 is now stricter than Python 2.7 and 3.5. The C API doesn't allow anymore to create datetime objects outside the [datetime.datetime.min; datetime.datetime.max] range (what I would call "invalid" datetime objects). I closed the bug as NOT A BUG since I consider that it's a deliberate design choice and not a regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:12:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 13:12:14 +0000 Subject: [issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing In-Reply-To: <1490694354.71.0.0417616939951.issue29930@psf.upfronthosting.co.za> Message-ID: <1490706734.65.0.623953159188.issue29930@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: asyncio.StreamWriter.drain raises an AssertionError under heavy use -> Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:12:52 2017 From: report at bugs.python.org (m-parry) Date: Tue, 28 Mar 2017 13:12:52 +0000 Subject: [issue29921] datetime validation is stricter in 3.6.1 than previous versions In-Reply-To: <1490622527.46.0.936939014549.issue29921@psf.upfronthosting.co.za> Message-ID: <1490706772.38.0.322553613714.issue29921@psf.upfronthosting.co.za> m-parry added the comment: pywin32 is not my code. It is a ubiquitous Python library on Windows that cannot be used under Python 3.6.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:13:09 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 28 Mar 2017 13:13:09 +0000 Subject: [issue29932] Missing word ("be") in error message ("first argument must a type object") In-Reply-To: <1490704505.47.0.339319801351.issue29932@psf.upfronthosting.co.za> Message-ID: <1490706789.31.0.0317245286036.issue29932@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Indeed, quickly glancing over the error messages there's another small typo in https://github.com/python/cpython/blob/master/Modules/arraymodule.c#L2371: "array indices must be integer" -> "array indices must be integers" might as well fix that in your PR too (maybe also change the title to: "Fix small error message typos in arraymodule.c"?) ---------- nosy: +Jim Fasarakis-Hilliard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:15:38 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 28 Mar 2017 13:15:38 +0000 Subject: [issue29643] --enable-optimizations compiler flag has no effect In-Reply-To: <1487978410.86.0.66468070718.issue29643@psf.upfronthosting.co.za> Message-ID: <1490706938.7.0.183706987729.issue29643@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +771 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:18:58 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 28 Mar 2017 13:18:58 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490707138.17.0.952925477376.issue29928@psf.upfronthosting.co.za> R. David Murray added the comment: "raw" and "byte" are one syllable names, and thus as easy and more meaningful to say than "r-string" or "b-string". "unicode string" is more descriptive and not much longer, but "u-string" does occasionally get used, though mostly in a python3 context where you want to differentiate it from normal unadorned unicode strings. If you want to replace 'f-string' in the vernacular, you need a one or two syllable word that is descriptive. The only real candidate is "format string", and we already use that for the older types of format strings. If those were to fall out of use, I'd expect "format string" to come to mean what f-string does now. But by the time that happens, f-string will be more entrenched than it is now. We could try for "format expression", but that is more syllables, and faces headwind because the f prefix obviously makes it a "string"-like object, and that's how we think about it: a string with expressions inside it, instead of as an expression itself. In summary, I think we're stuck with f-string. It's a term of art: a short expression that encapsulates a non-trivial concept for which there are no precise existing words. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:18:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 13:18:59 +0000 Subject: [issue29933] asyncio: set_write_buffer_limits() doc doesn't specify unit of the parameters Message-ID: <1490707139.27.0.838851028066.issue29933@psf.upfronthosting.co.za> New submission from STINNER Victor: The asyncio set_write_buffer_limits() documentation doesn't specify unit of high and low parameters. Moreover, it would to explain better the effect of high and low: * pause_writing() is called when the buffer size becomes larger or equal to high * (if writing is pause) resume_writing() is called when the buffer size becomes smaller or equal to low ---------- assignee: docs at python components: Documentation, asyncio keywords: easy messages: 290712 nosy: docs at python, haypo, yselivanov priority: normal severity: normal status: open title: asyncio: set_write_buffer_limits() doc doesn't specify unit of the parameters versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:19:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 13:19:24 +0000 Subject: [issue29933] asyncio: set_write_buffer_limits() doc doesn't specify unit of the parameters In-Reply-To: <1490707139.27.0.838851028066.issue29933@psf.upfronthosting.co.za> Message-ID: <1490707164.69.0.253427453326.issue29933@psf.upfronthosting.co.za> STINNER Victor added the comment: See also https://github.com/asyncio-doc/asyncio-doc/issues/17 for a more general documentation request on asyncio parameters (on the external asyncio doc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:24:57 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 28 Mar 2017 13:24:57 +0000 Subject: [issue29932] Missing word ("be") in error message ("first argument must a type object") In-Reply-To: <1490704505.47.0.339319801351.issue29932@psf.upfronthosting.co.za> Message-ID: <1490707497.17.0.229137044677.issue29932@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: ..and another one here https://github.com/python/cpython/blob/master/Modules/arraymodule.c#L2145: "__reduce_ex__ argument should an integer" -> ".. should be .." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:26:16 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 28 Mar 2017 13:26:16 +0000 Subject: [issue29929] Eliminate implicit __main__ relative imports In-Reply-To: <1490692950.43.0.231452338576.issue29929@psf.upfronthosting.co.za> Message-ID: <1490707576.92.0.214412277672.issue29929@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:37:50 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 28 Mar 2017 13:37:50 +0000 Subject: [issue29926] time.sleep ignores _thread.interrupt_main() In-Reply-To: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> Message-ID: <1490708270.92.0.433700455941.issue29926@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Eryk, would the addition go before or after "trip_signal(SIGINT);" I posted "Issue with _thread.interrupt_main (29926)" on pydev list. Steven D'Aprano verified delayed response on *nix. Martin Panter said "Looking at the implementation, _thread.interrupt_main just calls PyErr_SetInterrupt. It doesn?t appear to send a signal. I played with ?strace? and couldn?t see any evidence of a signal. I guess it just sets a flag that will be polled. To actually interrupt the ?sleep? call, you might need to use ?pthread_kill? or similar (at least on Unix)." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 09:55:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Mar 2017 13:55:57 +0000 Subject: [issue29933] asyncio: set_write_buffer_limits() doc doesn't specify unit of the parameters In-Reply-To: <1490707139.27.0.838851028066.issue29933@psf.upfronthosting.co.za> Message-ID: <1490709357.9.0.374904890943.issue29933@psf.upfronthosting.co.za> STINNER Victor added the comment: It would also be nice to: * link to set_write_buffer_limits() from drain() * link to set_write_buffer_limits() from pause_writing() / resume_writing() * mention asyncio default values for set_write_buffer_limits(): low=16 kB, high=64 kB (kb? kib? i never know :-/) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:02:09 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 28 Mar 2017 14:02:09 +0000 Subject: [issue19824] string.Template: Rewrite docs to emphasize i18n use case In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1490709729.23.0.0530626353071.issue19824@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 9f74deba784fc8781d13ed564f69c02ed7c331bb by Barry Warsaw in branch 'master': Improve the documentation for template strings (#856) https://github.com/python/cpython/commit/9f74deba784fc8781d13ed564f69c02ed7c331bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:02:09 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 28 Mar 2017 14:02:09 +0000 Subject: [issue12518] In string.Template it's impossible to transform delimiter in the derived class In-Reply-To: <1310085409.68.0.478281072881.issue12518@psf.upfronthosting.co.za> Message-ID: <1490709729.46.0.262198470216.issue12518@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 9f74deba784fc8781d13ed564f69c02ed7c331bb by Barry Warsaw in branch 'master': Improve the documentation for template strings (#856) https://github.com/python/cpython/commit/9f74deba784fc8781d13ed564f69c02ed7c331bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:02:09 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 28 Mar 2017 14:02:09 +0000 Subject: [issue20314] Potentially confusing formulation in 6.1.4. Template strings In-Reply-To: <1390237853.97.0.751678212058.issue20314@psf.upfronthosting.co.za> Message-ID: <1490709729.56.0.184421759101.issue20314@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 9f74deba784fc8781d13ed564f69c02ed7c331bb by Barry Warsaw in branch 'master': Improve the documentation for template strings (#856) https://github.com/python/cpython/commit/9f74deba784fc8781d13ed564f69c02ed7c331bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:04:00 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 28 Mar 2017 14:04:00 +0000 Subject: [issue12518] In string.Template it's impossible to transform delimiter in the derived class In-Reply-To: <1310085409.68.0.478281072881.issue12518@psf.upfronthosting.co.za> Message-ID: <1490709840.35.0.468155352662.issue12518@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:04:19 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 28 Mar 2017 14:04:19 +0000 Subject: [issue19824] string.Template: Rewrite docs to emphasize i18n use case In-Reply-To: <1385658424.56.0.963803246137.issue19824@psf.upfronthosting.co.za> Message-ID: <1490709859.58.0.576300178081.issue19824@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:04:34 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 28 Mar 2017 14:04:34 +0000 Subject: [issue20314] Potentially confusing formulation in 6.1.4. Template strings In-Reply-To: <1390237853.97.0.751678212058.issue20314@psf.upfronthosting.co.za> Message-ID: <1490709874.02.0.857739587021.issue20314@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:04:40 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 28 Mar 2017 14:04:40 +0000 Subject: [issue20314] Potentially confusing formulation in 6.1.4. Template strings In-Reply-To: <1390237853.97.0.751678212058.issue20314@psf.upfronthosting.co.za> Message-ID: <1490709880.79.0.649081628842.issue20314@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- versions: +Python 3.7 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:13:03 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 28 Mar 2017 14:13:03 +0000 Subject: [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1490710383.88.0.861075956607.issue16011@psf.upfronthosting.co.za> R. David Murray added the comment: New changeset 0ae7c8bd614d3aa1fcaf2d71a10ff1148c80d9b5 by R. David Murray (Amit Kumar) in branch 'master': bpo-16011 clarify that 'in' always returns a boolean value https://github.com/python/cpython/commit/0ae7c8bd614d3aa1fcaf2d71a10ff1148c80d9b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:19:14 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 28 Mar 2017 14:19:14 +0000 Subject: [issue29921] datetime validation is stricter in 3.6.1 than previous versions In-Reply-To: <1490622527.46.0.936939014549.issue29921@psf.upfronthosting.co.za> Message-ID: <1490710754.63.0.561429392385.issue29921@psf.upfronthosting.co.za> Ned Deily added the comment: FTR, there is now a pywin32 issue (opened by the OP) on this: https://sourceforge.net/p/pywin32/bugs/748/ ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:21:15 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 14:21:15 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490710875.63.0.182901856506.issue29928@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: The abstract of PEP 498 states: ``` In this PEP, such strings will be referred to as "f-strings", taken from the leading character used to denote such strings, and standing for "formatted strings". ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:27:12 2017 From: report at bugs.python.org (Armin Rigo) Date: Tue, 28 Mar 2017 14:27:12 +0000 Subject: [issue29694] race condition in pathlib mkdir with flags parents=True In-Reply-To: <1488462813.87.0.464471853988.issue29694@psf.upfronthosting.co.za> Message-ID: <1490711232.46.0.25619343069.issue29694@psf.upfronthosting.co.za> Armin Rigo added the comment: Changes including a test. The test should check all combinations of "concurrent" creation of the directory. It hacks around at pathlib._normal_accessor.mkdir (patching "os.mkdir" has no effect, as the built-in function was already extracted and stored inside pathlib._normal_accessor). ---------- Added file: http://bugs.python.org/file46764/x2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:27:23 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 14:27:23 +0000 Subject: [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1490711243.86.0.210694647547.issue16011@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +772 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:27:54 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 14:27:54 +0000 Subject: [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1490711274.16.0.0537299798029.issue16011@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:33:09 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 28 Mar 2017 14:33:09 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1490711589.61.0.504504191743.issue10379@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: needs patch -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:37:41 2017 From: report at bugs.python.org (Mert Bora Alper) Date: Tue, 28 Mar 2017 14:37:41 +0000 Subject: [issue29934] % formatting fails to find formatting code in bytes type after a null byte Message-ID: <1490711861.33.0.140733331075.issue29934@psf.upfronthosting.co.za> New submission from Mert Bora Alper: Hello, In Python 3.6.0, % formatting fails to find formatting code after a null byte in bytes type. Example: >>> "%s_\x00%s" % ("hello", "world") 'hello_\x00world' >>> b"%s_\x00%s" % (b"hello", b"world") Traceback (most recent call last): File "", line 1, in TypeError: not all arguments converted during bytes formatting In contrast, the exact same code works as expected in Python 3.5: >>> "%s_\x00%s" % ("hello", "world") 'hello_\x00world' >>> b"%s_\x00%s" % (b"hello", b"world") b'hello_\x00world' I used Python 3.6.0 that I installed using pyenv 1.0.8 on Kubuntu 16.04 x86_64. ---------- messages: 290724 nosy: boramalper priority: normal severity: normal status: open title: % formatting fails to find formatting code in bytes type after a null byte type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:39:33 2017 From: report at bugs.python.org (Mert Bora Alper) Date: Tue, 28 Mar 2017 14:39:33 +0000 Subject: [issue29934] % formatting fails to find formatting code in bytes type after a null byte In-Reply-To: <1490711861.33.0.140733331075.issue29934@psf.upfronthosting.co.za> Message-ID: <1490711973.04.0.45060638842.issue29934@psf.upfronthosting.co.za> Changes by Mert Bora Alper : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:41:35 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 28 Mar 2017 14:41:35 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1490712095.5.0.199035494313.issue10379@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: backport needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:42:00 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 28 Mar 2017 14:42:00 +0000 Subject: [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1490712120.32.0.881427458144.issue16011@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:43:07 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 28 Mar 2017 14:43:07 +0000 Subject: [issue29934] % formatting fails to find formatting code in bytes type after a null byte In-Reply-To: <1490711861.33.0.140733331075.issue29934@psf.upfronthosting.co.za> Message-ID: <1490712187.96.0.0208328442232.issue29934@psf.upfronthosting.co.za> Xiang Zhang added the comment: Yes, this is a regression in 3.6.0 and it has been fixed in #29714 for 3.6.1. Try the new version. :-) ---------- nosy: +xiang.zhang resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> can't interpolate byte string with \x00 before replacement identifier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:47:13 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 28 Mar 2017 14:47:13 +0000 Subject: [issue29934] % formatting fails to find formatting code in bytes type after a null byte In-Reply-To: <1490711861.33.0.140733331075.issue29934@psf.upfronthosting.co.za> Message-ID: <1490712433.52.0.563689999122.issue29934@psf.upfronthosting.co.za> Xiang Zhang added the comment: Sorry, the fix is for 3.6.2 so 3.6.1 would still suffer from it. :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 10:56:01 2017 From: report at bugs.python.org (Eryk Sun) Date: Tue, 28 Mar 2017 14:56:01 +0000 Subject: [issue29926] time.sleep ignores _thread.interrupt_main() In-Reply-To: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> Message-ID: <1490712961.06.0.452239916275.issue29926@psf.upfronthosting.co.za> Eryk Sun added the comment: For Windows the event should be set after trip_signal(SIGINT). That way the flag is guaranteed to be tripped when PyErr_CheckSignals is called from the time module's pysleep() function. This in turn calls the default SIGINT handler that raises a KeyboardInterrupt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 11:01:27 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 28 Mar 2017 15:01:27 +0000 Subject: [issue29904] Fix a number of error message typos In-Reply-To: <1490463341.4.0.570341233776.issue29904@psf.upfronthosting.co.za> Message-ID: <1490713287.18.0.183284657003.issue29904@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 11:04:26 2017 From: report at bugs.python.org (Ryan Gonzalez) Date: Tue, 28 Mar 2017 15:04:26 +0000 Subject: [issue11913] sdist refuses README.rst In-Reply-To: <1303613322.81.0.629577121535.issue11913@psf.upfronthosting.co.za> Message-ID: <1490713466.52.0.416713500783.issue11913@psf.upfronthosting.co.za> Ryan Gonzalez added the comment: FWIW, I opened a PR for this: https://github.com/python/cpython/pull/563 ---------- nosy: +refi64 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 11:25:29 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 28 Mar 2017 15:25:29 +0000 Subject: [issue29643] --enable-optimizations compiler flag has no effect In-Reply-To: <1487978410.86.0.66468070718.issue29643@psf.upfronthosting.co.za> Message-ID: <1490714729.27.0.233246298764.issue29643@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset f01de61a8efea8319c65365898982f929d59a895 by INADA Naoki in branch '3.6': bpo-29643: Fix check for --enable-optimizations (GH-869) https://github.com/python/cpython/commit/f01de61a8efea8319c65365898982f929d59a895 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 11:26:31 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 28 Mar 2017 15:26:31 +0000 Subject: [issue29643] --enable-optimizations compiler flag has no effect In-Reply-To: <1487978410.86.0.66468070718.issue29643@psf.upfronthosting.co.za> Message-ID: <1490714791.78.0.920520628522.issue29643@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset e6a49531568561fe5aaf662259ecb7b4bc2426be by INADA Naoki in branch '3.5': bpo-29643: Fix check for --enable-optimizations (GH-871) https://github.com/python/cpython/commit/e6a49531568561fe5aaf662259ecb7b4bc2426be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 11:31:11 2017 From: report at bugs.python.org (Aymeric Augustin) Date: Tue, 28 Mar 2017 15:31:11 +0000 Subject: [issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing In-Reply-To: <1490694354.71.0.0417616939951.issue29930@psf.upfronthosting.co.za> Message-ID: <1490715071.32.0.216492800241.issue29930@psf.upfronthosting.co.za> Aymeric Augustin added the comment: For context, websockets calls `yield from self.writer.drain()` after each write in order to provide backpressure. If the output buffer fills up, calling API coroutines that write to the websocket connection becomes slow and hopefully the backpressure will propagate (in a correctly implemented application). This is a straightforward application of the only use case described in the documentation. ---- I would find it annoying to have to serialize calls to drain() myself. It doesn't feel like something the "application" should care about. (websockets is the application from asyncio's perspective.) I'm wondering if it could be a problem if a bunch of corountines were waiting on drain() and got released simultaneously. I don't think it would be a problem for websockets. Since my use case seems typical, there's a good chance this also applies to other apps. So I'm in favor of simply allowing an arbitrary number of coroutines to wait on drain() in parallel, if that's feasible. ---------- nosy: +aymeric.augustin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 11:43:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 Mar 2017 15:43:30 +0000 Subject: [issue29104] Left bracket remains in format string result when '\' preceeds it In-Reply-To: <1483012585.51.0.342717701316.issue29104@psf.upfronthosting.co.za> Message-ID: <1490715810.26.0.932878139065.issue29104@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 11:43:40 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 28 Mar 2017 15:43:40 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1490715820.72.0.448164766179.issue10379@psf.upfronthosting.co.za> R. David Murray added the comment: New changeset 1cf93a76c2cf307f2e1e514a8944864f746337ea by R. David Murray (Garvit Khatri) in branch 'master': bpo-10379: add 'monetary' to format_string, deprecate format https://github.com/python/cpython/commit/1cf93a76c2cf307f2e1e514a8944864f746337ea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 11:46:37 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 28 Mar 2017 15:46:37 +0000 Subject: [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1490715997.59.0.963500049532.issue10379@psf.upfronthosting.co.za> R. David Murray added the comment: Oops. I merged the patch without coming back here first :(. Still getting used to the new workflow. It turns out that format has a parameter, monetary, that isn't supported by format_string. So what we did was add that parameter to format_string and deprecate format. If there is objection to this solution I will revert the merge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:03:19 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 28 Mar 2017 16:03:19 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1490716999.26.0.509243505987.issue13349@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- pull_requests: +775 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:04:17 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 28 Mar 2017 16:04:17 +0000 Subject: [issue29908] Inconsistent crashing with an access violation In-Reply-To: <1490500413.47.0.654460616526.issue29908@psf.upfronthosting.co.za> Message-ID: <1490717057.19.0.0750728661567.issue29908@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks for the link! I've reported it to the C Runtime team and they'll get it fixed. (Because this is an operating system component, the fix will come through normal Windows Updates and apply to any version of Python 3.5+, so I'd rather not build a workaround into the product for it.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:16:22 2017 From: report at bugs.python.org (George King) Date: Tue, 28 Mar 2017 16:16:22 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters Message-ID: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> New submission from George King: As of python3.6, passing None to the start/end parameters of `list.index` and `tuple.index` raises the following exception: "slice indices must be integers or None or have an __index__ method" This suggests that the intent is to support None as a valid input. This would be quite useful for the end parameter, where the sensible default is len(self) rather than a constant. Note also that str, bytes, and bytearray all support None. I suggest that CPython be patched to support None for start/end. Otherwise, at the very least the exception message should be changed. Accepting None will make the optional start/end parameters for this method more consistent across the types, which is especially helpful when using type annotations / checking. ---------- messages: 290737 nosy: gwk priority: normal severity: normal status: open title: list and tuple index methods should accept None parameters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:22:32 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 28 Mar 2017 16:22:32 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490718152.8.0.76266515236.issue29677@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +776 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:26:04 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Tue, 28 Mar 2017 16:26:04 +0000 Subject: [issue29936] Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x Message-ID: <1490718364.46.0.906285030804.issue29936@psf.upfronthosting.co.za> New submission from Niklas Fiekas: The patch in http://bugs.python.org/issue16881 disables the nicer macro for gcc 3.x due to a small typo. The build is not failing. The guard just unnescessarily evaluates to false. ---------- components: Interpreter Core messages: 290738 nosy: niklasf priority: normal severity: normal status: open title: Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:28:29 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Tue, 28 Mar 2017 16:28:29 +0000 Subject: [issue29936] Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x In-Reply-To: <1490718364.46.0.906285030804.issue29936@psf.upfronthosting.co.za> Message-ID: <1490718509.49.0.982783993201.issue29936@psf.upfronthosting.co.za> Changes by Niklas Fiekas : ---------- pull_requests: +777 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:30:43 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Tue, 28 Mar 2017 16:30:43 +0000 Subject: [issue29936] Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x In-Reply-To: <1490718364.46.0.906285030804.issue29936@psf.upfronthosting.co.za> Message-ID: <1490718643.89.0.68901204798.issue29936@psf.upfronthosting.co.za> Changes by Niklas Fiekas : ---------- components: +Build -Interpreter Core nosy: +Jeffrey.Armstrong, christian.heimes type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:32:53 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 16:32:53 +0000 Subject: [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1490718773.04.0.904637085514.issue16011@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 0957f262c5e47167efd520624557aebdc61bfda8 by Mariatta in branch '3.5': bpo-16011: clarify that 'in' always returns a boolean value (GH-152) (GH-875) https://github.com/python/cpython/commit/0957f262c5e47167efd520624557aebdc61bfda8 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:33:40 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 28 Mar 2017 16:33:40 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490718820.66.0.710928424549.issue29935@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- components: +Interpreter Core versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:33:57 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 16:33:57 +0000 Subject: [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1490718837.42.0.60729474513.issue16011@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset c4021af50526f488c0c280e7c7eaa83ef80ae1df by Mariatta in branch '3.6': bpo-16011: clarify that 'in' always returns a boolean value (GH-874) https://github.com/python/cpython/commit/c4021af50526f488c0c280e7c7eaa83ef80ae1df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:35:11 2017 From: report at bugs.python.org (George King) Date: Tue, 28 Mar 2017 16:35:11 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490718911.66.0.671751675664.issue29935@psf.upfronthosting.co.za> Changes by George King : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:50:13 2017 From: report at bugs.python.org (paul j3) Date: Tue, 28 Mar 2017 16:50:13 +0000 Subject: [issue22049] argparse: type= doesn't honor nargs > 1 In-Reply-To: <1406135782.37.0.476079892774.issue22049@psf.upfronthosting.co.za> Message-ID: <1490719813.96.0.519767588008.issue22049@psf.upfronthosting.co.za> Changes by paul j3 : ---------- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:50:50 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 28 Mar 2017 16:50:50 +0000 Subject: [issue29643] --enable-optimizations compiler flag has no effect In-Reply-To: <1487978410.86.0.66468070718.issue29643@psf.upfronthosting.co.za> Message-ID: <1490719850.89.0.117862281654.issue29643@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 6a04ef7ceddae0930eba6cc57ba2ebfcef00abab by INADA Naoki in branch '2.7': bpo-29643: Fix check for --enable-optimizations (GH-873) https://github.com/python/cpython/commit/6a04ef7ceddae0930eba6cc57ba2ebfcef00abab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:51:50 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 28 Mar 2017 16:51:50 +0000 Subject: [issue29643] --enable-optimizations compiler flag has no effect In-Reply-To: <1487978410.86.0.66468070718.issue29643@psf.upfronthosting.co.za> Message-ID: <1490719910.9.0.478831191104.issue29643@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:54:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 Mar 2017 16:54:33 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1490720073.13.0.03379145936.issue13349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >>> [1, 2, 3].index("'") Traceback (most recent call last): File "", line 1, in ValueError: ""'"" not in list Aren't too much quotes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:55:02 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 28 Mar 2017 16:55:02 +0000 Subject: [issue29926] time.sleep ignores _thread.interrupt_main() In-Reply-To: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> Message-ID: <1490720102.91.0.27718171166.issue29926@psf.upfronthosting.co.za> Nathaniel Smith added the comment: If you want to trigger the standard signal handling logic, then raise(SIGINT) is also an option. On unix it probably won't help because of issue 21895, but using raise() here + fixing 21895 by using pthread_kill in the c level signal handler would together give a pretty simple and robust way to pretend that the user hit control-C. But... interrupt_main isn't documented to raise a SIGINT, it's documented to raise KeyboardInterrupt. These are very different, e.g. if the user has installed a custom handler or even set SIGINT to SIG_IGN or masked it. (In the later two cases, using pthread_kill to send a signal to the main thread *won't* interrupt any ongoing syscall.) This is *much* more difficult to make work correctly. And actually what IDLE wants is a fake control-C anyway! So I'd suggest either redefining the semantics of interrupt_main to be "acts as if SIGINT was received" or else abandoning interrupt_main to its slightly-buggy semantics and adding a new function that does raise(SIGINT) and switching IDLE to use this new function. And fix issue 21895 in either case. ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 12:55:45 2017 From: report at bugs.python.org (paul j3) Date: Tue, 28 Mar 2017 16:55:45 +0000 Subject: [issue24251] Different behavior for argparse between 2.7.8 and 2.7.9 when adding the same arguments to the root and the sub commands In-Reply-To: <1432161314.48.0.939908418066.issue24251@psf.upfronthosting.co.za> Message-ID: <1490720145.97.0.42621719331.issue24251@psf.upfronthosting.co.za> Changes by paul j3 : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 13:06:21 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 28 Mar 2017 17:06:21 +0000 Subject: [issue29926] time.sleep ignores _thread.interrupt_main() In-Reply-To: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> Message-ID: <1490720781.89.0.956160551595.issue29926@psf.upfronthosting.co.za> Nathaniel Smith added the comment: (oh, in case it wasn't obvious: the advantage of raise() over kill() and pthread_kill() is that raise() works everywhere, including Windows, so it would avoid platform specific logic. Or if you don't like raise() for some reason then you can get the same effect by doing handler = PyOS_getsig(SIGINT); if (handler) handler(SIGINT); ) (Also, this is all assuming the python 3 logic on Windows. On Windows versions of python 2 I can't see any way to make time.sleep interruptible without significant rewriting. The problem is that on py2 the special Event used to signal the arrival of a control-C is a private variable that gets hooked up directly to Windows's low-level control-C logic, and there's effectively no way to get at it from outside. You might think GenerateConsoleCtrlEvent would help, but it is broken in too many ways for me to fit in this text box.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 13:06:49 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 28 Mar 2017 17:06:49 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1490720809.47.0.990785865482.issue13349@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Yes, that does look like too much. My rationale for adding quotes around the value was in order to make it more clear in cases where the repr exceeds 100 characters. Instead of: Traceback (most recent call last): File "", line 1, in ValueError: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 2 not in list Have it clearly distinguished by using "": Traceback (most recent call last): File "", line 1, in ValueError: "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 2" not in list I'm not sure if there's a trivial way to not display so many quotes in the case you supplied, you're better suited to decide if this can be done somehow. ---------- versions: +Python 3.7 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 13:09:08 2017 From: report at bugs.python.org (paul j3) Date: Tue, 28 Mar 2017 17:09:08 +0000 Subject: [issue23487] argparse: add_subparsers 'action' broken In-Reply-To: <1424417043.22.0.71313795028.issue23487@psf.upfronthosting.co.za> Message-ID: <1490720948.42.0.29445693249.issue23487@psf.upfronthosting.co.za> paul j3 added the comment: I'm going to close this. At most it calls for a documentation change. But saying something like It must be compatible with argparse._SubParsersAction. will just confuse the average user. Any customization of this action class is an advanced topic, that requires familiarity with the code, not just the documentation. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 13:14:09 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 28 Mar 2017 17:14:09 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1490721248.99.0.0582480911926.issue13349@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Could use `%.100S` instead of `%.100R` but I'm not sure of the downsides that might entail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 13:18:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 Mar 2017 17:18:44 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1490721524.98.0.951858331141.issue13349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Error messages should use repr(). For example str() of bytes object emits a warning or error. See issue26090 for the issue with truncated reprs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 13:20:16 2017 From: report at bugs.python.org (Jeffrey Armstrong) Date: Tue, 28 Mar 2017 17:20:16 +0000 Subject: [issue29936] Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x In-Reply-To: <1490718364.46.0.906285030804.issue29936@psf.upfronthosting.co.za> Message-ID: <1490721616.55.0.611274715108.issue29936@psf.upfronthosting.co.za> Changes by Jeffrey Armstrong : ---------- nosy: -Jeffrey.Armstrong _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 13:39:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 28 Mar 2017 17:39:10 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490722750.87.0.477933485086.issue29935@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 13:39:15 2017 From: report at bugs.python.org (Eryk Sun) Date: Tue, 28 Mar 2017 17:39:15 +0000 Subject: [issue29926] time.sleep ignores _thread.interrupt_main() In-Reply-To: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> Message-ID: <1490722755.94.0.685911091033.issue29926@psf.upfronthosting.co.za> Eryk Sun added the comment: Nathaniel's suggestion to update the implementation to work with raise(SIGINT) sounds like a good idea. Fpr Windows, GenerateConsoleCtrlEvent is definitely a non-starter. PyErr_SetInterrupt shouldn't depend on having an attached console. IDLE generally runs without one. Even if the process has a console, there's no way to limit GenerateConsoleCtrlEvent to just the current process. It works with process groups, like POSIX killpg(). Typically a process is created in the session's Winlogon process group unless a new group was created by calling CreateProcess with the flag CREATE_NEW_PROCESS_GROUP. If you call GenerateConsoleCtrlEvent on a process ID that's not a group ID, the console behaves as if you passed group ID 0, which broadcasts to all processes attached to the console. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 13:43:18 2017 From: report at bugs.python.org (Mark Nolan) Date: Tue, 28 Mar 2017 17:43:18 +0000 Subject: [issue29937] argparse mutex group should allow mandatory parameters Message-ID: <1490722998.75.0.478597210318.issue29937@psf.upfronthosting.co.za> New submission from Mark Nolan: I see elsewhere, and from use, that a mutex group will not support mandatory positional parameters. TBH, I don't understand why this should be any different from any other option, but if it must, then I think it should follow the 'required' parameter of the mutex. So, it should be possible to have a mutex group where one option must be chosen and that option must have positional parameters. (My first post here. Not sure of any other way to discuss with the argparse development group. Point me somewhere else if appropriate). ---------- components: Library (Lib) messages: 290750 nosy: Mark Nolan priority: normal severity: normal status: open title: argparse mutex group should allow mandatory parameters type: enhancement versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 14:24:40 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 28 Mar 2017 18:24:40 +0000 Subject: [issue29926] time.sleep ignores _thread.interrupt_main() In-Reply-To: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> Message-ID: <1490725480.17.0.0354723643684.issue29926@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Even is IDLE is started from a console, the user execution process is not attached to one. What I want, from an IDLE perspective, is for ^C in IDLE's shell to work as well as it does in a terminal. That means either fixing _thread.interrupt_main to always do what it usually does (from a user perspective), or to be given something else to use in .interrupt_the_server() that does so. The current workaround for stopping runaway code in interactive mode, restarting the shell with cntl-F6 or the menu entry Shell => Restart Shell, is a) obscure and not known to most beginners, and b) does too much in that it throws away the workspace. It is much like closing a terminal Window with [X], and restarting the terminal and python, instead of using ^C. Viktor, I am nosying you because of your posts to #21895. Do you have any comments on this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 14:31:20 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 28 Mar 2017 18:31:20 +0000 Subject: [issue29931] ipaddress.ip_interface __lt__ check seems to be broken In-Reply-To: <1490697440.73.0.104969617886.issue29931@psf.upfronthosting.co.za> Message-ID: <1490725880.32.0.936982887854.issue29931@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +778 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 15:32:38 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 28 Mar 2017 19:32:38 +0000 Subject: [issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support In-Reply-To: <1385449388.05.0.507393772442.issue19791@psf.upfronthosting.co.za> Message-ID: <1490729558.61.0.425101361229.issue19791@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset ec1f5df46ed37aa3e839d20298c4b361a9a74bc4 by Brett Cannon (Vajrasky Kok) in branch 'master': bpo-19791: Use functions from test support to check the symlink support. (GH-822) https://github.com/python/cpython/commit/ec1f5df46ed37aa3e839d20298c4b361a9a74bc4 ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 15:33:28 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 28 Mar 2017 19:33:28 +0000 Subject: [issue19791] test_pathlib should use can_symlink or skip_unless_symlink from test.support In-Reply-To: <1385449388.05.0.507393772442.issue19791@psf.upfronthosting.co.za> Message-ID: <1490729608.28.0.271311745568.issue19791@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 15:48:58 2017 From: report at bugs.python.org (Matthew McCormick) Date: Tue, 28 Mar 2017 19:48:58 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1490730538.0.0.010405488735.issue11566@psf.upfronthosting.co.za> Changes by Matthew McCormick : ---------- pull_requests: +780 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 15:49:47 2017 From: report at bugs.python.org (Matthew McCormick) Date: Tue, 28 Mar 2017 19:49:47 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1490730587.19.0.339077818105.issue11566@psf.upfronthosting.co.za> Matthew McCormick added the comment: I have created a pull request for this issue, https://github.com/python/cpython/pull/880 that addresses extension builds for both MinGWPy and the Microsoft Visual C++ Compiler for Python 2.7. ---------- nosy: +thewtex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 15:50:37 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 28 Mar 2017 19:50:37 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490730637.91.0.596064547763.issue29928@psf.upfronthosting.co.za> Brett Cannon added the comment: I think we're getting bogged down in a larger scope than this issue is about. All we should be discussing in this issue is whether adding an entry in the glossary for "f-string" as it's already being used in the community is bad (which I don't think it is since it's seeing use "in the wild"). No one is suggesting we change all the documentation to start using the shorthand/slang term, nor to introduce entries for other types of string literals where the community has not started using such terms (e.g. r-strings for raw strings). Heck, the docs already use "f-string" internally as a link target, i.e. https://docs.python.org/3/reference/lexical_analysis.html#f-strings (notice the intra-page link target). IOW this is just making it easier for someone who comes across the term "f-string" to know what it means when they see it on e.g. Twitter, not trying to come up with a more accurate shorthand. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 16:12:46 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 28 Mar 2017 20:12:46 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490731966.08.0.552105344112.issue29928@psf.upfronthosting.co.za> R. David Murray added the comment: Agreed with Brett. What I was trying to say was that we aren't going to get people to change to a different term, nor are the other 'x-string' abbreviations interesting, so we should document just f-string. But I wasn't exactly clear that that was my point :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 17:05:05 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 28 Mar 2017 21:05:05 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490735105.62.0.234946452439.issue29928@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: I was probably misunderstood, too, in hindsight, it's my fault for not being more clear :-). In my first sentence I was merely pointing out the oddity of -string not being a very popular term until f-string came along. As for my second sentence (adding the other prefixed strings to the glossary) I was thinking of using the names people currently use. Entries for (byte|raw|unicode)-strings, seeing as they don't already exist, might be a good addition now that f-strings are up for inclusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 17:28:39 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 28 Mar 2017 21:28:39 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490736519.6.0.966362505886.issue29928@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Since this ticket is about adding f-strings to the Glossary, let's keep this as discussions about the inclusion of f-strings in the Glossary. If others want to add (byte|raw|unicode)-strings into the Glossary, they can open another ticket. Thanks :) P.S: I like David's quote "..f-string. It's a term of art" ---------- assignee: docs at python -> Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 17:32:20 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Tue, 28 Mar 2017 21:32:20 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490736740.24.0.471876632724.issue29928@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: Completely agree, Mariatta. I just wanted to clarify my initial position :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 18:58:11 2017 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Cardona?=) Date: Tue, 28 Mar 2017 22:58:11 +0000 Subject: [issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing In-Reply-To: <1490694354.71.0.0417616939951.issue29930@psf.upfronthosting.co.za> Message-ID: <1490741891.59.0.644682812965.issue29930@psf.upfronthosting.co.za> R?mi Cardona added the comment: Got hit by this too, maaaaany times as I'm working with 3G devices (slow write speeds). As for "drain()", I'd say it should work like a fence/barrier: to let you know that the bytes in the buffer up to when the call was issued have been successfully written on the socket. I'll see what I can cook up. Cheers ---------- nosy: +RemiCardona _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 19:03:37 2017 From: report at bugs.python.org (Eryk Sun) Date: Tue, 28 Mar 2017 23:03:37 +0000 Subject: [issue29926] time.sleep ignores _thread.interrupt_main() In-Reply-To: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> Message-ID: <1490742217.43.0.26850263207.issue29926@psf.upfronthosting.co.za> Eryk Sun added the comment: > Even is IDLE is started from a console, the user execution process > is not attached to one. Actually, the execution process is attached to a console, but it doesn't use it for sys.std*. Try open('con', 'w').write('spam\n') > It is much like closing a terminal Window with [X], and restarting > the terminal and python, instead of using ^C. There's no default handler for SIGBREAK, so when working in the console it's typically better to use Ctrl+Break to kill Python. This preserves the console's arrow-key & F7 input history and scrollback buffer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 20:56:08 2017 From: report at bugs.python.org (SLAPaper) Date: Wed, 29 Mar 2017 00:56:08 +0000 Subject: [issue29938] subprocess.run calling bash on windows10 cause 0x80070057 error when capture stdout with PIPE Message-ID: <1490748967.96.0.600752277215.issue29938@psf.upfronthosting.co.za> New submission from SLAPaper: print(subprocess.run("bash -c ls", shell=True, stdout=subprocess.PIPE, encoding='utf_16_le').stdout) # ??: 0x80070057 # error: 0x80070057 And the returncode is 4294967295. OS: Simp-Chinese Win10; Bash on Windows(Ubuntu 14.04 LTS). Python 3.5 and Python 3.6 produce the same issue. While not capture stdout, the command works just fine and output the result onto screen. ---------- components: Windows messages: 290762 nosy: SLAPaper, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: subprocess.run calling bash on windows10 cause 0x80070057 error when capture stdout with PIPE type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 21:20:11 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Wed, 29 Mar 2017 01:20:11 +0000 Subject: [issue19225] lack of PyExc_BufferError doc In-Reply-To: <1381485777.95.0.364414099437.issue19225@psf.upfronthosting.co.za> Message-ID: <1490750411.52.0.0381876675142.issue19225@psf.upfronthosting.co.za> Kinebuchi Tomohiko added the comment: I will create a pull request based on the patch created by beng94. In addition, I will have its contents up-to-date. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 21:26:19 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Wed, 29 Mar 2017 01:26:19 +0000 Subject: [issue19225] lack of PyExc_BufferError doc In-Reply-To: <1381485777.95.0.364414099437.issue19225@psf.upfronthosting.co.za> Message-ID: <1490750779.79.0.0984590173044.issue19225@psf.upfronthosting.co.za> Changes by Kinebuchi Tomohiko : ---------- pull_requests: +783 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Mar 28 23:58:57 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 29 Mar 2017 03:58:57 +0000 Subject: [issue28699] Imap from ThreadPool behaves unexpectedly In-Reply-To: <1479234139.82.0.483433491582.issue28699@psf.upfronthosting.co.za> Message-ID: <1490759937.07.0.621998537502.issue28699@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 794623bdb232eafd8925f76470209afcdcbcdcd2 by Xiang Zhang in branch 'master': bpo-28699: fix abnormal behaviour of pools in multiprocessing.pool (GH-693) https://github.com/python/cpython/commit/794623bdb232eafd8925f76470209afcdcbcdcd2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 00:05:16 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 29 Mar 2017 04:05:16 +0000 Subject: [issue28699] Imap from ThreadPool behaves unexpectedly In-Reply-To: <1479234139.82.0.483433491582.issue28699@psf.upfronthosting.co.za> Message-ID: <1490760316.67.0.586431402485.issue28699@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +784 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 00:10:48 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 29 Mar 2017 04:10:48 +0000 Subject: [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1490760648.53.0.661802375957.issue16011@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +785 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 00:19:40 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 29 Mar 2017 04:19:40 +0000 Subject: [issue28699] Imap from ThreadPool behaves unexpectedly In-Reply-To: <1479234139.82.0.483433491582.issue28699@psf.upfronthosting.co.za> Message-ID: <1490761180.18.0.881173591938.issue28699@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- pull_requests: +786 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 00:50:30 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 29 Mar 2017 04:50:30 +0000 Subject: [issue28699] Imap from ThreadPool behaves unexpectedly In-Reply-To: <1479234139.82.0.483433491582.issue28699@psf.upfronthosting.co.za> Message-ID: <1490763030.4.0.450965306446.issue28699@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 346dcd65e6b832a35b4cfc15b7309b51a38e9ca2 by Xiang Zhang in branch '3.6': bpo-28699: fix abnormal behaviour of pools in multiprocessing.pool (GH-882) https://github.com/python/cpython/commit/346dcd65e6b832a35b4cfc15b7309b51a38e9ca2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 00:51:31 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 29 Mar 2017 04:51:31 +0000 Subject: [issue28699] Imap from ThreadPool behaves unexpectedly In-Reply-To: <1479234139.82.0.483433491582.issue28699@psf.upfronthosting.co.za> Message-ID: <1490763091.38.0.101619682106.issue28699@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 9f8e0904580cae3b99f8d343569b76e1be7e6092 by Xiang Zhang in branch '3.5': bpo-28699: fix abnormal behaviour of pools in multiprocessing.pool (GH-884) https://github.com/python/cpython/commit/9f8e0904580cae3b99f8d343569b76e1be7e6092 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 00:55:02 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 29 Mar 2017 04:55:02 +0000 Subject: [issue28699] Imap from ThreadPool behaves unexpectedly In-Reply-To: <1479234139.82.0.483433491582.issue28699@psf.upfronthosting.co.za> Message-ID: <1490763302.2.0.78810750575.issue28699@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 00:58:03 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 29 Mar 2017 04:58:03 +0000 Subject: [issue29936] Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x In-Reply-To: <1490718364.46.0.906285030804.issue29936@psf.upfronthosting.co.za> Message-ID: <1490763483.45.0.68415871148.issue29936@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 83371f4f7f70406ea5d08c5fa8dbdbbcc0355ee1 by Benjamin Peterson (Niklas Fiekas) in branch 'master': bpo-29936: fix typo __GNU*C*_MINOR__ (#878) https://github.com/python/cpython/commit/83371f4f7f70406ea5d08c5fa8dbdbbcc0355ee1 ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 00:58:52 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 29 Mar 2017 04:58:52 +0000 Subject: [issue29936] Typo in __GNU*C*_MINOR__ guard affecting gcc 3.x In-Reply-To: <1490718364.46.0.906285030804.issue29936@psf.upfronthosting.co.za> Message-ID: <1490763532.81.0.343380957675.issue29936@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks. We should probably just unsupport gcc 3.x. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 01:28:18 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 29 Mar 2017 05:28:18 +0000 Subject: [issue29927] Unnecessary code in the c-api/exceptions.c In-Reply-To: <1490667780.76.0.56540941039.issue29927@psf.upfronthosting.co.za> Message-ID: <1490765298.12.0.171143731138.issue29927@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset c431854a0963d4ec2875efab2d2425a738895280 by Xiang Zhang (Louie Lu) in branch 'master': bpo-29927: Remove duplicate BufferError init and unnecessary semicolons (GH-866) https://github.com/python/cpython/commit/c431854a0963d4ec2875efab2d2425a738895280 ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 01:29:52 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 29 Mar 2017 05:29:52 +0000 Subject: [issue29927] Unnecessary code in the c-api/exceptions.c In-Reply-To: <1490667780.76.0.56540941039.issue29927@psf.upfronthosting.co.za> Message-ID: <1490765392.0.0.159000381052.issue29927@psf.upfronthosting.co.za> Xiang Zhang added the comment: Since the unnecessary codes have no semantic effect, I think they only need to go in 3.7. Thanks for your report and patch! ---------- resolution: -> fixed stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 01:31:10 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 29 Mar 2017 05:31:10 +0000 Subject: [issue29927] Unnecessary code in the c-api/exceptions.c In-Reply-To: <1490667780.76.0.56540941039.issue29927@psf.upfronthosting.co.za> Message-ID: <1490765470.73.0.777915882469.issue29927@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 01:31:34 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 29 Mar 2017 05:31:34 +0000 Subject: [issue29927] Unnecessary code in the c-api/exceptions.c In-Reply-To: <1490667780.76.0.56540941039.issue29927@psf.upfronthosting.co.za> Message-ID: <1490765494.61.0.131079981944.issue29927@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 02:44:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 29 Mar 2017 06:44:44 +0000 Subject: [issue29939] Compiler warning in _ctypes_test.c Message-ID: <1490769884.15.0.305944990861.issue29939@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Compiler warning was introduced by issue29565. /home/serhiy/py/cpython/Modules/_ctypes/_ctypes_test.c: In function ?_testfunc_large_struct_update_value?: /home/serhiy/py/cpython/Modules/_ctypes/_ctypes_test.c:53:42: warning: parameter ?in? set but not used [-Wunused-but-set-parameter] _testfunc_large_struct_update_value(Test in) ^ ---------- components: ctypes messages: 290771 nosy: serhiy.storchaka, vinay.sajip priority: normal severity: normal stage: needs patch status: open title: Compiler warning in _ctypes_test.c type: compile error versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 03:11:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 29 Mar 2017 07:11:23 +0000 Subject: [issue24821] The optimization of string search can cause pessimization In-Reply-To: <1438927886.02.0.407236930114.issue24821@psf.upfronthosting.co.za> Message-ID: <1490771483.63.0.799608509345.issue24821@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ukrainian "?" is not the only character suffered from this issue. I suppose much CJK characters are suffered too. The problem is occurred when the lower byte of searched character matches the upper byte of most characters in the text. For example, searching "?" (U+4e4e) in the sequence of characters U+4eXX (but not containing U+4e4e and U+4e4f): $ ./python -m perf timeit -s 's = "???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????????????????? ???????????????????????????????????"*100' -- 's.find("?")' Unpatched: Median +- std dev: 761 us +- 108 us Patched: Median +- std dev: 117 us +- 9 us For comparison, searching "?" (U+4e4f) in the same sequence: $ ./python -m perf timeit -s 's = "???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????????????????????????????????????????????????????????????????????? ???????????????????????????????????"*100' -- 's.find("?")' Unpatched: Median +- std dev: 12.8 us +- 1.4 us Patched: Median +- std dev: 12.6 us +- 1.7 us Sorry, I don't know Chinese or Japanese and can't provide more realistic examples. ---------- nosy: +inada.naoki, xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 03:41:15 2017 From: report at bugs.python.org (Aymeric Augustin) Date: Wed, 29 Mar 2017 07:41:15 +0000 Subject: [issue29930] Waiting for asyncio.StreamWriter.drain() twice in parallel raises an AssertionError when the transport stopped writing In-Reply-To: <1490694354.71.0.0417616939951.issue29930@psf.upfronthosting.co.za> Message-ID: <1490773275.57.0.645485268998.issue29930@psf.upfronthosting.co.za> Aymeric Augustin added the comment: drain() returns when the write buffer reaches the low water mark, not when it's empty, so you don't have a guarantee that your bytes were written to the socket. https://github.com/python/cpython/blob/6f0eb93183519024cb360162bdd81b9faec97ba6/Lib/asyncio/protocols.py#L36-L40 The low water mark defaults to 64kB and the high water mark to 256kB. https://github.com/python/cpython/blob/6f0eb93183519024cb360162bdd81b9faec97ba6/Lib/asyncio/transports.py#L290 With websockets, the recommended way to ensure your message was received is: yield from ws.send(...) yield from ws.ping() Given that TCP guarantees ordering, the ping response can only be received after the previous message was fully sent and received. Of course the ping can fail even though the message was received, that's the classical at-most-once vs. at-least-once question. The technique you suggest requires setting the low and high water marks to 0. I'm not sure this is the best way to achieve your goals, since you still don't control the OS buffers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 03:52:03 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 29 Mar 2017 07:52:03 +0000 Subject: [issue24821] The optimization of string search can cause pessimization In-Reply-To: <1438927886.02.0.407236930114.issue24821@psf.upfronthosting.co.za> Message-ID: <1490773923.08.0.99706830061.issue24821@psf.upfronthosting.co.za> Louie Lu added the comment: I can now only test on Python3.6, providing much meaningful sentence, still trying to use perf on cpython master branch. --------------------------------------------------- $ python -m perf timeit -s 's="???????, ??????, ???????, ????"*1000' -- 's.find("?")' Median +- std dev: 228 ns +- 7 ns $ python -m perf timeit -s 's="???????, ??????, ???????, ????"*1000' -- 's.find("?")' Median +- std dev: 143 ns +- 3 ns --------------------------------------------------- $ python -m perf timeit -s 's="???????, ??????, ???????, ???"*1000' -- 's.find("?")' ^^ (missing "?") Median +- std dev: 100 us +- 3 us $ python -m perf timeit -s 's="???????, ?????, ???????, ????"*1000' -- 's.find("?")' ^^ (missing "?") Median +- std dev: 1.67 us +- 0.05 us ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 04:19:53 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 29 Mar 2017 08:19:53 +0000 Subject: [issue24821] The optimization of string search can cause pessimization In-Reply-To: <1438927886.02.0.407236930114.issue24821@psf.upfronthosting.co.za> Message-ID: <1490775593.21.0.4606057625.issue24821@psf.upfronthosting.co.za> Xiang Zhang added the comment: I can't give a "realistic" example. A more meaningful example may be: '?', '\u3002', the Chinese period which used in almost every paragraph, '?', '\u5730', which is a common used word. ./python3 -m perf timeit -s 's = "????????"*1000' 's.find("?")' Mean +- std dev: 6.65 us +- 0.27 us Mean +- std dev: 4.08 us +- 0.22 us It works! :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 04:31:18 2017 From: report at bugs.python.org (Ma Lin) Date: Wed, 29 Mar 2017 08:31:18 +0000 Subject: [issue24821] The optimization of string search can cause pessimization In-Reply-To: <1438927886.02.0.407236930114.issue24821@psf.upfronthosting.co.za> Message-ID: <1490776278.63.0.334471332511.issue24821@psf.upfronthosting.co.za> Changes by Ma Lin : ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 04:43:18 2017 From: report at bugs.python.org (Frazer McLean) Date: Wed, 29 Mar 2017 08:43:18 +0000 Subject: [issue29922] error message when __aexit__ is not async In-Reply-To: <1490635462.94.0.877144122619.issue29922@psf.upfronthosting.co.za> Message-ID: <1490776998.97.0.829127178018.issue29922@psf.upfronthosting.co.za> Changes by Frazer McLean : ---------- nosy: +RazerM _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 04:45:06 2017 From: report at bugs.python.org (Frazer McLean) Date: Wed, 29 Mar 2017 08:45:06 +0000 Subject: [issue25538] Traceback from __exit__ method is misleading In-Reply-To: <1446505683.0.0.402181965789.issue25538@psf.upfronthosting.co.za> Message-ID: <1490777106.61.0.198168280372.issue25538@psf.upfronthosting.co.za> Changes by Frazer McLean : ---------- nosy: +RazerM _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 06:19:00 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 29 Mar 2017 10:19:00 +0000 Subject: [issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad In-Reply-To: <1476176180.11.0.398413685253.issue28415@psf.upfronthosting.co.za> Message-ID: <1490782740.44.0.845394510214.issue28415@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +787 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 06:20:21 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 29 Mar 2017 10:20:21 +0000 Subject: [issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad In-Reply-To: <1476176180.11.0.398413685253.issue28415@psf.upfronthosting.co.za> Message-ID: <1490782821.15.0.711079174905.issue28415@psf.upfronthosting.co.za> Louie Lu added the comment: Add a note block under Py*_FromFormat in unicode.rst and bytes.rst. Could Xiang or Terry help to review? Thanks. ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 06:40:07 2017 From: report at bugs.python.org (Louie Lu) Date: Wed, 29 Mar 2017 10:40:07 +0000 Subject: [issue26440] tarfile._FileInFile.seekable is broken in stream mode In-Reply-To: <1456418959.65.0.0948342534374.issue26440@psf.upfronthosting.co.za> Message-ID: <1490784007.97.0.0545852020797.issue26440@psf.upfronthosting.co.za> Louie Lu added the comment: Actually, _Stream does provide seek method, should the seekable just return True? ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 06:54:32 2017 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 29 Mar 2017 10:54:32 +0000 Subject: [issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad In-Reply-To: <1476176180.11.0.398413685253.issue28415@psf.upfronthosting.co.za> Message-ID: <1490784872.5.0.681378401611.issue28415@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 07:10:02 2017 From: report at bugs.python.org (zertrin) Date: Wed, 29 Mar 2017 11:10:02 +0000 Subject: [issue22240] argparse support for "python -m module" in help In-Reply-To: <1408564751.42.0.897410433728.issue22240@psf.upfronthosting.co.za> Message-ID: <1490785802.73.0.0496065464051.issue22240@psf.upfronthosting.co.za> Changes by zertrin : ---------- nosy: +zertrin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 07:25:20 2017 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 29 Mar 2017 11:25:20 +0000 Subject: [issue29939] Compiler warning in _ctypes_test.c In-Reply-To: <1490769884.15.0.305944990861.issue29939@psf.upfronthosting.co.za> Message-ID: <1490786720.51.0.777745449806.issue29939@psf.upfronthosting.co.za> Vinay Sajip added the comment: Yes, this is on my radar. I'm planning to make some changes to this file in response to bpo-22273, and will stick in a (void) in to get rid of the warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 08:22:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 29 Mar 2017 12:22:45 +0000 Subject: [issue24821] The optimization of string search can cause pessimization In-Reply-To: <1490776278.68.0.895897336341.issue24821@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Would it completely kill performances to remove the optimization? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 09:04:48 2017 From: report at bugs.python.org (pz) Date: Wed, 29 Mar 2017 13:04:48 +0000 Subject: [issue29880] python3.6 install readline ,and then cpython exit In-Reply-To: <1490196867.91.0.906821746268.issue29880@psf.upfronthosting.co.za> Message-ID: <1490792688.92.0.706885935995.issue29880@psf.upfronthosting.co.za> pz added the comment: I have unistall readline and install gnureadline,but cpyton also crashed # ./pip3 install gnureadline Collecting gnureadline Installing collected packages: gnureadline Running setup.py install for gnureadline ... done Successfully installed gnureadline-6.3.3 # ./python3 Python 3.6.1 (default, Mar 27 2017, 23:50:01) [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> *** glibc detected *** ./python3: free(): invalid pointer: 0x00007ffeee27e570 *** ======= Backtrace: ========= ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 09:32:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 29 Mar 2017 13:32:52 +0000 Subject: [issue24821] The optimization of string search can cause pessimization In-Reply-To: <1438927886.02.0.407236930114.issue24821@psf.upfronthosting.co.za> Message-ID: <1490794372.35.0.140395450638.issue24821@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for testing Louie. Thank you for your review and testing Xiang. > Would it completely kill performances to remove the optimization? Yes. The optimization is not used if the lowest byte is 0. You can try to search "\0" for getting the result without the optimization. On my netbook the optimization speeds up searching by 5.5 times. Search with optimization: $ ./python -m perf timeit -s 's = "?????"*10**5' -- 's.find("?")' Median +- std dev: 296 us +- 33 us Search without optimization: $ ./python -m perf timeit -s 's = "?????"*10**5' -- 's.find("\0")' Median +- std dev: 1.65 ms +- 0.10 ms Search an unlucky character (unpatched): $ ./python -m perf timeit -s 's = "?????"*10**5' -- 's.find("?")' Median +- std dev: 14.7 ms +- 1.8 ms Search an unlucky character (patched): $ ./python -m perf timeit -s 's = "?????"*10**5' -- 's.find("?")' Median +- std dev: 2.17 ms +- 0.24 ms ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 11:01:39 2017 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 29 Mar 2017 15:01:39 +0000 Subject: [issue22240] argparse support for "python -m module" in help In-Reply-To: <1408564751.42.0.897410433728.issue22240@psf.upfronthosting.co.za> Message-ID: <1490799699.44.0.175579401031.issue22240@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 11:41:05 2017 From: report at bugs.python.org (Samwyse) Date: Wed, 29 Mar 2017 15:41:05 +0000 Subject: [issue29940] Add follow_wrapped=True option to help() Message-ID: <1490802065.05.0.49346265762.issue29940@psf.upfronthosting.co.za> New submission from Samwyse: The help(obj) function uses the type of obj to create its result. This is less than helpful when requesting help on a wrapped object. Since 3.5, inspect.signature() and inspect.from_callable() have a follow_wrapped option to get around similar issues. Adding the option to help() would prevent surprising behavior while still allowing current behavior to be used when needed. See http://stackoverflow.com/a/17705456/603136 for more. ---------- components: Library (Lib) messages: 290782 nosy: samwyse priority: normal severity: normal status: open title: Add follow_wrapped=True option to help() type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 12:02:01 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 29 Mar 2017 16:02:01 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490803321.03.0.77655366884.issue29935@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The error message should be fixed and the API should be left alone. A *None* value doesn't do a good jog of communicating intent. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 12:41:48 2017 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 29 Mar 2017 16:41:48 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG Message-ID: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> New submission from Thomas Wouters: There is a bit of confusion in the CPython source between Py_DEBUG and (C) asserts. By default Python builds without Py_DEBUG and without asserts (definining NDEBUG to disable them). Turning on Py_DEBUG also enables asserts. However, it *is* possible to turn on asserts *without* turning on Py_DEBUG, and at Google we routinely build CPython that way. (Doing this with the regular configure/make process can be done by setting CFLAGS=-UNDEBUG when running configure.) This happens to highlight two different problems: - Code being defined in Py_DEBUG blocks but used in assertions: _PyDict_CheckConsistency() is defined in dictobject.c in an #ifdef Py_DEBUG, but then used in assert without a check for Py_DEBUG. This is a compile-time error. - Assertions checking for things that are outside of CPython's control, like whether an exception is set before calling something that might clobber it. Generally speaking assertions should be for internal invariants; things that should be a specific way, and it's an error in CPython itself when it's not (I think Tim Peters originally expressed this view of C asserts). For example, PyObject_Call() (and various other flavours of it) does 'assert(!PyErr_Occurred())', which is easily triggered and the cause of which is not always apparent. The second case is useful, mind you, as it exposes bugs in extension modules, but the way it does it is not very helpful (it displays no traceback), and if the intent is to only do this when Py_DEBUG is enabled it would be better to check for that. The attached PR fixes both issues. I think what our codebase does (enable assertions by default, without enabling Py_DEBUG) is useful, even when applied to CPython, and I would like CPython to keep working that way. However, if it's deemed more appropriate to make assertions only work in Py_DEBUG mode, that's fine too -- but please make it explicit, by making non-Py_DEBUG builds require NDEBUG. ---------- messages: 290784 nosy: Thomas Wouters, gregory.p.smith priority: normal pull_requests: 788 severity: normal status: open title: Confusion between asserts and Py_DEBUG type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 12:42:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 29 Mar 2017 16:42:58 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490805778.79.0.124714980225.issue29935@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +789 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 12:43:41 2017 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 29 Mar 2017 16:43:41 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490805821.12.0.539687479296.issue29941@psf.upfronthosting.co.za> Thomas Wouters added the comment: Ugh, I logged in with the wrong OpenID without noticing; that was supposed to be me ;-P ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 12:46:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 29 Mar 2017 16:46:00 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490805960.63.0.566906754612.issue29935@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Raymond. Proposed patch fixes error messages and doesn't change the public API. ---------- stage: -> patch review type: enhancement -> behavior versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 12:50:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 29 Mar 2017 16:50:59 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490806259.21.0.72218703239.issue29941@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +haypo, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 13:02:29 2017 From: report at bugs.python.org (SylvainDe) Date: Wed, 29 Mar 2017 17:02:29 +0000 Subject: [issue29932] Missing word ("be") in error message ("first argument must a type object") In-Reply-To: <1490704505.47.0.339319801351.issue29932@psf.upfronthosting.co.za> Message-ID: <1490806949.7.0.628262924562.issue29932@psf.upfronthosting.co.za> Changes by SylvainDe : ---------- pull_requests: +790 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 13:09:09 2017 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 29 Mar 2017 17:09:09 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. Message-ID: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> New submission from Thomas Wouters: itertools.chain.from_iterable (somewhat ironically) uses recursion to resolve the next iterator, which means it can run out of the C stack when there's a long run of empty iterables. This is most obvious when building with low optimisation modes, or with Py_DEBUG enabled: Python 3.7.0a0 (heads/master:c431854a09, Mar 29 2017, 10:03:50) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import itertools >>> next(itertools.chain.from_iterable(() for unused in range(10000000))) Segmentation fault (core dumped) ---------- messages: 290787 nosy: gregory.p.smith, twouters priority: normal pull_requests: 791 severity: normal status: open title: Stack overflow in itertools.chain.from_iterable. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 13:09:14 2017 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 29 Mar 2017 17:09:14 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490807354.28.0.595580834238.issue29942@psf.upfronthosting.co.za> Changes by Thomas Wouters : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 13:41:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 29 Mar 2017 17:41:59 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490809319.71.0.662773316581.issue29942@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +rhettinger stage: -> patch review versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 13:57:09 2017 From: report at bugs.python.org (George King) Date: Wed, 29 Mar 2017 17:57:09 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490810229.09.0.656915149232.issue29935@psf.upfronthosting.co.za> George King added the comment: I think it is a mistake not to support None values. Please consider: The existing message clearly suggests that the intent is to support the same set of values as the start/stop parameters of the slice type. str, bytes, and bytearray all support None for `index`, as well as `count`, `find`, `rfind`, and `rindex`. Not supporting None makes the type signature of list.index and tuple.index subtly different from those of str, bytes, and bytearray, when they could otherwise be interchangeable. It makes the type signature of index inconsistent across the types. Furthermore, it makes converting slice start/stop to these arguments a pain. Compare the following: seq.index(start=slice.start, end=slice.stop) # accepting None seq.index(start=(0 if slice.start is None else slice.start), end=(len(seq) if slice.stop is None else slice.stop)) # current behavior. I do not buy the argument that the latter communicates intent better, and it is adds bug-prone baggage to every call site. Similarly, being able to pass None for end/stop parameters is very convenient in the case of optional passthrough arguments, saving the programmer from this: def f(seq, end=None): i = seq.index(start=0, end=(len(seq) if end is None else end)) # current behavior. ... Note that for the programmer writing `f`, None (or some other distinct sentinel value) is a *requirement* for correctness, because end=len(seq) is incorrect. I would understand opposition to this on the basis of not changing existing behavior in any way, but "communicating intent" seems like a thin argument in comparison to the above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 14:09:24 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 29 Mar 2017 18:09:24 +0000 Subject: [issue29932] Missing word ("be") in error message ("first argument must a type object") In-Reply-To: <1490704505.47.0.339319801351.issue29932@psf.upfronthosting.co.za> Message-ID: <1490810964.64.0.174882295681.issue29932@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset a90e64b78d74b80a7cbcca2237280c724b99431b by Brett Cannon (Sylvain) in branch 'master': bpo-29932: Fix small error message typos in arraymodule.c (GH-888) https://github.com/python/cpython/commit/a90e64b78d74b80a7cbcca2237280c724b99431b ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 14:09:44 2017 From: report at bugs.python.org (Brett Cannon) Date: Wed, 29 Mar 2017 18:09:44 +0000 Subject: [issue29932] Missing word ("be") in error message ("first argument must a type object") In-Reply-To: <1490704505.47.0.339319801351.issue29932@psf.upfronthosting.co.za> Message-ID: <1490810984.08.0.772184636356.issue29932@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 14:14:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 29 Mar 2017 18:14:17 +0000 Subject: [issue29880] python3.6 install readline ,and then cpython exit In-Reply-To: <1490196867.91.0.906821746268.issue29880@psf.upfronthosting.co.za> Message-ID: <1490811257.78.0.694776613236.issue29880@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 16:45:56 2017 From: report at bugs.python.org (Henry Borchers) Date: Wed, 29 Mar 2017 20:45:56 +0000 Subject: [issue15797] bdist_msi does not pass -install/remove flags to install_script In-Reply-To: <1346147472.01.0.0635028414042.issue15797@psf.upfronthosting.co.za> Message-ID: <1490820356.57.0.359085519056.issue15797@psf.upfronthosting.co.za> Henry Borchers added the comment: Any progress on this? It seems to still be an issue in Python 3.6. ---------- nosy: +loneraver versions: +Python 3.6 -Python 2.7, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 17:10:16 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 29 Mar 2017 21:10:16 +0000 Subject: [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1490821816.62.0.721328992278.issue16011@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset fd704a02ca8713b0dae644f7f182f3e3d1218dbf by Mariatta in branch '2.7': bpo-16011: clarify that 'in' always returns a boolean value (GH-152) (GH-883) https://github.com/python/cpython/commit/fd704a02ca8713b0dae644f7f182f3e3d1218dbf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 17:12:55 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 29 Mar 2017 21:12:55 +0000 Subject: [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1490821975.77.0.523240357075.issue16011@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks everyone :) Patch has been merged and backported to 3.6, 3.5, and 2.7. ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 17:14:09 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 29 Mar 2017 21:14:09 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490822049.08.0.19373492614.issue29677@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 85deefcf61d3cc192846f41a4ccc6df17da60c98 by Mariatta (csabella) in branch 'master': bpo-29677: DOC: clarify documentation for `round` (GH-877) https://github.com/python/cpython/commit/85deefcf61d3cc192846f41a4ccc6df17da60c98 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 17:15:20 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 29 Mar 2017 21:15:20 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490822120.07.0.83541674437.issue29677@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: needs patch -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 17:55:45 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 29 Mar 2017 21:55:45 +0000 Subject: [issue15797] bdist_msi does not pass -install/remove flags to install_script In-Reply-To: <1346147472.01.0.0635028414042.issue15797@psf.upfronthosting.co.za> Message-ID: <1490824545.4.0.600016218216.issue15797@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 18:29:32 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 29 Mar 2017 22:29:32 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490826572.84.0.414520073485.issue29677@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Mariatta, Thank you so much for your support and encouragement while I worked on my first PR. You've made this an awesome experience! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 18:40:53 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 29 Mar 2017 22:40:53 +0000 Subject: [issue29938] subprocess.run calling bash on windows10 cause 0x80070057 error when capture stdout with PIPE In-Reply-To: <1490748967.96.0.600752277215.issue29938@psf.upfronthosting.co.za> Message-ID: <1490827253.96.0.123318321985.issue29938@psf.upfronthosting.co.za> Eryk Sun added the comment: The initial release of WSL doesn't support passing non-console standard handles from Windows to Linux, or vice versa. It will work if you switch to a Windows Insider preview build. Otherwise you'll have to wait for the Windows 10 Creators Update. See the following video and blog post by Ben Hillis for a discussion of the architecture changes that were made to support this feature: https://blogs.msdn.microsoft.com/wsl/2016/10/19/windows-and-ubuntu-interoperability ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 18:46:43 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 29 Mar 2017 22:46:43 +0000 Subject: [issue29938] subprocess.run calling bash on windows10 cause 0x80070057 error when capture stdout with PIPE In-Reply-To: <1490748967.96.0.600752277215.issue29938@psf.upfronthosting.co.za> Message-ID: <1490827603.63.0.426519182467.issue29938@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- resolution: not a bug -> third party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 19:36:28 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 29 Mar 2017 23:36:28 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches Message-ID: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> New submission from Nathaniel Smith: In the process of fixing issue 27867, a new function PySlice_AdjustIndices was added, and PySlice_GetIndicesEx was converted into a macro that calls this new function. The patch was backported to both the 3.5 and 3.6 branches, was released in 3.6.1, and is currently slated to be released as part of 3.5.4. Unfortunately, this breaks our normal ABI stability guarantees for micro releases: it means that if a C module that uses PySlice_GetIndicesEx is compiled against e.g. 3.6.1, then it cannot be imported on 3.6.0. This affects a number of high-profile packages (cffi, pandas, mpi4py, dnf, ...). The only workaround is that if you are distributing binary extension modules (e.g. wheels), then you need to be careful not to upgrade to 3.6.1. It's not possible for a wheel to declare that it requires 3.6.1-or-better, because CPython normally follows the rule that we don't make these kinds of changes. Oops. CC'ing Ned and Larry, because it's possible this should trigger a 3.6.2, and I think it's a blocker for 3.5.4. CC'ing Serhiy as the author of the original patch, since you probably have the best idea how this could be unwound with minimal breakage :-). python-dev discussion: https://mail.python.org/pipermail/python-dev/2017-March/147707.html Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=1435135 ---------- messages: 290796 nosy: larry, ned.deily, njs, serhiy.storchaka priority: normal severity: normal status: open title: PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 19:38:15 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 29 Mar 2017 23:38:15 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1490830695.29.0.629087919048.issue29943@psf.upfronthosting.co.za> Larry Hastings added the comment: Let's make it a release blocker for now. ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 19:56:32 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 29 Mar 2017 23:56:32 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490831792.24.0.390954342987.issue29917@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I am working on a pull request for this issue. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 20:14:01 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 Mar 2017 00:14:01 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490832841.35.0.325361902772.issue29917@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +792 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 20:14:02 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 Mar 2017 00:14:02 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490832842.7.0.0618589972684.issue29917@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +792, 793 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 20:27:52 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 30 Mar 2017 00:27:52 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490833672.5.0.549992995933.issue29917@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset c3c7ef088583cc12bd218138036d1edb6de9c63f by Senthil Kumaran (csabella) in branch 'master': bpo-29917: DOC: Remove link from PyMethodDef (#890) https://github.com/python/cpython/commit/c3c7ef088583cc12bd218138036d1edb6de9c63f ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 20:28:51 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 30 Mar 2017 00:28:51 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490833731.43.0.779593720966.issue29917@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- stage: needs patch -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 20:56:34 2017 From: report at bugs.python.org (svelankar) Date: Thu, 30 Mar 2017 00:56:34 +0000 Subject: [issue29692] contextlib.contextmanager may incorrectly unchain RuntimeError In-Reply-To: <1488449495.24.0.0941910154043.issue29692@psf.upfronthosting.co.za> Message-ID: <1490835394.7.0.89866607245.issue29692@psf.upfronthosting.co.za> Changes by svelankar : ---------- pull_requests: +794 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 21:16:21 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 30 Mar 2017 01:16:21 +0000 Subject: [issue15797] bdist_msi does not pass -install/remove flags to install_script In-Reply-To: <1346147472.01.0.0635028414042.issue15797@psf.upfronthosting.co.za> Message-ID: <1490836581.62.0.583472420017.issue15797@psf.upfronthosting.co.za> Steve Dower added the comment: Unless this is documented somewhere, it's a new feature in a deprecated module. You can easily produce a third-party distutils command that does this differently, but I see limited benefit in changing this command. I'd also need to dig deeper to learn how bdist_msi works to make sure the change is sound, which I'm not entirely convinced it is (MSI custom actions are very difficult to get right, and have a lot of strange quirks - the big concern here would be breaking a property reference by adding the option in the wrong column, instead of using a custom action to set the property that is referenced from the action that executes it). In short, non-trivial, rarely used, easily overrideable from the build scripts that need it. I'd recommend this for a third party module, but at this stage it should only be changed in the standard library if it doesn't match some documentation. ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 21:17:10 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 30 Mar 2017 01:17:10 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1490836630.68.0.983542322793.issue29943@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 21:26:02 2017 From: report at bugs.python.org (Kevin Christopher) Date: Thu, 30 Mar 2017 01:26:02 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1490837162.72.0.8859133816.issue9146@psf.upfronthosting.co.za> Kevin Christopher added the comment: I tripped over this exact issue a few months ago, while working on a FIPSified OpenSSL library (custom platform). Attached a different (more minimal) patch; this one focuses more narrowly on the exact failure mode. It's based on 'master' (~3.7), applies cleanly / tests_hashlib passes. My employer has been using this patch successfully (in a FIPS environment) for ~3 months now, and I'm looking to upstream. Earlier, dmalcolm identified that OpenSSL's EVP_DigestUpdate dereferences a NULL in FIPS mode on non-FIPS algorithms. OpenSSL is not quite that bad ... turns out, EVP_DigestInit returns an error if FIPS disallows an algorithm, and ignoring the error (which _hashopenssl.c currently does) results in later dereferencing NULL. It's straightforward to add the right error checks and convert them to Python exceptions, which seems the most Pythonic way to handle the error - and it also minimizes the FIPS-only codepaths. There's one catch, _hashopenssl.c likes to pre-construct several algorithms at module import and raising an exception during import leads hashlib.py to silently drop the exception (hashlib.py:158-161). So I made the pre-constructors lazy: the first use of any constructor will attempt to initialize it, and raise the exception on first use if FIPS mode makes it unusable. The reason for choosing this approach is Lib/hashlib.py and __get_openssl_constructor(), which already has logic to handle exactly this ValueError by falling back to __get_builtin_constructor() (and the less-optimized _md5/_sha1/_sha256 modules). In the context of issue9216 (a usedforsecurity flag which can be passed to OpenSSL to allow non-FIPS algorithms), this change has the net effect of silently falling back from OpenSSL's MD5 implementation to python's _md5 C code when in FIPS mode. That's not exactly the intent of FIPS mode (python's _md5 module is certainly not FIPS-compliant), but converting a crash to a catchable exception is a major improvement. I like the discussion in issue9216, and see this change as complementary: it avoids crashing and moves policy handling of how to handle FIPS mode _hashopenssl.c to hashlib.py, and my gut feeling is that policy logic is better placed in a .py library than in a .c library. The advantage of this patch is that the new exceptions are obviously correct regardless of FIPS considerations, and the lazy constructors maintain the spirit of amortizing EVP_DigestInit calls while also reporting any error at a more useful point. ---------- nosy: +kscguru status: pending -> open Added file: http://bugs.python.org/file46765/hashopenssl-fips-exceptions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 22:05:12 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 30 Mar 2017 02:05:12 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490839512.46.0.673688567563.issue29677@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +795 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 22:05:31 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 30 Mar 2017 02:05:31 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490839531.84.0.229161405057.issue29677@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +796 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 22:10:09 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 30 Mar 2017 02:10:09 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490839809.64.0.556665203609.issue29677@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 2609c9ee78c53d501914a5a90dbe094d9a8c3c97 by Mariatta in branch '3.6': bpo-29677: DOC: clarify documentation for `round` (GH-877) (GH-892) https://github.com/python/cpython/commit/2609c9ee78c53d501914a5a90dbe094d9a8c3c97 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 22:10:24 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 30 Mar 2017 02:10:24 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490839824.85.0.580831506487.issue29677@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset eef6e11f9883f54de491121b8c49fdadd3e3506d by Mariatta in branch '3.5': bpo-29677: DOC: clarify documentation for `round` (GH-877) (GH-893) https://github.com/python/cpython/commit/eef6e11f9883f54de491121b8c49fdadd3e3506d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 22:16:02 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 30 Mar 2017 02:16:02 +0000 Subject: [issue29677] clarify docs about 'round()' accepting a negative integer for ndigits In-Reply-To: <1488285024.25.0.0499728148151.issue29677@psf.upfronthosting.co.za> Message-ID: <1490840162.12.0.361565396319.issue29677@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Gerrit, Cheryl, thanks and congrats for your first contributions to CPython! They've been merged and backported to 3.5 and 3.6. So I'm closing this now. Thanks all :) ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Mar 29 22:21:47 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 30 Mar 2017 02:21:47 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1490840507.61.0.104184762948.issue9146@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I like your patch, raising an exception is indeed the right thing to do. i'll get this patch in. whether or not the built-in non-openssl based _md5 and _sha1 module exist in "fips" mode is a separate build time issue - lets keep this one just dealing with the always undesirable segfault. ---------- assignee: -> gregory.p.smith versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:09:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 05:09:17 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1490850557.38.0.546249132185.issue29943@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: My apologies for breaking the world. The workaround is to undefine PySlice_GetIndicesEx after #include "Python.h". #if PY_VERSION_HEX < 0x03070000 && defined(PySlice_GetIndicesEx) #undef PySlice_GetIndicesEx #endif But this restores the initial bug. Other obvious solution -- declare 3.6.0 broken and require upgrading to 3.6.1. For 3.5.4 we can disable defining the macro when Py_LIMITED_API is not defined. This will restore the initial bug in many extensions. And we need other way to detect if we compile the CPython core or standard extensions for fixing the bug in standard collections. Or expand all uses of PySlice_GetIndicesEx to PySlice_Unpack+PySlice_AdjustIndices (the patch can be generated automatically). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:13:19 2017 From: report at bugs.python.org (Julia Dolgova) Date: Thu, 30 Mar 2017 05:13:19 +0000 Subject: [issue29533] urllib2 works slowly with proxy on windows In-Reply-To: <1486802607.23.0.387912582288.issue29533@psf.upfronthosting.co.za> Message-ID: <1490850799.14.0.119716097174.issue29533@psf.upfronthosting.co.za> Julia Dolgova added the comment: May be I described the problem not clearly enough, because English is not my native language, so I try to explain once again. In Windows there is an option "Do not use proxy server for address beginning with". I call this option . This option is invented for Internet Explorer (IE) and is used by IE. It could be used by other applications and I think it's obvious that other applications must handle it same way as IE does. May be I'm wrong here, please dissuade me. The problem is that IE only compares the hostname received with items in this list. And urllib also makes the reverse lookup and the forward lookup of the hostname and compares the results of those lookups with items in this list. To reproduce that you need to: 1. Run a proxy on your Windows or use any other proxy, that outputs requests coming from clients. 2. On Windows in "Browser settings" (IE settings) turn on the option "use proxy", set up the IP of your proxy, set the list "Do not use proxy server for address beginning with" to '23.253.135.79' (without commas). (23.253.135.79 - is the result of 'nslookup python.org' at this time when I write this comment) 3. Make a request in IE to http://python.org/. Then analyze the output of your proxy. You will see that the request to python.org goes through proxy. 4. Make a request to http://python.org/ via urllib (run checklib-py3.py). Analyze the output of your proxy. You will see that the request to python.org bypasses proxy. Be careful: there might be redirections when you make a request to http://python.org/. If you see 'http://www.python.org/' in proxy output and don't see 'http://python.org/' it means that request to 'python.org' bypasses proxy. This is the behavioral part of the problem which is attended by the performance decreasing, because the reverse lookup on some dns servers for some hostnames works slowly (up to 10 secs sometimes). May be the solution in my PR is not smart enough. But how can I make this issue go forward? ---------- Added file: http://bugs.python.org/file46766/checklib-py3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:20:12 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 30 Mar 2017 05:20:12 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490851212.39.0.436264293044.issue29917@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- pull_requests: +797 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:20:40 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 30 Mar 2017 05:20:40 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490851240.77.0.242528729928.issue29917@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- pull_requests: +798 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:21:41 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 30 Mar 2017 05:21:41 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490851301.47.0.190606794.issue29917@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- pull_requests: +799 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:26:31 2017 From: report at bugs.python.org (Tim Peters) Date: Thu, 30 Mar 2017 05:26:31 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490851591.55.0.193286092508.issue29941@psf.upfronthosting.co.za> Tim Peters added the comment: I think we should certainly support asserts regardless of whether Py_DEBUG is in force (although Py_DEBUG should imply asserts run too). And I wish you had stuck to just that much ;-) The argument against, e.g., 'assert(!PyErr_Occurred())', seems exceedingly weak. An `assert()` is to catch things that are never supposed to happen. It's an error in the implementation if such a thing ever does happen. But whether that error is in the Pytnon core or an external C extension is a distinction that only matters to assigning blame - it's "an error" all the same. It's nothing but good to catch errors ASAP. Where I draw a hard distinction between assertions and Py_DEBUG is along the "expensive?" axis. The more assertions the merrier, but they better be cheap (and `PyErr_Occurred()` is pretty cheap). Py_DEBUG does all sorts of stuff that's expensive and intrusive - that's for heavy duty verification. So, to me, 'assert(!PyErr_Occurred())' is fine - it's cheap and catches an error at a point where catching it is possible. Finding the true cause for why the error is set may be arbitrarily more expensive, so _that_ code belongs under Py_DEBUG. Except there is no general way to do that, so no such code exists ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:29:02 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 30 Mar 2017 05:29:02 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490851742.87.0.336283460485.issue29917@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset da6ad2f780d187fbfdea330d1037766ae7bdb778 by Senthil Kumaran in branch '3.6': bpo-29917: DOC: Remove link from PyMethodDef (#890) (#894) https://github.com/python/cpython/commit/da6ad2f780d187fbfdea330d1037766ae7bdb778 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:29:08 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 30 Mar 2017 05:29:08 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490851748.75.0.665138927496.issue29917@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset d1dbbaab01354f01faa696aff1280db3b349e354 by Senthil Kumaran in branch '3.5': bpo-29917: DOC: Remove link from PyMethodDef (#890) (#895) https://github.com/python/cpython/commit/d1dbbaab01354f01faa696aff1280db3b349e354 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:29:14 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 30 Mar 2017 05:29:14 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490851754.64.0.743330371558.issue29917@psf.upfronthosting.co.za> Senthil Kumaran added the comment: New changeset 3ceca68741f8a2d3a4436b6d54eae76aa5bcc4c5 by Senthil Kumaran in branch '2.7': bpo-29917: DOC: Remove link from PyMethodDef (#890) (#896) https://github.com/python/cpython/commit/3ceca68741f8a2d3a4436b6d54eae76aa5bcc4c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:30:26 2017 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 30 Mar 2017 05:30:26 +0000 Subject: [issue29917] Wrong link target in PyMethodDef documentation In-Reply-To: <1490610672.62.0.617621215351.issue29917@psf.upfronthosting.co.za> Message-ID: <1490851826.33.0.427360904584.issue29917@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:39:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 05:39:10 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490852350.01.0.850148313834.issue29941@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps it would be better to raise SystemError for errors in user extensions and left assert() only for checking invariants that can't be broken by user code. But checking the condition takes time, assert() is cheaper. Perhaps it would be better to replace some of asserts in non-critical code with runtime checks and PyErr_BadArgument()/PyErr_BadInternalCall(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:48:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 05:48:15 +0000 Subject: [issue29692] contextlib.contextmanager may incorrectly unchain RuntimeError In-Reply-To: <1488449495.24.0.0941910154043.issue29692@psf.upfronthosting.co.za> Message-ID: <1490852895.58.0.905124498354.issue29692@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The __exit__() method doesn't conform PEP 8. PEP 8: """Be consistent in return statements. Either all return statements in a function should return an expression, or none of them should. If any return statement returns an expression, any return statements where no value is returned should explicitly state this as return None , and an explicit return statement should be present at the end of the function (if reachable).""" The __exit__() method has explicit "return False", bare "return", and implicit "return" at the end of the method. Together with different styles in different "except" clauses this makes it slightly hard to read. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:53:52 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 30 Mar 2017 05:53:52 +0000 Subject: [issue22392] Clarify documentation of __getinitargs__ In-Reply-To: <1410461552.96.0.589396040073.issue22392@psf.upfronthosting.co.za> Message-ID: <1490853232.14.0.76238179203.issue22392@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +800 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:55:45 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 30 Mar 2017 05:55:45 +0000 Subject: [issue22392] Clarify documentation of __getinitargs__ In-Reply-To: <1410461552.96.0.589396040073.issue22392@psf.upfronthosting.co.za> Message-ID: <1490853345.35.0.21817853675.issue22392@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +801 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:57:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 05:57:10 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx In-Reply-To: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> Message-ID: <1490853430.16.0.737799285396.issue27867@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue is left open because it needs to add a porting guide in What's New. See also a problem with breaking ABI in issue29943. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:59:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 05:59:17 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1490853557.85.0.790540329727.issue29943@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 2.7 is affected too. Nathaniel, could you add references to this issue and to original issue27867 on the Fedora bug tracker? ---------- nosy: +benjamin.peterson versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 01:59:59 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 30 Mar 2017 05:59:59 +0000 Subject: [issue29887] test_normalization doesn't work In-Reply-To: <1490288230.58.0.523545383484.issue29887@psf.upfronthosting.co.za> Message-ID: <1490853599.02.0.561362486827.issue29887@psf.upfronthosting.co.za> Benjamin Peterson added the comment: We should change the tests to fail if they get a 404. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:07:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:07:11 +0000 Subject: [issue22392] Clarify documentation of __getinitargs__ In-Reply-To: <1410461552.96.0.589396040073.issue22392@psf.upfronthosting.co.za> Message-ID: <1490854031.89.0.0702871117191.issue22392@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See more detailed description in PEP 307. ---------- nosy: +serhiy.storchaka stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:08:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:08:02 +0000 Subject: [issue22392] Clarify documentation of __getinitargs__ In-Reply-To: <1410461552.96.0.589396040073.issue22392@psf.upfronthosting.co.za> Message-ID: <1490854082.59.0.231213424201.issue22392@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:09:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:09:43 +0000 Subject: [issue29878] Add global instances of int 0 and 1 In-Reply-To: <1490163311.47.0.711325721357.issue29878@psf.upfronthosting.co.za> Message-ID: <1490854183.94.0.400418569537.issue29878@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ba85d69a3e3610bdd05f0dd372cf4ebca178c7fb by Serhiy Storchaka in branch 'master': bpo-29878: Add global instances of int for 0 and 1. (#852) https://github.com/python/cpython/commit/ba85d69a3e3610bdd05f0dd372cf4ebca178c7fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:11:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:11:12 +0000 Subject: [issue24821] The optimization of string search can cause pessimization In-Reply-To: <1438927886.02.0.407236930114.issue24821@psf.upfronthosting.co.za> Message-ID: <1490854272.64.0.203306405707.issue24821@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0a58f72762353768c7d26412e627ff196aac6c4e by Serhiy Storchaka in branch 'master': bpo-24821: Fixed the slowing down to 25 times in the searching of some (#505) https://github.com/python/cpython/commit/0a58f72762353768c7d26412e627ff196aac6c4e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:12:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:12:33 +0000 Subject: [issue25996] Add support of file descriptor in os.scandir() In-Reply-To: <1451758238.49.0.729670752807.issue25996@psf.upfronthosting.co.za> Message-ID: <1490854353.11.0.735678307128.issue25996@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ea720fe7e99d68924deab38de955fe97f87e2b29 by Serhiy Storchaka in branch 'master': bpo-25996: Added support of file descriptors in os.scandir() on Unix. (#502) https://github.com/python/cpython/commit/ea720fe7e99d68924deab38de955fe97f87e2b29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:15:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:15:34 +0000 Subject: [issue29852] Argument Clinic: add common converter to Py_ssize_t that accepts None In-Reply-To: <1489922927.22.0.81107726334.issue29852@psf.upfronthosting.co.za> Message-ID: <1490854534.06.0.104928654768.issue29852@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 762bf40438a572a398e500c74e38f9894ea20a45 by Serhiy Storchaka in branch 'master': bpo-29852: Argument Clinic Py_ssize_t converter now supports None (#716) https://github.com/python/cpython/commit/762bf40438a572a398e500c74e38f9894ea20a45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:20:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:20:11 +0000 Subject: [issue29852] Argument Clinic: add common converter to Py_ssize_t that accepts None In-Reply-To: <1489922927.22.0.81107726334.issue29852@psf.upfronthosting.co.za> Message-ID: <1490854811.29.0.834312062775.issue29852@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:20:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:20:51 +0000 Subject: [issue29878] Add global instances of int 0 and 1 In-Reply-To: <1490163311.47.0.711325721357.issue29878@psf.upfronthosting.co.za> Message-ID: <1490854851.13.0.0374000389071.issue29878@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:21:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:21:11 +0000 Subject: [issue24821] The optimization of string search can cause pessimization In-Reply-To: <1438927886.02.0.407236930114.issue24821@psf.upfronthosting.co.za> Message-ID: <1490854871.71.0.766294315229.issue24821@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:21:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:21:38 +0000 Subject: [issue25996] Add support of file descriptor in os.scandir() In-Reply-To: <1451758238.49.0.729670752807.issue25996@psf.upfronthosting.co.za> Message-ID: <1490854898.01.0.152609239207.issue25996@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:28:20 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Thu, 30 Mar 2017 06:28:20 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490855300.46.0.479492008041.issue29935@psf.upfronthosting.co.za> Jelle Zijlstra added the comment: I agree with George that supporting None here is the better option. This problem also applies to collections.deque. tuple, list, and deque all have very similar index implementations, and it would be nice to merge their argument parsing boilerplate. ---------- nosy: +Jelle Zijlstra _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:34:34 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 30 Mar 2017 06:34:34 +0000 Subject: [issue29939] Compiler warning in _ctypes_test.c In-Reply-To: <1490769884.15.0.305944990861.issue29939@psf.upfronthosting.co.za> Message-ID: <1490855674.76.0.0580594113845.issue29939@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- pull_requests: +802 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:36:49 2017 From: report at bugs.python.org (assume_away) Date: Thu, 30 Mar 2017 06:36:49 +0000 Subject: [issue29944] Argumentless super() calls do not work in classes constructed with type() Message-ID: <1490855809.89.0.267666010996.issue29944@psf.upfronthosting.co.za> New submission from assume_away: The simplest example: def mydec(cls): return type(cls.__name__, cls.__bases__, dict(cls.__dict__)) @mydec class MyList(list): def extend(self, item): super(MyList, self).extend(item) def insert(self, index, object): super().insert(index, object) >>> lst = MyList() >>> lst.extend([2,3]) >>> lst.insert(0, 1) TypeError: super(type, obj): obj must be an instance or subtype of type >>> lst [2, 3] If this is intended behavior, at least the error message could be fixed. ---------- messages: 290823 nosy: assume_away priority: normal severity: normal status: open title: Argumentless super() calls do not work in classes constructed with type() type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:47:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:47:09 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1490856429.33.0.129259462213.issue29816@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 918403cfc3304d27e80fb792357f40bb3ba69c4e by Serhiy Storchaka in branch 'master': bpo-29816: Shift operation now has less opportunity to raise OverflowError. (#680) https://github.com/python/cpython/commit/918403cfc3304d27e80fb792357f40bb3ba69c4e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:47:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:47:33 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1490856453.52.0.114993803183.issue27863@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 576def096ec7b64814e038f03290031f172886c3 by Serhiy Storchaka in branch 'master': bpo-27863: Fixed multiple crashes in ElementTree. (#765) https://github.com/python/cpython/commit/576def096ec7b64814e038f03290031f172886c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 02:50:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 06:50:01 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1490856601.67.0.936609393532.issue27863@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +803 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 03:00:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 07:00:24 +0000 Subject: [issue29816] Get rid of C limitation for shift count in right shift In-Reply-To: <1489568117.43.0.447594281596.issue29816@psf.upfronthosting.co.za> Message-ID: <1490857224.08.0.532513004028.issue29816@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review Mark. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 03:01:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 07:01:05 +0000 Subject: [issue29918] Missed "const" modifiers in C API documentation In-Reply-To: <1490614245.98.0.401745534622.issue29918@psf.upfronthosting.co.za> Message-ID: <1490857265.15.0.98142380838.issue29918@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 84b8e92e463bd6a5174bd3e5a6543580f6319c57 by Serhiy Storchaka in branch 'master': bpo-29918: Add missed "const" modifiers in C API documentation. (#846) https://github.com/python/cpython/commit/84b8e92e463bd6a5174bd3e5a6543580f6319c57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 03:01:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 07:01:39 +0000 Subject: [issue29918] Missed "const" modifiers in C API documentation In-Reply-To: <1490614245.98.0.401745534622.issue29918@psf.upfronthosting.co.za> Message-ID: <1490857299.48.0.646857168864.issue29918@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 03:05:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 07:05:58 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1490857558.87.0.975760113516.issue27863@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +804 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 03:32:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 07:32:21 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1490859141.2.0.985634271975.issue27863@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c90ff1b78cb79bc3762184e03fa81f11984aaa45 by Serhiy Storchaka in branch '3.5': bpo-27863: Fixed multiple crashes in ElementTree. (#765) (#904) https://github.com/python/cpython/commit/c90ff1b78cb79bc3762184e03fa81f11984aaa45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 03:36:27 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 30 Mar 2017 07:36:27 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490859387.82.0.808405482637.issue29942@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This looks fine. Feel free to apply and to backport this to earlier versions. I would have guessed that the C compiler would have automatically removed the tail recursion, but your experience would indicate otherwise. ---------- assignee: -> twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 03:44:31 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 30 Mar 2017 07:44:31 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation In-Reply-To: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> Message-ID: <1490859871.42.0.210579443949.issue29913@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset 16f852345bcdec1bbb15e5363fad6b33bf960912 by Xiang Zhang (s-sanjay) in branch 'master': bpo-29913: deprecate compare_networks() in documentation (GH-865) https://github.com/python/cpython/commit/16f852345bcdec1bbb15e5363fad6b33bf960912 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 03:45:06 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 30 Mar 2017 07:45:06 +0000 Subject: [issue29913] ipadress compare_networks does not work according to documentation In-Reply-To: <1490599415.99.0.717154213111.issue29913@psf.upfronthosting.co.za> Message-ID: <1490859906.63.0.390975123174.issue29913@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 03:46:35 2017 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 30 Mar 2017 07:46:35 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490859995.0.0.716566315506.issue29942@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I would have guessed that the C compiler would have automatically removed the tail recursion I think it probably does, unless optimisation is turned off: I'm unable to reproduce except in debug builds of Python. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 03:52:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Mar 2017 07:52:21 +0000 Subject: [issue29887] test_normalization doesn't work In-Reply-To: <1490288230.58.0.523545383484.issue29887@psf.upfronthosting.co.za> Message-ID: <1490860341.96.0.345941765154.issue29887@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +805 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 03:53:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Mar 2017 07:53:44 +0000 Subject: [issue29887] test_normalization doesn't work In-Reply-To: <1490288230.58.0.523545383484.issue29887@psf.upfronthosting.co.za> Message-ID: <1490860424.43.0.263434939934.issue29887@psf.upfronthosting.co.za> STINNER Victor added the comment: Benjamin: "We should change the tests to fail if they get a 404." Good idea. Currently, the test is explicitly skipped on this case. Since "-u urlfetch" option must be explicitly passed on the command line, it makes sense to fail on that case. I proposed https://github.com/python/cpython/pull/905 change for that. Not sure if it's worth to backport such change to older Python versions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 04:03:51 2017 From: report at bugs.python.org (Paul Moore) Date: Thu, 30 Mar 2017 08:03:51 +0000 Subject: [issue29533] urllib2 works slowly with proxy on windows In-Reply-To: <1486802607.23.0.387912582288.issue29533@psf.upfronthosting.co.za> Message-ID: <1490861031.32.0.506371969822.issue29533@psf.upfronthosting.co.za> Paul Moore added the comment: The behaviour you're describing for IE sounds like a bug to me. If you specify a host that should bypass the proxy, then that's what should happen - it shouldn't matter if you specify the host by IP address or by name. I'm -1 on Python trying to match IE bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 04:15:38 2017 From: report at bugs.python.org (webber) Date: Thu, 30 Mar 2017 08:15:38 +0000 Subject: [issue29945] decode string:u"\ufffd" UnicodeEncodeError Message-ID: <1490861737.98.0.649780144425.issue29945@psf.upfronthosting.co.za> New submission from webber: I use python on linux, version is 2.7.13: [root at localhost bin]# ./python2.7 Python 2.7.13 (default, Mar 30 2017, 00:54:08) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> a=u"\ufffd" >>> a.decode("utf=8") Traceback (most recent call last): File "", line 1, in File "/opt/python2.7.13/lib/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 0: ordinal not in range(128) but,windows version run success! ---------- components: Unicode messages: 290834 nosy: ezio.melotti, foxscheduler, haypo priority: normal severity: normal status: open title: decode string:u"\ufffd" UnicodeEncodeError versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 04:17:40 2017 From: report at bugs.python.org (webber) Date: Thu, 30 Mar 2017 08:17:40 +0000 Subject: [issue29945] decode string:u"\ufffd" UnicodeEncodeError In-Reply-To: <1490861737.98.0.649780144425.issue29945@psf.upfronthosting.co.za> Message-ID: <1490861860.12.0.740519004084.issue29945@psf.upfronthosting.co.za> Changes by webber : Added file: http://bugs.python.org/file46767/windows.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 04:25:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Mar 2017 08:25:02 +0000 Subject: [issue29945] decode string:u"\ufffd" UnicodeEncodeError In-Reply-To: <1490861737.98.0.649780144425.issue29945@psf.upfronthosting.co.za> Message-ID: <1490862302.28.0.71755025298.issue29945@psf.upfronthosting.co.za> STINNER Victor added the comment: Decoding Unicode doesn't make any sense. You should take a look at http://unicodebook.readthedocs.io/ to understand what you are doing :-) (On Python 3, Unicode strings, the str type, has no mode .decode() type.) I suggest to close the issue has NOT A BUG. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 04:28:04 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 30 Mar 2017 08:28:04 +0000 Subject: [issue29946] compiler warning "sqrtpi defined but not used" Message-ID: <1490862484.88.0.697244394269.issue29946@psf.upfronthosting.co.za> New submission from Xiang Zhang: Ubuntu 16.10, GCC 6.2.0 /home/angwer/repos/cpython/Modules/mathmodule.c:74:21: warning: ?sqrtpi? defined but not used [-Wunused-const-variable=] static const double sqrtpi = 1.772453850905516027298167483341145182798; ---------- components: Build messages: 290836 nosy: xiang.zhang priority: normal severity: normal status: open title: compiler warning "sqrtpi defined but not used" versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 04:43:39 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 30 Mar 2017 08:43:39 +0000 Subject: [issue29946] compiler warning "sqrtpi defined but not used" In-Reply-To: <1490862484.88.0.697244394269.issue29946@psf.upfronthosting.co.za> Message-ID: <1490863419.03.0.486533075944.issue29946@psf.upfronthosting.co.za> Louie Lu added the comment: I can reproduce on ArchLinux 4.10.1-1, GCC 6.3.1: /home/louielu/Python/cpython/Modules/mathmodule.c:74:21: warning: ?sqrtpi? defined but not used [-Wunused-const-variable=] static const double sqrtpi = 1.772453850905516027298167483341145182798; ---- Is used by `m_erfc_contfrac` and `m_erf_series`, and inside the block of "#if !defined(HAVE_ERF) || !defined(HAVE_ERFC)", maybe sqrtpi should do the same condition? ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 04:56:25 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 30 Mar 2017 08:56:25 +0000 Subject: [issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches In-Reply-To: <1490830588.09.0.152876220246.issue29943@psf.upfronthosting.co.za> Message-ID: <1490864185.43.0.196763916712.issue29943@psf.upfronthosting.co.za> Changes by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 05:12:24 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 30 Mar 2017 09:12:24 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490865144.72.0.885743127934.issue29935@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, modifying these mature APIs is a really bad idea. They are worked well as-is of over a decade. Seeing people use None for these arguments makes the code less readable. Python has a number of APIs where the number of arguments controls the behavior. For example, type() with one argument does something very different that type() with three arguments. Likewise, iter() behaves differently with two arguments than three. The pattern used by index() shows-up in a number of places where we have optional start and end arguments. These APIs are a long standing Python norm, both for the core and for third-party modules. Type checking will have to adapt to norms rather than having all of Python change for the convenience of typing. Serhiy, please go ahead with the doc fix. If the OP really wants to insist on changing old and stable APIs through out the language in a way that I consider harmful to readability, we can battle it out in a PEP and on mailing lists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 07:06:05 2017 From: report at bugs.python.org (Eryk Sun) Date: Thu, 30 Mar 2017 11:06:05 +0000 Subject: [issue29945] decode string:u"\ufffd" UnicodeEncodeError In-Reply-To: <1490861737.98.0.649780144425.issue29945@psf.upfronthosting.co.za> Message-ID: <1490871965.04.0.642503824579.issue29945@psf.upfronthosting.co.za> Eryk Sun added the comment: > windows version run success! Trying to decode a non-ASCII unicode string should raise an exception on any platform: Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> a=u"\ufffd" >>> a.decode("utf=8") Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python27\lib\encodings\utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 0: ordinal not in range(128) Unless you've modified the default encoding to something other than ASCII. For example: Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys, inspect, sitecustomize >>> print inspect.getsource(sitecustomize) import sys sys.setdefaultencoding('utf-8') >>> sys.getdefaultencoding() 'utf-8' >>> a=u"\ufffd" >>> a.decode("utf=8") u'\ufffd' ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 07:18:39 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 30 Mar 2017 11:18:39 +0000 Subject: [issue29944] Argumentless super() calls do not work in classes constructed with type() In-Reply-To: <1490855809.89.0.267666010996.issue29944@psf.upfronthosting.co.za> Message-ID: <1490872719.45.0.485205984569.issue29944@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +ncoghlan, xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 08:08:53 2017 From: report at bugs.python.org (Dominic Mayers) Date: Thu, 30 Mar 2017 12:08:53 +0000 Subject: [issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself? Message-ID: <1490875733.83.0.750732897079.issue29947@psf.upfronthosting.co.za> New submission from Dominic Mayers: I am just curious to know if someone considered the idea of passing a factory instance that returns RequestHandlerClass instances instead of directly passing the class? It may affect existing handlers that read non local variables, but there should be a way to make the factory optional. The purpose is only aesthetic and a better organization of the code. I find it awkward to have to subclass the server every time that we have an handler that needs special objects, a database connection, a socket connection to another party, etc. The server class should have a single purpose: accept a request and pass it to an handler. We should only need to subclass a server when we need to do that in a different way : TCP vs UDP, Unix Vs INET, etc. The usage is simpler and more natural. Instead of subclassing the server, we create a factory for the handler. ---------- components: Library (Lib) messages: 290840 nosy: dominic108 priority: normal severity: normal status: open title: In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself? type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 10:06:37 2017 From: report at bugs.python.org (Julia Dolgova) Date: Thu, 30 Mar 2017 14:06:37 +0000 Subject: [issue29533] urllib2 works slowly with proxy on windows In-Reply-To: <1486802607.23.0.387912582288.issue29533@psf.upfronthosting.co.za> Message-ID: <1490882797.32.0.156136702058.issue29533@psf.upfronthosting.co.za> Julia Dolgova added the comment: Ok, but may be there are some Windows users, that have different opinion, who prefer to put up with this bug for the benefit of better performance. Could you leave them an opportunity to refuse this behavior of urllib? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 10:20:23 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 Mar 2017 14:20:23 +0000 Subject: [issue29725] sqlite3.Cursor doesn't properly document "arraysize" In-Reply-To: <1488732449.69.0.822466282685.issue29725@psf.upfronthosting.co.za> Message-ID: <1490883623.62.0.919339863123.issue29725@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I wanted to try to work on the documentation for this, but I had some questions. I looked at: https://github.com/python/cpython/blob/master/Modules/_sqlite/cursor.c And I don't see arraysize being set to anything other than 1. I also don't see fetchall using it like the documentation says. fetchmany does seem to be using the size sent in as an argument or using the arraysize (which is 1) to break out of the loop early, so the default behaviour appears to be the similar to fetchone. Please take this all with the caveat that I don't know c, so I may be missing something really obvious. But, I can see all the other cursor attributes being changed within this module, so I expected arraysize to work in a similar way. I did find this website which has a definition of arraysize: http://initd.org/psycopg/docs/cursor.html#cursor.arraysize Sorry if this is too many questions. I've just started trying to help with documentation issues and I may have gotten in over my head. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 10:48:55 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 30 Mar 2017 14:48:55 +0000 Subject: [issue29944] Argumentless super() calls do not work in classes constructed with type() In-Reply-To: <1490855809.89.0.267666010996.issue29944@psf.upfronthosting.co.za> Message-ID: <1490885335.54.0.880588121106.issue29944@psf.upfronthosting.co.za> Nick Coghlan added the comment: Interestingly, even `types.new_class` misbehaves in this case: ``` >>> def mydec(cls): ... return types.new_class(cls.__name__, cls.__bases__, exec_body=lambda ns: ns.update(cls.__dict__)) ... >>> @mydec ... class MyList(list): ... def insert(self, idx, obj): ... super().insert(idx, obj) ... >>> MyList().insert(0, 1) Traceback (most recent call last): File "", line 1, in File "", line 4, in insert TypeError: super(type, obj): obj must be an instance or subtype of type ``` The error message is confusing here because it's using 'type' as a metavariable to refer to the first argument of super(), *not* to the builtin called "type". If we poke around in the MyList.insert closure, we can see the origin of the problem: ``` >>> MyList.insert.__closure__[0].cell_contents >>> MyList.insert.__closure__[0].cell_contents is MyList False ``` The class cell is still bound to the originally created class object, but the decorator threw that away and returned a completely different object. As a result, the "self" passed to the bound method is *not* an instance of the type stored in the "__class__" cell, and super() complains. Given that super() doesn't take keyword arguments, perhaps we should propose on python-dev that "type" be changed to "starting_type" in the super() error messages and documentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 10:49:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 14:49:14 +0000 Subject: [issue15083] Rewrite ElementTree tests in a cleaner and safer way In-Reply-To: <1339818759.87.0.747348787779.issue15083@psf.upfronthosting.co.za> Message-ID: <1490885354.88.0.7667940929.issue15083@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +806 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 10:55:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 14:55:08 +0000 Subject: [issue15083] Rewrite ElementTree tests in a cleaner and safer way In-Reply-To: <1339818759.87.0.747348787779.issue15083@psf.upfronthosting.co.za> Message-ID: <1490885708.32.0.779543678958.issue15083@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is hard to backport bugfixes to 2.7 since tests are too different. Due to this I backported some bugfixes without tests and omitted backporting other bugfixes. PR 906 converts doctests in 2.7 to unittests. This will help backporting bugfixes too much. Actually I have backported tests from 3.5 and checked that all old tests are present in new tests. Perhaps I found a bug in ElementTree in 2.7. Will open an issue after merging tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 10:56:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 14:56:47 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1490885807.64.0.974061704174.issue27863@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since it is hard to backport the bugfix to 2.7 without test, issue15083 is a dependence. ---------- dependencies: +Rewrite ElementTree tests in a cleaner and safer way stage: needs patch -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 11:03:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 15:03:07 +0000 Subject: [issue29948] DeprecationWarning when parse ElementTree with a doctype in 2.7 Message-ID: <1490886187.9.0.0310872110299.issue29948@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: DeprecationWarning is emitted when parse ElementTree with a doctype in 2.7. $ python2.7 -Wa Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import xml.etree.ElementTree as ET >>> ET.XML('text') /usr/lib/python2.7/xml/etree/ElementTree.py:1638: DeprecationWarning: This method of XMLParser is deprecated. Define doctype() method on the TreeBuilder target. DeprecationWarning, /usr/lib/python2.7/xml/etree/ElementTree.py:1638: DeprecationWarning: This method of XMLParser is deprecated. Define doctype() method on the TreeBuilder target. DeprecationWarning, ---------- assignee: serhiy.storchaka components: XML messages: 290846 nosy: eli.bendersky, scoder, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: DeprecationWarning when parse ElementTree with a doctype in 2.7 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 11:03:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 15:03:26 +0000 Subject: [issue29948] DeprecationWarning when parse ElementTree with a doctype in 2.7 In-Reply-To: <1490886187.9.0.0310872110299.issue29948@psf.upfronthosting.co.za> Message-ID: <1490886206.07.0.485053164831.issue29948@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Rewrite ElementTree tests in a cleaner and safer way _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 11:05:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 15:05:11 +0000 Subject: [issue20548] Use specific asserts in warnings and exceptions tests In-Reply-To: <1391804772.02.0.729156315156.issue20548@psf.upfronthosting.co.za> Message-ID: <1490886311.52.0.607784772485.issue20548@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f15c4d374a07c576c0e8349b16604f6dbad0b953 by Serhiy Storchaka in branch 'master': bpo-20548: Use specific asserts in warnings and exceptions tests (#788) https://github.com/python/cpython/commit/f15c4d374a07c576c0e8349b16604f6dbad0b953 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 11:06:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Mar 2017 15:06:55 +0000 Subject: [issue29887] test_normalization doesn't work In-Reply-To: <1490288230.58.0.523545383484.issue29887@psf.upfronthosting.co.za> Message-ID: <1490886415.65.0.60056049313.issue29887@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 722a3af092b94983aa26f5e591fb1b45e2c2a0ff by Victor Stinner in branch 'master': bpo-29887: Test normalization now fails if download fails (#905) https://github.com/python/cpython/commit/722a3af092b94983aa26f5e591fb1b45e2c2a0ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 11:07:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 15:07:08 +0000 Subject: [issue20548] Use specific asserts in warnings and exceptions tests In-Reply-To: <1391804772.02.0.729156315156.issue20548@psf.upfronthosting.co.za> Message-ID: <1490886428.95.0.39741090598.issue20548@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 11:08:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 15:08:25 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1490886505.23.0.663936244212.issue27863@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a6b4e1902250d6f28ca6d083ce1c8d7e9b91974b by Serhiy Storchaka in branch '3.6': bpo-27863: Fixed multiple crashes in ElementTree. (#765) (#903) https://github.com/python/cpython/commit/a6b4e1902250d6f28ca6d083ce1c8d7e9b91974b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 11:08:34 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 30 Mar 2017 15:08:34 +0000 Subject: [issue29946] compiler warning "sqrtpi defined but not used" In-Reply-To: <1490862484.88.0.697244394269.issue29946@psf.upfronthosting.co.za> Message-ID: <1490886514.3.0.7928010886.issue29946@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +mark.dickinson, rhettinger, stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 11:12:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 15:12:10 +0000 Subject: [issue29204] Add code deprecations in ElementTree In-Reply-To: <1483874003.49.0.675614316595.issue29204@psf.upfronthosting.co.za> Message-ID: <1490886730.06.0.813059677754.issue29204@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 762ec97ea68a1126b8855996c61fa8239dc9fff7 by Serhiy Storchaka in branch 'master': bpo-29204: Emit warnings for already deprecated ElementTree features. (#773) https://github.com/python/cpython/commit/762ec97ea68a1126b8855996c61fa8239dc9fff7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 11:21:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 15:21:39 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490887299.74.0.46220974751.issue29935@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Raymond for your review. In any case we should first fix error messages in maintain releases. Changing signatures of methods of basic type should be discussed on the mailing lists. I don't think this needs a PEP, unless this change will be extended to many other methods and types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 11:27:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 15:27:42 +0000 Subject: [issue29204] Add code deprecations in ElementTree In-Reply-To: <1483874003.49.0.675614316595.issue29204@psf.upfronthosting.co.za> Message-ID: <1490887662.09.0.999248694542.issue29204@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The deprecation of the cElementTree module was excluded. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 11:29:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 15:29:26 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490887766.35.0.430644226998.issue29935@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset d4edfc9abffca965e76ebc5957a92031a4d6c4d4 by Serhiy Storchaka in branch 'master': bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887) https://github.com/python/cpython/commit/d4edfc9abffca965e76ebc5957a92031a4d6c4d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 11:57:01 2017 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 30 Mar 2017 15:57:01 +0000 Subject: [issue29946] compiler warning "sqrtpi defined but not used" In-Reply-To: <1490862484.88.0.697244394269.issue29946@psf.upfronthosting.co.za> Message-ID: <1490889421.75.0.618532852815.issue29946@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is almost certainly the result of #26121. +1 to moving the `sqrtpi` definition inside the relevant `#if` blocks. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 12:03:58 2017 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 30 Mar 2017 16:03:58 +0000 Subject: [issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself? In-Reply-To: <1490875733.83.0.750732897079.issue29947@psf.upfronthosting.co.za> Message-ID: <1490889838.85.0.796821522433.issue29947@psf.upfronthosting.co.za> Eric V. Smith added the comment: Just a guess, but it's because this code was written at a time when subclassing was the preferred way to extend code. Now we know better :), but it's not possible to change history, unfortunately. Lots of code depends on the current behavior. If you find a way to make a factory function work, while preserving backward comparability, then we can re-open this issue and consider the enhancement request then. ---------- nosy: +eric.smith resolution: -> rejected stage: -> resolved status: open -> closed versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 12:05:06 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 30 Mar 2017 16:05:06 +0000 Subject: [issue29944] Argumentless super() calls do not work in classes constructed with type() In-Reply-To: <1490855809.89.0.267666010996.issue29944@psf.upfronthosting.co.za> Message-ID: <1490889906.75.0.313319829897.issue29944@psf.upfronthosting.co.za> Josh Rosenberg added the comment: It looks like this is a general problem caused by the fact that a function that is: 1. Defined in a class 2. References the name "super" (even if it's a local variable name, even if it's never called) isn't "just" a plain function. Even though Python 3 officially removed the concept of unbound methods, there is still some unbound method-like behavior going on, which makes that sort of function intrinsically tied to where it executes. Specifically, a function of that sort is effectively a closure, where the closure scope defines __class__ (insert.__code__.co_freevars will be non-empty with the string '__class__' in it); the value of that closure variable cell is set when the class finishes being defined (that is, the closure cell is empty when the def block finishes, but when the class block itself completes, the cell is populated with a reference to the class). No argument super (specifically, super_init) relies on this assistance, as it looks up the __class__ cell in the caller's frame when not provided a class explicitly. In your repro, the problem is that __class__ is set to the original MyList (it was set at the moment the class MyList(list): block finished, before the decorator was invoked), but at call time, the self instance is of the new type you created (which has the same name, but the name isn't looked up, it has a cached reference to the class). The same problem applies if you do: class MyList(list): def insert(self, index, object): super().insert(index, object) class MyOtherList(list): insert = MyList.insert because MyList.insert is permanently tied to MyList, it doesn't get "reclosured" as a result of MyOtherList using it. Similarly: class MyList(list): pass def insert(self, index, object): super().insert(index, object) MyList.insert = insert fails when insert is called with error: "RuntimeError: super(): __class__ cell not found", because functions def-ed outside a class block entirely don't have __class__ as "virtual closure" scope. It's arguable whether this should be changed: If you're using super() without arguments, the implicit behavior is that it works with "whatever class I'm currently defining", so trying to reuse it with some other class is trying to extend that implicit behavior to "whatever class I was eventually assigned to". Making it work would mean that already "class bound" methods must be rebound when assigned to a new class, and non-bound methods must be bound (in both cases, you'd need to handle this when implicitly assigned in the class body, or explicitly assigned later as an attribute on the constructed class). Doing so would break at least one pattern someone might be using already, where they have multiple inheritance, and while most methods should prioritize the first class in the MRO, they want a specific method to bypass one or more classes in the MRO without calling it. For example: class Stuff: # Top of diamond, just so super().stuff() valid in all children def stuff(self): print("Stuff") class Spam: def stuff(self): print("Spam") super().stuff() class Eggs: def stuff(self): print("Eggs") super().stuff() class SpamAndEggsWithoutSpam(Spam, Eggs): stuff = Eggs.stuff # I'd like my stuff without Spam Under the current design, Eggs.stuff is already bound to Eggs, so this works; you see: Eggs Stuff printed, but not Spam. If rebinding were made a thing, you'd end up with: Eggs Spam Eggs Stuff with the first Eggs being from the rebound method. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 12:08:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 16:08:21 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490890101.75.0.782743137616.issue29935@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +807 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 12:09:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 16:09:11 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1490890151.05.0.0438553686112.issue10030@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 06e522521c06671b4559eecf9e2a185c2d62c141 by Serhiy Storchaka in branch 'master': bpo-10030: Sped up reading encrypted ZIP files by 2 times. (#550) https://github.com/python/cpython/commit/06e522521c06671b4559eecf9e2a185c2d62c141 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 12:10:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 16:10:19 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1490890219.57.0.671349997469.issue10030@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 12:13:17 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 30 Mar 2017 16:13:17 +0000 Subject: [issue29944] Argumentless super() calls do not work in classes constructed with type() In-Reply-To: <1490855809.89.0.267666010996.issue29944@psf.upfronthosting.co.za> Message-ID: <1490890397.35.0.390640064802.issue29944@psf.upfronthosting.co.za> Josh Rosenberg added the comment: This is what I get for leaving a response up and working on it intermittently for three hours, and not rechecking: I found the same basic problem. For the record, I also found a terribly hacky way of doing this sort of rebinding manually, should you actually need to do so under the current design: def make_class_closure(__class__): '''Makes a one-tuple closure with a cell for the provided class''' return (lambda: super).__closure__ class MyList(list): def insert(self, index, object): super().insert(index, object) class MyList2(list): pass MyList2.insert = types.FunctionType(MyList.insert.__code__, globals(), closure=make_class_closure(MyList2)) It would need further improvements to recognize when it needs to run, deal with existing closures, handle top-level functions without __class__ in their closure co_freevars, etc., and I won't even pretend that's a sane workaround for the problem, but it does demonstrate what is happening/what would need to be changed to make it work, if indeed that's desirable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 12:16:10 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 30 Mar 2017 16:16:10 +0000 Subject: [issue29946] compiler warning "sqrtpi defined but not used" In-Reply-To: <1490862484.88.0.697244394269.issue29946@psf.upfronthosting.co.za> Message-ID: <1490890570.95.0.161154850563.issue29946@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +808 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 12:29:08 2017 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 30 Mar 2017 16:29:08 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490891348.19.0.780423856582.issue29941@psf.upfronthosting.co.za> Thomas Wouters added the comment: What happens when you don't have the assert depends on whether the new function call raises an exception or not, and keep in mind *this is what most people see anyway*: if the new call does not raise an exception, a SystemError is raised, with the original exception as cause: Traceback (most recent call last): File "", line 5, in func TypeError: unsupported operand type(s) for +: 'int' and 'NoneType' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in SystemError: PyEval_EvalFrameEx returned a result with an error set If the new call does raise an exception, the original exception is lost (although this may depend on the exact path through the code here; there's quite a few places that deal with this kind of thing.) I don't mind dropping the assert changes from my PR, but I don't really understand why it is better to be *less* helpful when asserts are enabled :) As I said, the actual assert failure does very little to point to the real problem, as the problem is *some* extension module not clearing the error (or not returning an error value), and the assert does not guard against actual problems -- nothing goes "more wrong" when the assert is not there. I would also argue that an extension module is not *internal* to CPython, any more than arguments passed to a builtin function are. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 12:47:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 16:47:02 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490892422.02.0.0696397830042.issue29935@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bf4bb2e43030661e568d5d4b046e8b9351cc164c by Serhiy Storchaka in branch '3.6': bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887) (#907) https://github.com/python/cpython/commit/bf4bb2e43030661e568d5d4b046e8b9351cc164c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 12:58:37 2017 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 30 Mar 2017 16:58:37 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490893117.6.0.234994377161.issue29942@psf.upfronthosting.co.za> Thomas Wouters added the comment: New changeset 5466d4af5fe76ec0a5fbc8a05675287d9e8e9d14 by T. Wouters in branch 'master': bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#889) https://github.com/python/cpython/commit/5466d4af5fe76ec0a5fbc8a05675287d9e8e9d14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 13:01:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 17:01:01 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490893261.95.0.585156581411.issue29935@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +809 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 13:01:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 17:01:40 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490893300.66.0.955819389608.issue29935@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +810 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 13:05:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 17:05:12 +0000 Subject: [issue29946] compiler warning "sqrtpi defined but not used" In-Reply-To: <1490862484.88.0.697244394269.issue29946@psf.upfronthosting.co.za> Message-ID: <1490893512.61.0.672964473812.issue29946@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7a26464c6496c29244072fdd80f9b92c68174742 by Serhiy Storchaka (Louie Lu) in branch 'master': bpo-29946: Fix "sqrtpi defined but not used" (#908) https://github.com/python/cpython/commit/7a26464c6496c29244072fdd80f9b92c68174742 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 13:05:41 2017 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 30 Mar 2017 17:05:41 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490893541.69.0.685116256665.issue29942@psf.upfronthosting.co.za> Thomas Wouters added the comment: FWIW, we ran into this in real-world cases (Youtube, I think), when we switched from using a pre-built Python interpreter to one built from source using the same optimisation and debug levels as we use for all other C/C++ code. Even so, the accompanying test really does fail in pydebug mode ;-P I'll backport to 3.6, 3.5 and 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 13:31:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 17:31:48 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490895108.39.0.576631527497.issue29935@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8b8bde44f3912d8b2df5591ffc31d2d8c6dcca6c by Serhiy Storchaka in branch '3.5': bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887) (#907) (#909) https://github.com/python/cpython/commit/8b8bde44f3912d8b2df5591ffc31d2d8c6dcca6c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 13:32:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 17:32:20 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490895140.0.0.814005671391.issue29935@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 079f21f873b99f9564a41c5b7f3e0d7035847ae5 by Serhiy Storchaka in branch '2.7': bpo-29935: Fixed error messages in the index() method of tuple and list (#887) (#907) (#910) https://github.com/python/cpython/commit/079f21f873b99f9564a41c5b7f3e0d7035847ae5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 13:34:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 17:34:56 +0000 Subject: [issue29935] list and tuple index methods should accept None parameters In-Reply-To: <1490717781.97.0.695968126549.issue29935@psf.upfronthosting.co.za> Message-ID: <1490895296.4.0.566036085704.issue29935@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 13:37:04 2017 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 30 Mar 2017 17:37:04 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490895424.86.0.137570001317.issue29942@psf.upfronthosting.co.za> Changes by Thomas Wouters : ---------- pull_requests: +811 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 13:37:40 2017 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 30 Mar 2017 17:37:40 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490895460.22.0.863347029005.issue29942@psf.upfronthosting.co.za> Changes by Thomas Wouters : ---------- pull_requests: +812 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 13:38:09 2017 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 30 Mar 2017 17:38:09 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490895489.44.0.810785572312.issue29942@psf.upfronthosting.co.za> Changes by Thomas Wouters : ---------- pull_requests: +813 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 14:02:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 18:02:03 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490896923.91.0.0973014309499.issue29942@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Possible workaround: use chain.from_iterable(filter(None, iterables)) instead of chain.from_iterable(iterables). But this works only when iterables are collections, not iterators. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 14:07:30 2017 From: report at bugs.python.org (Tim Peters) Date: Thu, 30 Mar 2017 18:07:30 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490897250.48.0.913581258435.issue29941@psf.upfronthosting.co.za> Tim Peters added the comment: So there's more than one issue here. First, should asserts be supported in the absence of Py_DEBUG? It seems, so far, everyone agrees they should be. Second, ...? I'm really not following your argument. It _appears_ to be something along the lines that code "shouldn't be" checking for PyErr_Occurred() at all ... because "nothing goes 'more wrong' when the assert is not there". Maybe, maybe not. For example, if a C function _assumes_ no exception is pending at entry, then it could try some speculative code and deliberately PyErr_Clear() if PyErr_Occurred() is true after - and end up erasing all knowledge of that an exception _was_ in fact pending (upon function entry). An assert at the start prevents such an error when asserts are enabled. Violations of preconditions can have bad consequences. But whatever the second argument is, it seems independent of whether asserts should be supported in the absence of Py_DEBUG. For the rest, I just don't think "internal to CPython" versus "external to CPython". That's a matter of how things happen to be packaged today. I do think "written in C" versus "not written in C". That's the level asserts live in. Any C code (internal or external) mucking with the Python C API has to adhere to a mountain of rules, and asserts are a lightweight way to help check for compliance in cases where it's thought to be "too expensive" to do even cheap unconditional checks all the time. Of course asserts are also useful for verifying invariants and postconditions, but I wouldn't want to rule out using them to verify preconditions too. In short, I'd like to see a patch limited to the obvious win: whatever changes are needed to support asserts in the absence of Py_DEBUG. Anything beyond that is "a crusade" ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 14:09:13 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 30 Mar 2017 18:09:13 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 Message-ID: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> New submission from INADA Naoki: (original thread is https://mail.python.org/pipermail/python-list/2017-March/720391.html) https://github.com/python/cpython/commit/4897300276d870f99459c82b937f0ac22450f0b6 this commit doubles sizeof set object created by set_merge(). It is used by constructor of set and frozenset. $ /usr/bin/python3 Python 3.5.2+ (default, Sep 22 2016, 12:18:14) [GCC 6.2.0 20160927] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> s = set(range(10)) >>> sys.getsizeof(frozenset(s)) 736 $ python3 Python 3.6.0 (default, Dec 30 2016, 20:49:54) [GCC 6.2.0 20161005] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> s = set(range(10)) >>> sys.getsizeof(frozenset(s)) 1248 ---------- components: Interpreter Core keywords: 3.6regression messages: 290868 nosy: inada.naoki, rhettinger priority: normal severity: normal status: open title: sizeof set after set_merge() is doubled from 3.5 versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 14:15:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 18:15:04 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1490897704.17.0.235997907099.issue29949@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 14:25:51 2017 From: report at bugs.python.org (Jan Gosmann) Date: Thu, 30 Mar 2017 18:25:51 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1490898351.42.0.632786650228.issue29949@psf.upfronthosting.co.za> Changes by Jan Gosmann : ---------- nosy: +jgosmann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 14:26:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 30 Mar 2017 18:26:28 +0000 Subject: [issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490898388.1.0.248028458614.issue29881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. My suggestion is to rename _PY_ONCEVAR_INIT to _Py_SET_ONCE and make it returning the value. And apply this to more static and global variables. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 14:44:00 2017 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 30 Mar 2017 18:44:00 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490899440.9.0.416580996648.issue29941@psf.upfronthosting.co.za> Thomas Wouters added the comment: Dropped the Py_DEBUG guards from the dubious asserts in the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 15:12:20 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 30 Mar 2017 19:12:20 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490901140.48.0.369851949586.issue29928@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 33db068dac7686e37736f7ecf8abb2aee0345cf2 by Mariatta in branch 'master': bpo-29928: Add f-string to the Glossary (GH-864) https://github.com/python/cpython/commit/33db068dac7686e37736f7ecf8abb2aee0345cf2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 15:15:17 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 30 Mar 2017 19:15:17 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490901317.75.0.98937308384.issue29928@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +814 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 15:27:21 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 30 Mar 2017 19:27:21 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490902041.92.0.293907383118.issue29928@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 7b5b1379ac2c1e89ebf90b88b5d32457910e975e by Mariatta in branch '3.6': bpo-29928: Add f-string to the Glossary (GH-864) (GH-914) https://github.com/python/cpython/commit/7b5b1379ac2c1e89ebf90b88b5d32457910e975e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 15:30:42 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 30 Mar 2017 19:30:42 +0000 Subject: [issue29928] Add f-strings to Glossary In-Reply-To: <1490677653.09.0.270979437774.issue29928@psf.upfronthosting.co.za> Message-ID: <1490902242.5.0.914105593394.issue29928@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks all! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 15:48:26 2017 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 30 Mar 2017 19:48:26 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490903306.1.0.735656444782.issue29942@psf.upfronthosting.co.za> Thomas Wouters added the comment: New changeset 599bb181036f724629a515317f0f39520950d51c by T. Wouters in branch '3.6': bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#911) https://github.com/python/cpython/commit/599bb181036f724629a515317f0f39520950d51c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 15:48:57 2017 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 30 Mar 2017 19:48:57 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490903337.23.0.136045928626.issue29942@psf.upfronthosting.co.za> Thomas Wouters added the comment: New changeset 9273dfe1800fc7241d69f4d523d748ebd35b3801 by T. Wouters in branch '3.5': bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#912) https://github.com/python/cpython/commit/9273dfe1800fc7241d69f4d523d748ebd35b3801 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 15:49:24 2017 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 30 Mar 2017 19:49:24 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490903364.21.0.898173226094.issue29942@psf.upfronthosting.co.za> Thomas Wouters added the comment: New changeset d694a06206fc09b76b4507aacde5e69a248f434f by T. Wouters in branch '2.7': bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#913) https://github.com/python/cpython/commit/d694a06206fc09b76b4507aacde5e69a248f434f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 15:51:35 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 Mar 2017 19:51:35 +0000 Subject: [issue29751] PyLong_FromString documentation wrong on numbers with leading zero and base=0 In-Reply-To: <1488922068.27.0.463542328186.issue29751@psf.upfronthosting.co.za> Message-ID: <1490903495.74.0.562383563852.issue29751@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +815 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 15:52:32 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 30 Mar 2017 19:52:32 +0000 Subject: [issue29751] PyLong_FromString documentation wrong on numbers with leading zero and base=0 In-Reply-To: <1488922068.27.0.463542328186.issue29751@psf.upfronthosting.co.za> Message-ID: <1490903552.7.0.151300860823.issue29751@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I have a pull request ready for the documentation, but I didn't understand the underscore usage, so I couldn't add that. If you explain it, then I can try to add it. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 15:52:34 2017 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 30 Mar 2017 19:52:34 +0000 Subject: [issue29942] Stack overflow in itertools.chain.from_iterable. In-Reply-To: <1490807349.39.0.701880825332.issue29942@psf.upfronthosting.co.za> Message-ID: <1490903554.68.0.549589412181.issue29942@psf.upfronthosting.co.za> Changes by Thomas Wouters : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 15:57:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 30 Mar 2017 19:57:21 +0000 Subject: [issue29887] test_normalization doesn't work In-Reply-To: <1490288230.58.0.523545383484.issue29887@psf.upfronthosting.co.za> Message-ID: <1490903841.95.0.0827627259651.issue29887@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, Zachary reported me the following failure which is legitimate. The code doesn't handle correctly read-only library directory. The test should try to write the file in a temporary file, or simply skip the test. http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%203.x/builds/500/steps/test/logs/stdio ====================================================================== FAIL: test_main (test.test_normalization.NormalizationTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/test/test_normalization.py", line 42, in test_main check=check_version) PermissionError: [Errno 13] Permission denied: '/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/test/data/NormalizationTest.txt' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/test/test_normalization.py", line 44, in test_main self.fail(f"Could not retrieve {TESTDATAURL}") AssertionError: Could not retrieve http://www.pythontest.net/unicode/9.0.0/NormalizationTest.txt ---------------------------------------------------------------------- Ran 2 tests in 0.149s ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 16:06:28 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 30 Mar 2017 20:06:28 +0000 Subject: [issue29751] PyLong_FromString documentation wrong on numbers with leading zero and base=0 In-Reply-To: <1488922068.27.0.463542328186.issue29751@psf.upfronthosting.co.za> Message-ID: <1490904388.73.0.926982274665.issue29751@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 16:29:01 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 30 Mar 2017 20:29:01 +0000 Subject: [issue29751] PyLong_FromString documentation wrong on numbers with leading zero and base=0 In-Reply-To: <1488922068.27.0.463542328186.issue29751@psf.upfronthosting.co.za> Message-ID: <1490905741.92.0.507048548223.issue29751@psf.upfronthosting.co.za> Terry J. Reedy added the comment: String arguments to int are quoted int literals. From https://docs.python.org/3/reference/lexical_analysis.html#literals 'Underscores are ignored for determining the numeric value of the literal. They can be used to group digits for enhanced readability. One underscore can occur between digits, and after base specifiers like 0x.' For your patch, I would summarize this by expanding 'Leading spaces are ignored.' to the following (in patch comment also). "Leading spaces and single underscores after a base specifier and between digits are ignored." ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 16:39:08 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 30 Mar 2017 20:39:08 +0000 Subject: [issue22392] Clarify documentation of __getinitargs__ In-Reply-To: <1410461552.96.0.589396040073.issue22392@psf.upfronthosting.co.za> Message-ID: <1490906348.87.0.329405989492.issue22392@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 2ee01ecf419a392f0b6a33ca10d1f747adb6c43a by Mariatta (Mandeep Singh) in branch '2.7': [2.7] bpo-22392: Improve documentation for __getinitargs__ (GH-899) https://github.com/python/cpython/commit/2ee01ecf419a392f0b6a33ca10d1f747adb6c43a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 16:40:21 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 30 Mar 2017 20:40:21 +0000 Subject: [issue22392] Clarify documentation of __getinitargs__ In-Reply-To: <1410461552.96.0.589396040073.issue22392@psf.upfronthosting.co.za> Message-ID: <1490906421.91.0.199288570326.issue22392@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 16:45:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 30 Mar 2017 20:45:00 +0000 Subject: [issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad In-Reply-To: <1476176180.11.0.398413685253.issue28415@psf.upfronthosting.co.za> Message-ID: <1490906700.98.0.886876557461.issue28415@psf.upfronthosting.co.za> Terry J. Reedy added the comment: *Way* too wordy. In msg278666, I suggested minimal and terse alternatives. a. /exactly/nearly/ b. add "except that a 0 conversion flag is not ignored when a precision is given for d, i, o, u, x and X conversion types" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 17:05:29 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Thu, 30 Mar 2017 21:05:29 +0000 Subject: [issue29251] Class __dict__ is only a mapping proxy In-Reply-To: <1484222660.7.0.65822313324.issue29251@psf.upfronthosting.co.za> Message-ID: <1490907929.55.0.0273904618273.issue29251@psf.upfronthosting.co.za> Jim Fasarakis-Hilliard added the comment: I believe the docs defined that, usually using a bold "CPython implementation detail" sentence. It seems like it's something that would be considered an implementation detail, though, according to Raymond's answer here: http://stackoverflow.com/questions/32720492/why-is-a-class-dict-a-mappingproxy Changing it to just state it's a mapping definitely looks like the safest option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 18:32:35 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Thu, 30 Mar 2017 22:32:35 +0000 Subject: [issue29950] Rename SlotWrapperType to WrapperDescriptorType Message-ID: <1490913155.68.0.921075997719.issue29950@psf.upfronthosting.co.za> New submission from Jim Fasarakis-Hilliard: The name SlotWrapperType was added in #29377 but it added the type based on the repr of the object instead of it's type as `type(object.__init__)` results in. I proposed this be named to WrapperDescriptorType to avoid and any unecessary confusion down the line. ---------- components: Library (Lib) messages: 290883 nosy: Jim Fasarakis-Hilliard priority: normal severity: normal status: open title: Rename SlotWrapperType to WrapperDescriptorType versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 19:26:24 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 30 Mar 2017 23:26:24 +0000 Subject: [issue29533] urllib2 works slowly with proxy on windows In-Reply-To: <1486802607.23.0.387912582288.issue29533@psf.upfronthosting.co.za> Message-ID: <1490916384.89.0.679249504842.issue29533@psf.upfronthosting.co.za> Steve Dower added the comment: I think the point is that we don't want to be grabbing settings like this from other configuration locations. Ideally, there'd be a way to provide a list of "don't bypass the proxy for these names", which a caller could then read from the IE configuration if they want. The other part of the problem is it seems that nobody on this thread (apart from perhaps you) understands exactly what's going on here :) You may want to post to python-dev and see if anyone who understands the intricacies of how gethostbyaddr() should/does work is willing to chime in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 20:03:07 2017 From: report at bugs.python.org (Michael Seifert) Date: Fri, 31 Mar 2017 00:03:07 +0000 Subject: [issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function" Message-ID: <1490918587.4.0.0607667805061.issue29951@psf.upfronthosting.co.za> New submission from Michael Seifert: Some exceptions thrown by `PyArg_ParseTupleAndKeywords` refer to "function" or "this function" even when a function name was specified. For example: >>> import bisect >>> bisect.bisect_right([1,2,3,4], 2, low=10) TypeError: 'low' is an invalid keyword argument for this function Wouldn't it be better to replace the "this function" part (if given) with the actual function name? ---------- messages: 290885 nosy: MSeifert priority: normal severity: normal status: open title: PyArg_ParseTupleAndKeywords exception messages containing "function" type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 20:04:42 2017 From: report at bugs.python.org (Michael Seifert) Date: Fri, 31 Mar 2017 00:04:42 +0000 Subject: [issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function" In-Reply-To: <1490918587.4.0.0607667805061.issue29951@psf.upfronthosting.co.za> Message-ID: <1490918682.9.0.0333768109949.issue29951@psf.upfronthosting.co.za> Changes by Michael Seifert : ---------- pull_requests: +816 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 21:46:53 2017 From: report at bugs.python.org (Dominic Mayers) Date: Fri, 31 Mar 2017 01:46:53 +0000 Subject: [issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself? In-Reply-To: <1490875733.83.0.750732897079.issue29947@psf.upfronthosting.co.za> Message-ID: <1490924813.27.0.985431031877.issue29947@psf.upfronthosting.co.za> Dominic Mayers added the comment: One way to make the factory optional is to offer a MixIn. I attached a file with a FactoryMixIn. It's just that I find it awkward that the proposed approach is to pass the extra parameters in a subclassed server. More modern approaches should also be offered. ---------- resolution: rejected -> status: closed -> open Added file: http://bugs.python.org/file46768/factorymixinclass _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 22:20:39 2017 From: report at bugs.python.org (Dominic Mayers) Date: Fri, 31 Mar 2017 02:20:39 +0000 Subject: [issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself? In-Reply-To: <1490875733.83.0.750732897079.issue29947@psf.upfronthosting.co.za> Message-ID: <1490926839.07.0.212547000009.issue29947@psf.upfronthosting.co.za> Dominic Mayers added the comment: Finally, I looked around and people just use the server to pass any extra parameter. I do find it awkward, but it works and it is simple, in fact simpler than having to define a factory object. I don't close it, because I will be happy to see another opinion. I would use this factory approach for myself, because I am just not comfortable to add an attribute to a server that would not even look at it, but maybe that it just me. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 22:21:00 2017 From: report at bugs.python.org (Dominic Mayers) Date: Fri, 31 Mar 2017 02:21:00 +0000 Subject: [issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself? In-Reply-To: <1490875733.83.0.750732897079.issue29947@psf.upfronthosting.co.za> Message-ID: <1490926860.18.0.919506344721.issue29947@psf.upfronthosting.co.za> Changes by Dominic Mayers : ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 23:16:56 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 31 Mar 2017 03:16:56 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1490930216.42.0.428724391306.issue29949@psf.upfronthosting.co.za> INADA Naoki added the comment: https://gist.github.com/methane/8faf12621cdb2166019bbcee65987e99 This patch fixes the regression. But I think it is still larger than idiomatic. See this code: code: minused *= 2; /* Find the smallest table size > minused. */ /* XXX speed-up with intrinsics */ for (newsize = PySet_MINSIZE; newsize <= minused && newsize > 0; newsize <<= 1) ; When original minused is X, newsize will be about 2X ~ 4X. For set.add(), preserving extra space for further add() make sense. But for set_merge(), intention is avoiding repeated resize while merging. There may be not "further add()", especially for `frozenset(s)`. So 30% ~ 60% seems better than 25% ~ 50%. How do you think, Raymond? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 23:22:25 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 31 Mar 2017 03:22:25 +0000 Subject: [issue29946] compiler warning "sqrtpi defined but not used" In-Reply-To: <1490862484.88.0.697244394269.issue29946@psf.upfronthosting.co.za> Message-ID: <1490930545.26.0.0809314027242.issue29946@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 23:24:46 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 31 Mar 2017 03:24:46 +0000 Subject: [issue29944] Argumentless super() calls do not work in classes constructed with type() In-Reply-To: <1490855809.89.0.267666010996.issue29944@psf.upfronthosting.co.za> Message-ID: <1490930686.43.0.994523797767.issue29944@psf.upfronthosting.co.za> Nick Coghlan added the comment: Right, there's a very similar instance-method-reuse related problem described in http://bugs.python.org/issue29270, where ctypes re-uses a class namespace is define a swapped-endianness version of the originally defined class. The easiest place to deflect conflicts is at the point where bound instance methods are created: >>> bound_method = MyList().insert >>> bound_method.__self__.__class__ >>> bound_method.__func__.__closure__[0].cell_contents >>> bound_method.__self__.__class__ is bound_method.__func__.__closure__[0].cell_contents False However, that method of detection only works for plain instance methods that only close over the `__class__` variable: as soon as you wrap them in a decorator, you may not have easy access to the `__closure__` attribute any more, and if the method has closure references to more than just `__class__`, then it's a bit more work to find the right closure index from outside the function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Mar 30 23:40:13 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Fri, 31 Mar 2017 03:40:13 +0000 Subject: [issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent Message-ID: <1490931613.41.0.406216073022.issue29952@psf.upfronthosting.co.za> New submission from Kinebuchi Tomohiko: In the section "6.10.1. Value comparisons" [1]_:: Equality comparison of the keys and elements enforces reflexivity. would be Equality comparison of the keys and values enforces reflexivity. because we usually call an entry of dict as "key-value pair". .. [1] https://docs.python.org/3.6/reference/expressions.html#value-comparisons ---------- assignee: docs at python components: Documentation messages: 290890 nosy: cocoatomo, docs at python priority: normal severity: normal status: open title: "keys and values" is preferred to "keys and elements" for name of dict constituent versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 00:04:04 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 31 Mar 2017 04:04:04 +0000 Subject: [issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490933044.22.0.503312409753.issue29881@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm +1 for _Py_SET_FINALIZED with the semantics Serhiy suggests, and +0 for _Py_SET_ONCE. My rationale for that preference is that _Py_SET_ONCE is a misnomer in the presence of * multiple Py_Initialize/Py_Finalize cycles; and/or * _Py_SETREF calls that replace the value to be finalized while _Py_SET_FINALIZED remains accurate in both cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 00:33:39 2017 From: report at bugs.python.org (Dominic Mayers) Date: Fri, 31 Mar 2017 04:33:39 +0000 Subject: [issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself? In-Reply-To: <1490875733.83.0.750732897079.issue29947@psf.upfronthosting.co.za> Message-ID: <1490934819.09.0.450306863376.issue29947@psf.upfronthosting.co.za> Dominic Mayers added the comment: On the other hand, it occurs to me that this seems way more flexible than passing the object through the server, because you share the factory with the server, not only the object. This means that you could even change the type of the handler while the server is running ! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 01:26:16 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 31 Mar 2017 05:26:16 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1490937976.14.0.389592149894.issue28810@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +817 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 01:31:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 05:31:20 +0000 Subject: [issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490938280.84.0.0646648663561.issue29881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I agree with your rationale Nick, but _Py_SET_FINALIZED is a little too long and highlight only the second function of the macro. I don't have good name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 01:34:14 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Fri, 31 Mar 2017 05:34:14 +0000 Subject: [issue29725] sqlite3.Cursor doesn't properly document "arraysize" In-Reply-To: <1488732449.69.0.822466282685.issue29725@psf.upfronthosting.co.za> Message-ID: <1490938454.76.0.723659078596.issue29725@psf.upfronthosting.co.za> Changes by Aviv Palivoda : ---------- nosy: +palaviv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 01:40:43 2017 From: report at bugs.python.org (Kinebuchi Tomohiko) Date: Fri, 31 Mar 2017 05:40:43 +0000 Subject: [issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent In-Reply-To: <1490931613.41.0.406216073022.issue29952@psf.upfronthosting.co.za> Message-ID: <1490938843.64.0.495631468961.issue29952@psf.upfronthosting.co.za> Changes by Kinebuchi Tomohiko : ---------- pull_requests: +818 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 01:45:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 05:45:57 +0000 Subject: [issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function" In-Reply-To: <1490918587.4.0.0607667805061.issue29951@psf.upfronthosting.co.za> Message-ID: <1490939157.32.0.670814818236.issue29951@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM in general. I was going to make similar changes. While we a here, maybe add the function name to other TypeError messages specific to the function? "Required argument '%U' (pos %d) not found" and "Argument given by name ('%U') and position (%d)", but not to "keywords must be strings". Classified this as an enhancement. ---------- components: +Interpreter Core nosy: +serhiy.storchaka stage: -> patch review type: behavior -> enhancement versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 01:48:51 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 31 Mar 2017 05:48:51 +0000 Subject: [issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent In-Reply-To: <1490931613.41.0.406216073022.issue29952@psf.upfronthosting.co.za> Message-ID: <1490939331.72.0.49872279153.issue29952@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset cdcac039fb447f2ab04efcacbe663751bb2cb4ec by INADA Naoki (cocoatomo) in branch 'master': bpo-29952: Use usual terminology of dict (GH-917) https://github.com/python/cpython/commit/cdcac039fb447f2ab04efcacbe663751bb2cb4ec ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 02:10:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 06:10:48 +0000 Subject: [issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function" In-Reply-To: <1490918587.4.0.0607667805061.issue29951@psf.upfronthosting.co.za> Message-ID: <1490940648.02.0.439079275229.issue29951@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And while we are here, please change "keywords must be strings" to "keyword arguments must be strings" as in PyArg_ValidateKeywordArguments(). And maybe make all TypeError messages starting from a lower letter for uniformity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 02:19:44 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 31 Mar 2017 06:19:44 +0000 Subject: [issue29881] Add a new private API clear private variables, which are initialized once, at Python shutdown In-Reply-To: <1490201009.64.0.544065179107.issue29881@psf.upfronthosting.co.za> Message-ID: <1490941184.11.0.181947342006.issue29881@psf.upfronthosting.co.za> Nick Coghlan added the comment: _PY_SET_FINALIZED is only one letter longer than _PY_ONCEVAR_INIT and the same length as the originally proposed _PY_STATICVAR_INIT. Since it shouldn't be anywhere near as common as _Py_SETREF, I'm also okay in general with trading a bit of brevity for accuracy. However, I don't want to trade away *too* much brevity, so I think we're going to have to choose between reminding readers of "this is finalized in Py_Finalize" or "this is a no-op if the target is already set", and leave the other aspect implicit. In addition to the correctness argument above, my rationale for now favouring the former is that the logical leap in "this is finalized in Py_Finalize, so the assigned expression will only be executed once per Py_Initialize call" seems more reasonable to me than the one in "the assigned expression is only executed once per Py_Initialize call, so it will be finalized in Py_Finalize". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 02:35:15 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 31 Mar 2017 06:35:15 +0000 Subject: [issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent In-Reply-To: <1490931613.41.0.406216073022.issue29952@psf.upfronthosting.co.za> Message-ID: <1490942115.91.0.571294512554.issue29952@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +819 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 02:36:12 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 31 Mar 2017 06:36:12 +0000 Subject: [issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent In-Reply-To: <1490931613.41.0.406216073022.issue29952@psf.upfronthosting.co.za> Message-ID: <1490942172.54.0.513496138372.issue29952@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +820 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 02:37:43 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 31 Mar 2017 06:37:43 +0000 Subject: [issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent In-Reply-To: <1490931613.41.0.406216073022.issue29952@psf.upfronthosting.co.za> Message-ID: <1490942263.7.0.190098663706.issue29952@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +821 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 02:43:12 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 31 Mar 2017 06:43:12 +0000 Subject: [issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent In-Reply-To: <1490931613.41.0.406216073022.issue29952@psf.upfronthosting.co.za> Message-ID: <1490942592.91.0.249806595527.issue29952@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 4c75fbb485c0e42181aab95c2ae92c597915827c by INADA Naoki in branch '3.6': bpo-29952: Use usual terminology of dict (GH-922) https://github.com/python/cpython/commit/4c75fbb485c0e42181aab95c2ae92c597915827c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 02:43:37 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 31 Mar 2017 06:43:37 +0000 Subject: [issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent In-Reply-To: <1490931613.41.0.406216073022.issue29952@psf.upfronthosting.co.za> Message-ID: <1490942617.11.0.471198888827.issue29952@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset f3158121132a1519439bf4c7dba3333b07802d6d by INADA Naoki in branch '3.5': bpo-29952: Use usual terminology of dict (GH-923) https://github.com/python/cpython/commit/f3158121132a1519439bf4c7dba3333b07802d6d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 02:53:27 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 31 Mar 2017 06:53:27 +0000 Subject: [issue29952] "keys and values" is preferred to "keys and elements" for name of dict constituent In-Reply-To: <1490931613.41.0.406216073022.issue29952@psf.upfronthosting.co.za> Message-ID: <1490943207.84.0.444315804755.issue29952@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 5aa913d72317d7632781fb71a7b45a2b5e31558e by INADA Naoki in branch '2.7': bpo-29952: Use usual terminology of dict (GH-924) https://github.com/python/cpython/commit/5aa913d72317d7632781fb71a7b45a2b5e31558e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 05:12:21 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 31 Mar 2017 09:12:21 +0000 Subject: [issue28810] Document bytecode changes in 3.6 In-Reply-To: <1480184644.53.0.660721117392.issue28810@psf.upfronthosting.co.za> Message-ID: <1490951541.03.0.377065459757.issue28810@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 0a17e584461b14ff65ec287048f53911dbb22222 by Mariatta in branch '3.6': bpo-28810: Update lnotab_notes.txt (GH-665) (GH-919) https://github.com/python/cpython/commit/0a17e584461b14ff65ec287048f53911dbb22222 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 05:24:26 2017 From: report at bugs.python.org (Michael Seifert) Date: Fri, 31 Mar 2017 09:24:26 +0000 Subject: [issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function" In-Reply-To: <1490918587.4.0.0607667805061.issue29951@psf.upfronthosting.co.za> Message-ID: <1490952266.41.0.646798870246.issue29951@psf.upfronthosting.co.za> Michael Seifert added the comment: Thank you for the suggestions, I added them to the PR. If you want But are you sure about the "keywords must be strings" -> "keyword arguments must be strings" change? I always thought the key is the "keyword" and the value the "(keyword) argument". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 05:27:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 09:27:11 +0000 Subject: [issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function" In-Reply-To: <1490918587.4.0.0607667805061.issue29951@psf.upfronthosting.co.za> Message-ID: <1490952431.26.0.16273390649.issue29951@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Martin, could you please take a look? Does the wording of error messages look good English? Do you have to suggest some enhancements? ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 05:36:40 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 09:36:40 +0000 Subject: [issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function" In-Reply-To: <1490918587.4.0.0607667805061.issue29951@psf.upfronthosting.co.za> Message-ID: <1490953000.93.0.0931591786478.issue29951@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > But are you sure about the "keywords must be strings" -> "keyword arguments must be strings" change? I always thought the key is the "keyword" and the value the "(keyword) argument". Now, after you have made change, I have doubts. Yes, it looks ambiguous. Maybe "keyword names"? Martin, David, what are your thoughts? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 06:26:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 10:26:04 +0000 Subject: [issue29902] copy breaks staticmethod In-Reply-To: <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za> Message-ID: <1490955964.19.0.146170192996.issue29902@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +822 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 06:31:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 10:31:09 +0000 Subject: [issue29902] copy breaks staticmethod In-Reply-To: <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za> Message-ID: <1490956269.04.0.327615711126.issue29902@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue was fixed by issue22995 in 3.6. But for some reasons the general solution was not applied to 3.5 and 2.7. Proposed patch makes staticmethod, classmethod and property descriptors explicitly non-pickleable (as was made explicitly non-pickleable file-like object) in 3.5. Only tests will be foreported to 3.6 and 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 07:11:54 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 31 Mar 2017 11:11:54 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1490958714.35.0.158680414352.issue29949@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 07:25:48 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 31 Mar 2017 11:25:48 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1490959548.71.0.536554306777.issue29949@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll look at this over the next week or two. I don't really like the proposed patch at all but will carefully think through the speed/space trade-offs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 08:02:46 2017 From: report at bugs.python.org (Martin Panter) Date: Fri, 31 Mar 2017 12:02:46 +0000 Subject: [issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function" In-Reply-To: <1490918587.4.0.0607667805061.issue29951@psf.upfronthosting.co.za> Message-ID: <1490961766.39.0.560147609883.issue29951@psf.upfronthosting.co.za> Martin Panter added the comment: In this test, ?keyword arguments? is definitely wrong: >>> f(**{1:2}) -TypeError: f() keywords must be strings +TypeError: f() keyword arguments must be strings To me, a keyword argument is a _value_ passed in using the f(name=. . .) syntax, and the keyword is the name that identifies it (usually becomes a parameter name in the function implementation). So I think the original was better. But if you think the original can be confusing, ?keyword names? would also work. The other messages look okay to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 08:18:06 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 31 Mar 2017 12:18:06 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1490962686.0.0.793934068844.issue29949@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Hmm, I wonder why I'm not seeing the same sizes you are seeing. $ cat setsize.py from sys import getsizeof print( [getsizeof(frozenset(range(n))) for n in range(20)] ) $ python3.4 setsize.py [224, 224, 224, 224, 224, 224, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736] $ python3.5 setsize.py [224, 224, 224, 224, 224, 224, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736] $ python3.6 setsize.py [224, 224, 224, 224, 224, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736] $ python3.4 --version Python 3.4.4 $ python3.5 --version Python 3.5.3 $ python3.6 --version Python 3.6.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 08:22:41 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 31 Mar 2017 12:22:41 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1490962961.77.0.936887275749.issue29949@psf.upfronthosting.co.za> INADA Naoki added the comment: See set_update_internal(). https://github.com/python/cpython/blob/master/Objects/setobject.c#L969-L1016 This happens only when iterable is set or dict. >>> import sys >>> sys.getsizeof(set(range(10))) 736 >>> sys.getsizeof(set(set(range(10)))) 1248 >>> sys.getsizeof(set(dict.fromkeys(range(10)))) 1248 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 08:22:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 12:22:46 +0000 Subject: [issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function" In-Reply-To: <1490918587.4.0.0607667805061.issue29951@psf.upfronthosting.co.za> Message-ID: <1490962966.31.0.375705475202.issue29951@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I agree. PyArg_ValidateKeywordArguments() fooled me. Now I see that it would be better to change only PyArg_ValidateKeywordArguments(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 08:28:43 2017 From: report at bugs.python.org (Jim Fasarakis-Hilliard) Date: Fri, 31 Mar 2017 12:28:43 +0000 Subject: [issue29377] Add the 'wrapper_descriptor' type to the types module In-Reply-To: <1485425778.09.0.153066086326.issue29377@psf.upfronthosting.co.za> Message-ID: <1490963323.45.0.514536800106.issue29377@psf.upfronthosting.co.za> Changes by Jim Fasarakis-Hilliard : ---------- pull_requests: +823 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 08:50:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 12:50:37 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1490964637.59.0.119919331227.issue29949@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: $ ./python -c 'N = 6000; from sys import getsizeof; s = [getsizeof(frozenset(range(n))) for n in range(N)]; print( [(n, s[n]) for n in range(N) if not n or s[n] != s[n-1]] )' 3.5: [(0, 112), (6, 368), (22, 1136), (86, 4208), (342, 16496), (1366, 65648), (5462, 262256)] 3.6: [(0, 112), (5, 368), (21, 1136), (85, 4208), (341, 16496), (1365, 65648), (5461, 262256)] 3.7: [(0, 112), (5, 368), (19, 1136), (77, 4208), (307, 16496), (1229, 65648), (4915, 262256)] $ ./python -c 'N = 6000; from sys import getsizeof; s = [getsizeof(frozenset(set(range(n)))) for n in range(N)]; print( [(n, s[n]) for n in range(N) if not n or s[n] != s[n-1]] )' 3.5: [(0, 112), (6, 240), (8, 368), (16, 624), (32, 1136), (64, 2160), (128, 4208), (256, 8304), (512, 16496), (1024, 32880), (2048, 65648), (4096, 131184)] 3.6: [(0, 112), (5, 368), (8, 624), (16, 1136), (32, 2160), (64, 4208), (128, 8304), (256, 16496), (512, 32880), (1024, 65648), (2048, 131184), (4096, 262256)] 3.7: [(0, 112), (5, 368), (8, 624), (16, 1136), (32, 2160), (64, 4208), (128, 8304), (256, 16496), (512, 32880), (1024, 65648), (2048, 131184), (4096, 262256)] frozenset(range(n)) is slightly larger in 3.7 than in 3.6. It is 4 times larger for about 10% of sizes. frozenset(set(range(n))) is 2 times larger in 3.6 than in 3.5 for all sizes >= 16. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 08:52:51 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 31 Mar 2017 12:52:51 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1490964771.35.0.0976968826174.issue29949@psf.upfronthosting.co.za> INADA Naoki added the comment: > frozenset(range(n)) is slightly larger in 3.7 than in 3.6. It is 4 times larger for about 10% of sizes. This is intensional: https://github.com/python/cpython/commit/5cd87a8d61246b0a6233bfb8503d4718b693cef0 load factor is reduced from 66% to 60%. (-10%) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 09:44:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 13:44:25 +0000 Subject: [issue29953] Memory leak in the replace() method of datetime and time objects Message-ID: <1490967865.61.0.513039272437.issue29953@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: When pass out of bound keyword argument fold to datetime.datetime.replace() or datetime.time.replace(), ValueError is raised and just allocated object is leaked. Proposed patch fixes the leaks. ---------- components: Extension Modules messages: 290913 nosy: belopolsky, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Memory leak in the replace() method of datetime and time objects type: resource usage versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 09:46:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 13:46:36 +0000 Subject: [issue29953] Memory leak in the replace() method of datetime and time objects In-Reply-To: <1490967865.61.0.513039272437.issue29953@psf.upfronthosting.co.za> Message-ID: <1490967996.85.0.938859811382.issue29953@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +824 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 11:10:42 2017 From: report at bugs.python.org (Aviv Palivoda) Date: Fri, 31 Mar 2017 15:10:42 +0000 Subject: [issue29725] sqlite3.Cursor doesn't properly document "arraysize" In-Reply-To: <1488732449.69.0.822466282685.issue29725@psf.upfronthosting.co.za> Message-ID: <1490973042.9.0.801127027976.issue29725@psf.upfronthosting.co.za> Aviv Palivoda added the comment: Hi Cheryl, the arraysize value can be set by doing: >>> cursor.array = 5 For example I can do the following >>> import sqlite3 >>> s = sqlite3.connect(":memory:") >>> s.execute("create table a(a,b)") >>> s.execute("insert into a(a,b) values (1,2)") >>> s.execute("insert into a(a,b) values (3,4)") >>> c = s.cursor() # Array size is 1 >>> c.execute("select * from a") >>> c.fetchmany() [(1, 2)] >>> c.fetchmany() [(3, 4)] >>> c.arraysize = 2 # Change array size >>> c.fetchmany() [(1, 2), (3, 4)] As you can see the arraysize set the number of results the fetchmany will return. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 11:24:31 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 31 Mar 2017 15:24:31 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1490973871.41.0.804877404012.issue29949@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think the best thing to do is to undo the refactoring in https://github.com/python/cpython/commit/4897300276d870f99459c82b937f0ac22450f0b6 . It is was intended be neutral but did affect set_update_internal() for small sets. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 11:39:01 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 31 Mar 2017 15:39:01 +0000 Subject: [issue28157] Document time module constants (timezone, tzname, etc.) as deprecated. In-Reply-To: <1473880626.53.0.480703935063.issue28157@psf.upfronthosting.co.za> Message-ID: <1490974741.75.0.839965832055.issue28157@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +825 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 11:43:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 15:43:45 +0000 Subject: [issue29897] itertools.chain behaves strangly when copied with copy.copy In-Reply-To: <1490382866.15.0.806348806156.issue29897@psf.upfronthosting.co.za> Message-ID: <1490975025.22.0.636479345073.issue29897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue is related to the behavior of other composite iterators. >>> from copy import copy >>> it = map(ord, 'abc') >>> list(copy(it)) [97, 98, 99] >>> list(copy(it)) [] >>> it = filter(None, 'abc') >>> list(copy(it)) ['a', 'b', 'c'] >>> list(copy(it)) [] The copy is too shallow. If you consume an item from one copy, it is disappeared for the original. Compare with the behavior of iterators of builtin sequences: >>> it = iter('abc') >>> list(copy(it)) ['a', 'b', 'c'] >>> list(copy(it)) ['a', 'b', 'c'] >>> it = iter(list('abc')) >>> list(copy(it)) ['a', 'b', 'c'] >>> list(copy(it)) ['a', 'b', 'c'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 11:59:13 2017 From: report at bugs.python.org (Michael Seifert) Date: Fri, 31 Mar 2017 15:59:13 +0000 Subject: [issue29897] itertools.chain behaves strangly when copied with copy.copy In-Reply-To: <1490382866.15.0.806348806156.issue29897@psf.upfronthosting.co.za> Message-ID: <1490975953.29.0.0522158525079.issue29897@psf.upfronthosting.co.za> Michael Seifert added the comment: Just an update what doesn't work: just overriding the `__copy__` method. I tried it but it somewhat breaks `itertools.tee` because if the passed iterable has a `__copy__` method `tee` rather copies the iterator (=> resulting in a lot of unnecessary memory overhead or breakage if a generator is "inside") instead of using it's memory-efficient internals. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:03:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 16:03:43 +0000 Subject: [issue29897] itertools.chain behaves strangly when copied with copy.copy In-Reply-To: <1490382866.15.0.806348806156.issue29897@psf.upfronthosting.co.za> Message-ID: <1490976223.77.0.650188918759.issue29897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Just for example there is a patch that implements in Python deeper copying for itertools.chain objects. I doesn't mean pushing it, it is too complicated. I have wrote also slightly simpler implementation, but it doesn't work due to the behavior of copied map object. ---------- keywords: +patch Added file: http://bugs.python.org/file46769/itertools-chain-copy.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:14:43 2017 From: report at bugs.python.org (Thomas Wouters) Date: Fri, 31 Mar 2017 16:14:43 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490976883.09.0.0688301073126.issue29941@psf.upfronthosting.co.za> Thomas Wouters added the comment: New changeset a00c3fd12d421e41b769debd7df717d17b0deed5 by T. Wouters in branch 'master': bpo-29941: Assert fixes (#886) https://github.com/python/cpython/commit/a00c3fd12d421e41b769debd7df717d17b0deed5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:16:51 2017 From: report at bugs.python.org (Thomas Wouters) Date: Fri, 31 Mar 2017 16:16:51 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490977011.05.0.612766439408.issue29941@psf.upfronthosting.co.za> Thomas Wouters added the comment: This needs some measure of backporting, now that it's just build-time fixes. I'll take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:31:36 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 31 Mar 2017 16:31:36 +0000 Subject: [issue29725] sqlite3.Cursor doesn't properly document "arraysize" In-Reply-To: <1488732449.69.0.822466282685.issue29725@psf.upfronthosting.co.za> Message-ID: <1490977896.51.0.0479693936022.issue29725@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Hi Aviv, Thank you so much for explaining that! It's obvious to me now. It wasn't marked as READ ONLY in the program, so of course it would set by the caller. I'll be able to document that. I still have the question about this line in fetchall - " Note that the cursor?s arraysize attribute can affect the performance of this operation. " I don't see arraysize referenced in that function. I must be missing something else, but if it's not used, then maybe I should remove that line? One other question -- There is another attribute called row_factory in the cursor structure that isn't in the docs. There is a row_factory defined in the docs, but that one is for the connection structure. Should it be added under cursor as well? Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:35:45 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 31 Mar 2017 16:35:45 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490978145.06.0.876500886094.issue29941@psf.upfronthosting.co.za> Zachary Ware added the comment: This seems to have seriously broken a few buildbots: http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%203.x/builds/539 http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/builds/120 http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/578 ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:35:59 2017 From: report at bugs.python.org (Petr Zemek) Date: Fri, 31 Mar 2017 16:35:59 +0000 Subject: [issue29954] multiprocessing.Pool.__exit__() calls terminate() instead of close() Message-ID: <1490978159.71.0.789108610011.issue29954@psf.upfronthosting.co.za> New submission from Petr Zemek: multiprocessing.Pool.__exit__() calls terminate() instead of close(). Why? Wouldn't it be better (and more expected from a user's point of view) if it called close()? Reasons: - Calling close() would wait until all tasks are completed before shutting down the pool instead of terminating them abruptly when some of them may still be running. - concurrent.futures.ProcessPoolExecutor.__exit__() calls shutdown(wait=True), which waits until all tasks are finished. In this regard, the behavior of Pool.__exit__() is inconsistent. See also this comment by Dan O'Reilly (http://bugs.python.org/msg242120), who expressed an identical concern two years ago. ---------- components: Library (Lib) messages: 290923 nosy: s3rvac priority: normal severity: normal status: open title: multiprocessing.Pool.__exit__() calls terminate() instead of close() type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:07 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:07 +0000 Subject: [issue27955] getrandom() syscall returning EPERM make the system unusable. In-Reply-To: <1473081937.73.0.0253643547204.issue27955@psf.upfronthosting.co.za> Message-ID: <1490978167.19.0.473418970463.issue27955@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +826 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:07 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:07 +0000 Subject: [issue28918] cross compiling xxlimited fails with "Py_LIMITED_API is incompatible with Py_DEBUG" In-Reply-To: <1481273483.19.0.548102187262.issue28918@psf.upfronthosting.co.za> Message-ID: <1490978167.25.0.0384989902106.issue28918@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +827 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:07 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:07 +0000 Subject: [issue19542] WeakValueDictionary bug in setdefault()&pop() In-Reply-To: <1384073464.47.0.0676946313386.issue19542@psf.upfronthosting.co.za> Message-ID: <1490978167.32.0.571929437974.issue19542@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +828 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:07 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:07 +0000 Subject: [issue28762] lockf() is available now on Android API level 24, but the F_LOCK macro is not defined In-Reply-To: <1479723589.5.0.525775136475.issue28762@psf.upfronthosting.co.za> Message-ID: <1490978167.43.0.884137944067.issue28762@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +829 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:07 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:07 +0000 Subject: [issue19717] resolve() fails when the path doesn't exist In-Reply-To: <1385142353.37.0.842056066182.issue19717@psf.upfronthosting.co.za> Message-ID: <1490978167.58.0.635974297859.issue19717@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +830 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:07 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:07 +0000 Subject: [issue29192] Remove deprecated features from http.cookies In-Reply-To: <1483787527.13.0.320164851178.issue29192@psf.upfronthosting.co.za> Message-ID: <1490978167.79.0.504399335657.issue29192@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +831 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:07 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:07 +0000 Subject: [issue29193] Remove support of format_string as keyword argument in string.Formatter().format() In-Reply-To: <1483788911.55.0.222681922661.issue29193@psf.upfronthosting.co.za> Message-ID: <1490978167.89.0.708287464694.issue29193@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +832 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:07 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:07 +0000 Subject: [issue25464] Tix HList header_exists should be "exist" In-Reply-To: <1445555946.1.0.542845821493.issue25464@psf.upfronthosting.co.za> Message-ID: <1490978167.96.0.389021787437.issue25464@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +833 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:08 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:08 +0000 Subject: [issue28991] Fix obscure lru_cache reentrancy bug In-Reply-To: <1481914757.29.0.923999616367.issue28991@psf.upfronthosting.co.za> Message-ID: <1490978168.04.0.337383533501.issue28991@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +834 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:08 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:08 +0000 Subject: [issue29197] Remove os.path.splitunc() In-Reply-To: <1483809458.59.0.701425626614.issue29197@psf.upfronthosting.co.za> Message-ID: <1490978168.11.0.799854216336.issue29197@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +835 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:08 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:08 +0000 Subject: [issue29368] Optimize unpickling list-like objects: use extend() instead of append() In-Reply-To: <1485338150.33.0.560817507263.issue29368@psf.upfronthosting.co.za> Message-ID: <1490978168.18.0.231311257451.issue29368@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +836 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:08 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:08 +0000 Subject: [issue29219] TracebackException(capture_locals=True) may fail with RecursionError In-Reply-To: <1484012610.3.0.9642464783.issue29219@psf.upfronthosting.co.za> Message-ID: <1490978168.26.0.182538152367.issue29219@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +837 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:08 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:08 +0000 Subject: [issue28509] dict.update allocates too much In-Reply-To: <1477163617.95.0.961480932723.issue28509@psf.upfronthosting.co.za> Message-ID: <1490978168.45.0.864180404304.issue28509@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:08 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:08 +0000 Subject: [issue29218] distutils: Remove unused install_misc class In-Reply-To: <1484002873.56.0.81761190557.issue29218@psf.upfronthosting.co.za> Message-ID: <1490978168.36.0.441690637979.issue29218@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +838 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:08 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:08 +0000 Subject: [issue28950] regrtest: -j0 fails the check -j is not allowed together with -T/-l In-Reply-To: <1481566513.26.0.47817718709.issue28950@psf.upfronthosting.co.za> Message-ID: <1490978168.65.0.603173545829.issue28950@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +841 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:08 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:08 +0000 Subject: [issue9770] curses.ascii.isblank() function is broken. It confuses backspace (BS 0x08) with tab (0x09) In-Reply-To: <1283558509.74.0.494754089018.issue9770@psf.upfronthosting.co.za> Message-ID: <1490978168.56.0.803694876499.issue9770@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +840 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:08 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:08 +0000 Subject: [issue29463] Add `docstring` field to AST nodes In-Reply-To: <1486390876.35.0.496966996959.issue29463@psf.upfronthosting.co.za> Message-ID: <1490978168.76.0.320856560091.issue29463@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +842 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:08 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:08 +0000 Subject: [issue29367] python-gdb: display wrapper_call() In-Reply-To: <1485336576.45.0.391174330106.issue29367@psf.upfronthosting.co.za> Message-ID: <1490978168.95.0.0322995193541.issue29367@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +844 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:08 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:08 +0000 Subject: [issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike` In-Reply-To: <1487418512.16.0.401961352482.issue28624@psf.upfronthosting.co.za> Message-ID: <1490978168.87.0.0214982300818.issue28624@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +843 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:09 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:09 +0000 Subject: [issue28621] Refactor duplicate code calculating digit's bit length In-Reply-To: <1478374648.81.0.502575461924.issue28621@psf.upfronthosting.co.za> Message-ID: <1490978169.05.0.834202024971.issue28621@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +845 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:09 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:09 +0000 Subject: [issue19398] test_trace fails with -S In-Reply-To: <1382730233.11.0.30990585871.issue19398@psf.upfronthosting.co.za> Message-ID: <1490978169.13.0.877442977162.issue19398@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +846 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:09 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:09 +0000 Subject: [issue29695] Weird keyword parameter names in builtins In-Reply-To: <1488466444.68.0.907226246044.issue29695@psf.upfronthosting.co.za> Message-ID: <1490978169.23.0.154632392444.issue29695@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:09 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:09 +0000 Subject: [issue27778] PEP 524: Add os.getrandom() In-Reply-To: <1471368341.7.0.188364803995.issue27778@psf.upfronthosting.co.za> Message-ID: <1490978169.32.0.71845330795.issue27778@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +848 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:09 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:09 +0000 Subject: [issue28427] WeakValueDictionary next bug (with multithreading) In-Reply-To: <1476354989.22.0.575160455599.issue28427@psf.upfronthosting.co.za> Message-ID: <1490978169.42.0.434729133854.issue28427@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +849 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:09 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:09 +0000 Subject: [issue28426] PyUnicode_AsDecodedObject can only return unicode now In-Reply-To: <1476333006.27.0.165344919585.issue28426@psf.upfronthosting.co.za> Message-ID: <1490978169.53.0.790414698496.issue28426@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +850 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:09 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:09 +0000 Subject: [issue28183] Clean up and speed up dict iteration In-Reply-To: <1474063807.66.0.276436600383.issue28183@psf.upfronthosting.co.za> Message-ID: <1490978169.75.0.252815588474.issue28183@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +852 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:09 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:09 +0000 Subject: [issue28350] Interning string constants with null character In-Reply-To: <1475522616.74.0.369918481264.issue28350@psf.upfronthosting.co.za> Message-ID: <1490978169.85.0.590275838151.issue28350@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +853 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:09 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:09 +0000 Subject: [issue28353] os.fwalk() unhandled exception when error occurs accessing symbolic link target In-Reply-To: <1475564816.03.0.238756399525.issue28353@psf.upfronthosting.co.za> Message-ID: <1490978169.66.0.150387322524.issue28353@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +851 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:10 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:10 +0000 Subject: [issue28969] lru_cache is not threadsafe In-Reply-To: <1481712564.52.0.530922236321.issue28969@psf.upfronthosting.co.za> Message-ID: <1490978170.04.0.856740131209.issue28969@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +855 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:09 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:09 +0000 Subject: [issue29615] SimpleXMLRPCDispatcher._dispatch mangles tracebacks when invoking RPC calls through _dispatch In-Reply-To: <1487709025.37.0.198613157816.issue29615@psf.upfronthosting.co.za> Message-ID: <1490978169.96.0.76422266897.issue29615@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +854 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:10 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:10 +0000 Subject: [issue28748] Make _Py_PackageContext of type "const char *" In-Reply-To: <1479634320.59.0.400146468836.issue28748@psf.upfronthosting.co.za> Message-ID: <1490978170.16.0.146933933663.issue28748@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +856 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:10 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:10 +0000 Subject: [issue20766] reference leaks in pdb In-Reply-To: <1393326154.87.0.194575074306.issue20766@psf.upfronthosting.co.za> Message-ID: <1490978170.38.0.0155439953247.issue20766@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +858 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:10 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:10 +0000 Subject: [issue26273] Expose TCP_CONGESTION and TCP_USER_TIMEOUT to the socket module In-Reply-To: <1454489684.49.0.598051421532.issue26273@psf.upfronthosting.co.za> Message-ID: <1490978170.23.0.380699117641.issue26273@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +857 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:10 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:10 +0000 Subject: [issue28583] PyDict_SetDefault doesn't combine split table when needed In-Reply-To: <1478025224.61.0.330385360884.issue28583@psf.upfronthosting.co.za> Message-ID: <1490978170.52.0.325543351529.issue28583@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +859 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:10 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:10 +0000 Subject: [issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings In-Reply-To: <1473749735.07.0.359680040874.issue28114@psf.upfronthosting.co.za> Message-ID: <1490978170.67.0.846588957278.issue28114@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +861 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:10 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:10 +0000 Subject: [issue28746] cannot set_inheritable() for a file descriptor on Android In-Reply-To: <1479565173.32.0.268004385274.issue28746@psf.upfronthosting.co.za> Message-ID: <1490978170.6.0.963312684138.issue28746@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +860 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:10 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:10 +0000 Subject: [issue28740] Add sys.getandroidapilevel() In-Reply-To: <1479504395.69.0.761590307394.issue28740@psf.upfronthosting.co.za> Message-ID: <1490978170.82.0.997808250878.issue28740@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +862 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:10 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:10 +0000 Subject: [issue16285] Update urllib quoting to RFC 3986 In-Reply-To: <1350644168.93.0.364254038155.issue16285@psf.upfronthosting.co.za> Message-ID: <1490978170.93.0.886068479116.issue16285@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +863 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:11 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:11 +0000 Subject: [issue28164] _PyIO_get_console_type fails for various paths In-Reply-To: <1473911463.84.0.00788793507165.issue28164@psf.upfronthosting.co.za> Message-ID: <1490978171.19.0.241692951614.issue28164@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +865 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:11 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:11 +0000 Subject: [issue10656] "Out of tree" build fails on AIX In-Reply-To: <1291865704.62.0.494509897126.issue10656@psf.upfronthosting.co.za> Message-ID: <1490978171.08.0.701535752981.issue10656@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +864 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:11 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:11 +0000 Subject: [issue26944] test_posix: Android 'id -G' is entirely wrong or missing the effective gid In-Reply-To: <1462348873.26.0.373017977506.issue26944@psf.upfronthosting.co.za> Message-ID: <1490978171.28.0.498149668297.issue26944@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +866 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:11 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:11 +0000 Subject: [issue20211] setup.py: do not add system header locations when cross compiling In-Reply-To: <1389308528.92.0.403642458985.issue20211@psf.upfronthosting.co.za> Message-ID: <1490978171.4.0.952749693429.issue20211@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +867 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:11 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:11 +0000 Subject: [issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict In-Reply-To: <1473351940.28.0.277088210884.issue28023@psf.upfronthosting.co.za> Message-ID: <1490978171.52.0.835141733928.issue28023@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +868 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:11 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:11 +0000 Subject: [issue27599] Buffer overrun in binascii In-Reply-To: <1469291492.89.0.37008226611.issue27599@psf.upfronthosting.co.za> Message-ID: <1490978171.58.0.260596804444.issue27599@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +869 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:11 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:11 +0000 Subject: [issue26939] android: test_functools hangs on armv7 In-Reply-To: <1462289866.52.0.349587333392.issue26939@psf.upfronthosting.co.za> Message-ID: <1490978171.72.0.379722071895.issue26939@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +871 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:11 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:11 +0000 Subject: [issue28985] sqlite3 authorizer codes constants not up to date In-Reply-To: <1481858693.19.0.888054078986.issue28985@psf.upfronthosting.co.za> Message-ID: <1490978171.65.0.986743659287.issue28985@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +870 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:11 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:11 +0000 Subject: [issue28538] _socket module cross-compilation error on android-24 In-Reply-To: <1477474733.85.0.0781476042155.issue28538@psf.upfronthosting.co.za> Message-ID: <1490978171.86.0.867748815286.issue28538@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +872 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:11 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:11 +0000 Subject: [issue21578] Misleading error message when ImportError called with invalid keyword args In-Reply-To: <1401078695.26.0.813929580296.issue21578@psf.upfronthosting.co.za> Message-ID: <1490978171.94.0.421251064813.issue21578@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +873 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:12 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:12 +0000 Subject: [issue26937] the chown() method of the tarfile.TarFile class fails on Android In-Reply-To: <1462288467.92.0.772791237683.issue26937@psf.upfronthosting.co.za> Message-ID: <1490978172.06.0.121981512372.issue26937@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +874 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:12 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:12 +0000 Subject: [issue28822] Fix indices handling in PyUnicode_FindChar In-Reply-To: <1480350558.9.0.582516213925.issue28822@psf.upfronthosting.co.za> Message-ID: <1490978172.14.0.831728925957.issue28822@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +875 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:12 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:12 +0000 Subject: [issue28532] Show sys.version when -V option is supplied twice. In-Reply-To: <1477417861.44.0.42778795289.issue28532@psf.upfronthosting.co.za> Message-ID: <1490978172.22.0.65394591078.issue28532@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +876 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:12 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:12 +0000 Subject: [issue28163] WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle In-Reply-To: <1473909981.28.0.381163712265.issue28163@psf.upfronthosting.co.za> Message-ID: <1490978172.32.0.963430737018.issue28163@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +877 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:12 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:12 +0000 Subject: [issue28488] shutil.make_archive (xxx, zip, root_dir) is adding './' entry to archive which is wrong In-Reply-To: <1476968870.46.0.0294634101167.issue28488@psf.upfronthosting.co.za> Message-ID: <1490978172.41.0.821247773151.issue28488@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +878 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:12 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:12 +0000 Subject: [issue29210] Remove the support of the exclude argument in tarfile.TarFile.add() In-Reply-To: <1483899747.86.0.0120992057455.issue29210@psf.upfronthosting.co.za> Message-ID: <1490978172.51.0.612562655649.issue29210@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +879 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:12 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:12 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1490978172.62.0.964947965056.issue26081@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +881 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:12 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:12 +0000 Subject: [issue29684] Minor regression in PyEval_CallObjectWithKeywords() In-Reply-To: <1488360000.25.0.226175161117.issue29684@psf.upfronthosting.co.za> Message-ID: <1490978172.58.0.36920121762.issue29684@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +880 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:12 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:12 +0000 Subject: [issue25895] urllib.parse.urljoin does not handle WebSocket URLs In-Reply-To: <1450331933.69.0.301225840177.issue25895@psf.upfronthosting.co.za> Message-ID: <1490978172.87.0.359446714275.issue25895@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +883 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:12 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:12 +0000 Subject: [issue29683] _PyCode_SetExtra behaviour wrong on allocation failure and after realloc In-Reply-To: <1488358332.92.0.449242887398.issue29683@psf.upfronthosting.co.za> Message-ID: <1490978172.81.0.119699440441.issue29683@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +882 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:12 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:12 +0000 Subject: [issue29034] Fix memory leak and use-after-free in path_converter In-Reply-To: <1482316498.7.0.932585385435.issue29034@psf.upfronthosting.co.za> Message-ID: <1490978172.98.0.755790702797.issue29034@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +884 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:13 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:13 +0000 Subject: [issue28739] PEP 498: docstrings as f-strings In-Reply-To: <1479501831.35.0.531195928426.issue28739@psf.upfronthosting.co.za> Message-ID: <1490978173.07.0.527468426829.issue28739@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +885 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:13 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:13 +0000 Subject: [issue29607] Broken stack_effect for CALL_FUNCTION_EX In-Reply-To: <1487620239.38.0.547704987013.issue29607@psf.upfronthosting.co.za> Message-ID: <1490978173.28.0.170776803384.issue29607@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +886 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:13 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:13 +0000 Subject: [issue28131] assert statements missed when loaded by zipimporter In-Reply-To: <1473783555.8.0.563951024179.issue28131@psf.upfronthosting.co.za> Message-ID: <1490978173.37.0.23806021493.issue28131@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +887 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:13 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:13 +0000 Subject: [issue28228] imghdr does not support pathlib In-Reply-To: <1474489313.4.0.716838576472.issue28228@psf.upfronthosting.co.za> Message-ID: <1490978173.5.0.920376303344.issue28228@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +888 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:13 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:13 +0000 Subject: [issue29049] Lazy GC tracking frame In-Reply-To: <1482408044.82.0.398076651662.issue29049@psf.upfronthosting.co.za> Message-ID: <1490978173.7.0.58423685728.issue29049@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +890 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:13 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:13 +0000 Subject: [issue29602] complex() on object with __complex__ function loses sign of zero imaginary part In-Reply-To: <1487551792.12.0.674027934311.issue29602@psf.upfronthosting.co.za> Message-ID: <1490978173.64.0.915549221935.issue29602@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +889 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:13 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:13 +0000 Subject: [issue25953] re fails to identify invalid numeric group references in replacement strings In-Reply-To: <1451072808.1.0.287523380704.issue25953@psf.upfronthosting.co.za> Message-ID: <1490978173.86.0.805388625617.issue25953@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +892 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:13 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:13 +0000 Subject: [issue28731] _PyDict_NewPresized() creates too small dict In-Reply-To: <1479466985.37.0.124038643632.issue28731@psf.upfronthosting.co.za> Message-ID: <1490978173.79.0.244667771421.issue28731@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +891 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:13 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:13 +0000 Subject: [issue28138] Windows _sys.path file should allow import site In-Reply-To: <1473801082.85.0.435937363317.issue28138@psf.upfronthosting.co.za> Message-ID: <1490978173.96.0.929572485442.issue28138@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +893 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:14 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:14 +0000 Subject: [issue28227] gzip does not support pathlib In-Reply-To: <1474446973.31.0.180513637528.issue28227@psf.upfronthosting.co.za> Message-ID: <1490978174.05.0.193955808077.issue28227@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +894 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:14 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:14 +0000 Subject: [issue28225] bz2 does not support pathlib In-Reply-To: <1474443304.08.0.670640094883.issue28225@psf.upfronthosting.co.za> Message-ID: <1490978174.25.0.397175564469.issue28225@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +896 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:14 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:14 +0000 Subject: [issue29327] SystemError or crash in sorted(iterable=[]) In-Reply-To: <1484847068.03.0.460461228187.issue29327@psf.upfronthosting.co.za> Message-ID: <1490978174.15.0.581948945146.issue29327@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +895 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:14 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:14 +0000 Subject: [issue21085] Cygwin does not provide siginfo_t.si_band In-Reply-To: <1396019829.85.0.386935527155.issue21085@psf.upfronthosting.co.za> Message-ID: <1490978174.36.0.750385644616.issue21085@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +897 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:14 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:14 +0000 Subject: [issue25778] winreg.EnumValue does not truncate strings correctly In-Reply-To: <1449064525.57.0.047427517368.issue25778@psf.upfronthosting.co.za> Message-ID: <1490978174.68.0.682711161783.issue25778@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +899 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:14 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:14 +0000 Subject: [issue27932] platform.win32_ver() leaks in 2.7.12 In-Reply-To: <1472744071.14.0.482080718706.issue27932@psf.upfronthosting.co.za> Message-ID: <1490978174.57.0.19871910227.issue27932@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +898 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:14 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:14 +0000 Subject: [issue28932] Fail compile Python 3.6.0rc1 on OpenBSD 6.0 In-Reply-To: <1481388547.33.0.916805591486.issue28932@psf.upfronthosting.co.za> Message-ID: <1490978174.88.0.480267326509.issue28932@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:15 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:15 +0000 Subject: [issue29195] Get rid of supporting outdated wrong keyword arguments in re methods In-Reply-To: <1483790693.93.0.397432841389.issue29195@psf.upfronthosting.co.za> Message-ID: <1490978175.01.0.839390087924.issue29195@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +901 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:15 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:15 +0000 Subject: [issue28469] timeit: use powers of 2 in autorange(), instead of powers of 10 In-Reply-To: <1476807191.35.0.710869100873.issue28469@psf.upfronthosting.co.za> Message-ID: <1490978175.09.0.222953867838.issue28469@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +902 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:15 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:15 +0000 Subject: [issue23262] webbrowser module broken with Firefox 36+ In-Reply-To: <1421554616.48.0.911036047072.issue23262@psf.upfronthosting.co.za> Message-ID: <1490978175.19.0.793302569699.issue23262@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +903 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:16 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:16 +0000 Subject: [issue28430] asyncio: C implemeted Future cause Tornado test fail In-Reply-To: <1476362595.2.0.424739151536.issue28430@psf.upfronthosting.co.za> Message-ID: <1490978176.01.0.465941368771.issue28430@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +904 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:16 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:16 +0000 Subject: [issue16255] subrocess.Popen needs /bin/sh but Android only has /system/bin/sh In-Reply-To: <1350421202.49.0.905467284446.issue16255@psf.upfronthosting.co.za> Message-ID: <1490978176.11.0.521213026848.issue16255@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +905 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:16 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:16 +0000 Subject: [issue28752] datetime object fails to restore from reduction In-Reply-To: <1479657323.42.0.875075153657.issue28752@psf.upfronthosting.co.za> Message-ID: <1490978176.59.0.25343920775.issue28752@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +906 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:16 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:16 +0000 Subject: [issue25008] Deprecate smtpd (based on deprecated asyncore/asynchat) In-Reply-To: <1441472893.95.0.412611892234.issue25008@psf.upfronthosting.co.za> Message-ID: <1490978176.7.0.726852945671.issue25008@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +907 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:16 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:16 +0000 Subject: [issue26920] android: test_sys fails In-Reply-To: <1462267582.58.0.744255750518.issue26920@psf.upfronthosting.co.za> Message-ID: <1490978176.83.0.117632591668.issue26920@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +908 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:16 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:16 +0000 Subject: [issue28835] Change in behavior when overriding warnings.showwarning and with catch_warnings(record=True) In-Reply-To: <1480465767.99.0.401403947818.issue28835@psf.upfronthosting.co.za> Message-ID: <1490978176.93.0.833744185767.issue28835@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +909 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:17 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:17 +0000 Subject: [issue28409] test.regrtest does not support multiple -x flags In-Reply-To: <1476121072.74.0.870952515909.issue28409@psf.upfronthosting.co.za> Message-ID: <1490978177.09.0.0697802321421.issue28409@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +910 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:17 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:17 +0000 Subject: [issue29094] Regression in zipfile writing in 2.7.13 In-Reply-To: <1482931591.96.0.8795611166.issue29094@psf.upfronthosting.co.za> Message-ID: <1490978177.22.0.292669853366.issue29094@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +911 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:17 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:17 +0000 Subject: [issue20191] resource.prlimit(int, int, str) crashs In-Reply-To: <1389191622.9.0.0763750909735.issue20191@psf.upfronthosting.co.za> Message-ID: <1490978177.31.0.702261998456.issue20191@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +912 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:17 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:17 +0000 Subject: [issue29338] Output the text signature in the help of a class In-Reply-To: <1484991756.99.0.970269270756.issue29338@psf.upfronthosting.co.za> Message-ID: <1490978177.4.0.259897407522.issue29338@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +913 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:17 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:17 +0000 Subject: [issue15819] Unable to build Python out-of-tree when source tree is readonly. In-Reply-To: <1346309362.14.0.312540957077.issue15819@psf.upfronthosting.co.za> Message-ID: <1490978177.5.0.742189771978.issue15819@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +914 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:17 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:17 +0000 Subject: [issue29337] BytesWarning at compile time In-Reply-To: <1484982586.78.0.422468246503.issue29337@psf.upfronthosting.co.za> Message-ID: <1490978177.72.0.322738569317.issue29337@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +915 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:17 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:17 +0000 Subject: [issue29335] subprocess module does not check WIFSTOPPED on SIGCHLD In-Reply-To: <1484945288.47.0.935636853008.issue29335@psf.upfronthosting.co.za> Message-ID: <1490978177.78.0.21229174874.issue29335@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +916 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:17 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:17 +0000 Subject: [issue29444] Out-of-bounds buffer access in match_getslice_by_index In-Reply-To: <1486225383.48.0.902108011161.issue29444@psf.upfronthosting.co.za> Message-ID: <1490978177.87.0.134729021313.issue29444@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +917 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:17 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:17 +0000 Subject: [issue28229] lzma does not support pathlib In-Reply-To: <1475429097.02.0.755290053819.issue28229@psf.upfronthosting.co.za> Message-ID: <1490978177.95.0.772318524574.issue28229@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +918 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:18 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:18 +0000 Subject: [issue13756] Python3.2.2 make fail on cygwin In-Reply-To: <1326199459.04.0.575648132034.issue13756@psf.upfronthosting.co.za> Message-ID: <1490978178.05.0.873203819894.issue13756@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +919 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:18 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:18 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1490978178.24.0.12069125414.issue9303@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +920 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:18 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:18 +0000 Subject: [issue28480] Compile error on Modules/socketmodule.c In-Reply-To: <1476919678.71.0.954266925792.issue28480@psf.upfronthosting.co.za> Message-ID: <1490978178.42.0.657565695842.issue28480@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +921 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:18 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:18 +0000 Subject: [issue28128] Improve the warning message for invalid escape sequences In-Reply-To: <1473779424.19.0.440456250628.issue28128@psf.upfronthosting.co.za> Message-ID: <1490978178.48.0.302727572576.issue28128@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +922 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:18 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:18 +0000 Subject: [issue27172] Undeprecate inspect.getfullargspec() In-Reply-To: <1464767888.9.0.788649321892.issue27172@psf.upfronthosting.co.za> Message-ID: <1490978178.65.0.0706227207671.issue27172@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +923 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:18 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:18 +0000 Subject: [issue28126] Py_MEMCPY: Use memcpy on Windows? In-Reply-To: <1473769943.75.0.0646288473229.issue28126@psf.upfronthosting.co.za> Message-ID: <1490978178.8.0.835291752536.issue28126@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +924 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:18 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:18 +0000 Subject: [issue28721] Fix asynchronous generators athrow() and aclose() to handle StopAsyncIteration In-Reply-To: <1479337923.66.0.886081078513.issue28721@psf.upfronthosting.co.za> Message-ID: <1490978178.96.0.074799731376.issue28721@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +925 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:19 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:19 +0000 Subject: [issue28120] Bug in _PyDict_Pop() on a splitted table In-Reply-To: <1473752756.43.0.274042514685.issue28120@psf.upfronthosting.co.za> Message-ID: <1490978179.02.0.675121907074.issue28120@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +926 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:19 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:19 +0000 Subject: [issue28648] False assert in _Py_DecodeUTF8_surrogateescape In-Reply-To: <1478706126.26.0.281529783684.issue28648@psf.upfronthosting.co.za> Message-ID: <1490978179.11.0.46293240739.issue28648@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +927 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:19 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:19 +0000 Subject: [issue28332] silent truncations in socket.htons and socket.ntohs In-Reply-To: <1475334370.1.0.257280912764.issue28332@psf.upfronthosting.co.za> Message-ID: <1490978179.36.0.884164307447.issue28332@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +929 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:19 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:19 +0000 Subject: [issue1234] semaphore errors on AIX 5.2 In-Reply-To: <1191489495.02.0.0992368584163.issue1234@psf.upfronthosting.co.za> Message-ID: <1490978179.44.0.937347620666.issue1234@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +930 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:19 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:19 +0000 Subject: [issue28217] Add interactive console tests In-Reply-To: <1474393467.21.0.584094770072.issue28217@psf.upfronthosting.co.za> Message-ID: <1490978179.49.0.118825536417.issue28217@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +931 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:19 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:19 +0000 Subject: [issue26851] android compilation and link flags In-Reply-To: <1461673211.54.0.945034926098.issue26851@psf.upfronthosting.co.za> Message-ID: <1490978179.6.0.986233819394.issue26851@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +932 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:19 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:19 +0000 Subject: [issue27906] Socket accept exhaustion during high TCP traffic In-Reply-To: <1472608644.33.0.983787454696.issue27906@psf.upfronthosting.co.za> Message-ID: <1490978179.7.0.225730630336.issue27906@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +933 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:19 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:19 +0000 Subject: [issue28399] Remove UNIX socket from FS before binding In-Reply-To: <1476029625.22.0.715081570912.issue28399@psf.upfronthosting.co.za> Message-ID: <1490978179.77.0.92232565768.issue28399@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +934 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:19 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:19 +0000 Subject: [issue28808] Make PyUnicode_CompareWithASCIIString() never failing In-Reply-To: <1480175314.71.0.35688135657.issue28808@psf.upfronthosting.co.za> Message-ID: <1490978179.85.0.321886818096.issue28808@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +935 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:19 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:19 +0000 Subject: [issue28161] Opening CON for write access fails In-Reply-To: <1473909865.01.0.166181984624.issue28161@psf.upfronthosting.co.za> Message-ID: <1490978179.96.0.875142094217.issue28161@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +936 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:20 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:20 +0000 Subject: [issue26919] on Android python fails to decode/encode command line arguments In-Reply-To: <1462267115.39.0.594600458307.issue26919@psf.upfronthosting.co.za> Message-ID: <1490978180.03.0.672536781657.issue26919@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +937 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:20 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:20 +0000 Subject: [issue15369] pybench and test.pystone poorly documented In-Reply-To: <1342446105.53.0.956340794171.issue15369@psf.upfronthosting.co.za> Message-ID: <1490978180.11.0.598651467994.issue15369@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +938 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:20 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:20 +0000 Subject: [issue28799] Drop CALL_PROFILE special build? In-Reply-To: <1480064573.69.0.905508550534.issue28799@psf.upfronthosting.co.za> Message-ID: <1490978180.2.0.324283502821.issue28799@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +939 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:20 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:20 +0000 Subject: [issue28102] zipfile.py script should print usage to stderr In-Reply-To: <1473694408.4.0.763789428909.issue28102@psf.upfronthosting.co.za> Message-ID: <1490978180.26.0.112831939797.issue28102@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +940 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:20 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:20 +0000 Subject: [issue28797] Modifying class __dict__ inside __set_name__ In-Reply-To: <1480042109.13.0.341330811366.issue28797@psf.upfronthosting.co.za> Message-ID: <1490978180.33.0.0325627348514.issue28797@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +941 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:20 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:20 +0000 Subject: [issue15812] inspect.getframeinfo() cannot show first line In-Reply-To: <1346252079.7.0.669819400342.issue15812@psf.upfronthosting.co.za> Message-ID: <1490978180.46.0.296085835896.issue15812@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +942 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:20 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:20 +0000 Subject: [issue12844] Support more than 255 arguments In-Reply-To: <1314326578.49.0.0651529898349.issue12844@psf.upfronthosting.co.za> Message-ID: <1490978180.55.0.194945194794.issue12844@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +943 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:20 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:20 +0000 Subject: [issue29534] _decimal difference with _pydecimal In-Reply-To: <1486821255.04.0.156424545638.issue29534@psf.upfronthosting.co.za> Message-ID: <1490978180.73.0.599480460908.issue29534@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +944 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:20 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:20 +0000 Subject: [issue28240] Enhance the timeit module: display average +- std dev instead of minimum In-Reply-To: <1474466930.94.0.352912034658.issue28240@psf.upfronthosting.co.za> Message-ID: <1490978180.81.0.415861988806.issue28240@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +945 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:21 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:21 +0000 Subject: [issue27659] Prohibit implicit C function declarations In-Reply-To: <1469948678.43.0.816389049938.issue27659@psf.upfronthosting.co.za> Message-ID: <1490978181.01.0.117610024077.issue27659@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +946 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:21 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:21 +0000 Subject: [issue13051] Infinite recursion in curses.textpad.Textbox In-Reply-To: <1317170831.29.0.145546521568.issue13051@psf.upfronthosting.co.za> Message-ID: <1490978181.14.0.854479169646.issue13051@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +947 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:21 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:21 +0000 Subject: [issue27979] Remove bundled libffi In-Reply-To: <1473188019.08.0.865772494221.issue27979@psf.upfronthosting.co.za> Message-ID: <1490978181.25.0.0505642279992.issue27979@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +948 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:21 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:21 +0000 Subject: [issue22493] Deprecate the use of flags not at the start of regular expression In-Reply-To: <1411640940.81.0.804351058131.issue22493@psf.upfronthosting.co.za> Message-ID: <1490978181.32.0.567106690445.issue22493@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +949 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:21 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:21 +0000 Subject: [issue29532] functools.partial is not compatible between 2.7 and 3.5 In-Reply-To: <1486797601.63.0.771798059735.issue29532@psf.upfronthosting.co.za> Message-ID: <1490978181.42.0.964486696564.issue29532@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +950 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:21 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:21 +0000 Subject: [issue23782] Leak in _PyTraceback_Add In-Reply-To: <1427365502.47.0.105321888995.issue23782@psf.upfronthosting.co.za> Message-ID: <1490978181.51.0.153235370509.issue23782@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +951 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:21 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:21 +0000 Subject: [issue28735] Mock is equal to ANY but MagicMock is not In-Reply-To: <1479485234.58.0.222215885157.issue28735@psf.upfronthosting.co.za> Message-ID: <1490978181.59.0.554126337614.issue28735@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +952 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:21 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:21 +0000 Subject: [issue26617] Assertion failed in gc with __del__ and weakref In-Reply-To: <1458713339.87.0.171873505456.issue26617@psf.upfronthosting.co.za> Message-ID: <1490978181.69.0.296196262657.issue26617@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +953 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:21 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:21 +0000 Subject: [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1490978181.94.0.301653201778.issue28513@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +954 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:22 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:22 +0000 Subject: [issue28226] compileall does not support pathlib In-Reply-To: <1474828401.93.0.0387721532951.issue28226@psf.upfronthosting.co.za> Message-ID: <1490978182.07.0.962229401432.issue28226@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +955 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:22 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:22 +0000 Subject: [issue28444] Missing extensions modules when cross compiling python 3.5.2 for arm on Linux In-Reply-To: <1476459283.66.0.870064519048.issue28444@psf.upfronthosting.co.za> Message-ID: <1490978182.15.0.202359233004.issue28444@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +956 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:22 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:22 +0000 Subject: [issue28086] test.test_getargs2.TupleSubclass test failure In-Reply-To: <1473633837.1.0.634614870367.issue28086@psf.upfronthosting.co.za> Message-ID: <1490978182.33.0.437490029313.issue28086@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:22 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:22 +0000 Subject: [issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4 In-Reply-To: <1396363951.96.0.324613047949.issue21124@psf.upfronthosting.co.za> Message-ID: <1490978182.45.0.210708327998.issue21124@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +958 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:22 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:22 +0000 Subject: [issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file. In-Reply-To: <1483059317.41.0.849254662988.issue29110@psf.upfronthosting.co.za> Message-ID: <1490978182.55.0.558276974397.issue29110@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:22 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:22 +0000 Subject: [issue29438] use after free in key sharing dict In-Reply-To: <1486169576.7.0.502230969893.issue29438@psf.upfronthosting.co.za> Message-ID: <1490978182.62.0.192961119066.issue29438@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +960 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:22 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:22 +0000 Subject: [issue29142] urllib: no_proxy variable values with leading dot not properly handled In-Reply-To: <1483452589.12.0.177615671636.issue29142@psf.upfronthosting.co.za> Message-ID: <1490978182.75.0.216247534393.issue29142@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +961 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:22 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:22 +0000 Subject: [issue28847] dumbdbm should not commit if in read mode In-Reply-To: <1480564427.92.0.600594500998.issue28847@psf.upfronthosting.co.za> Message-ID: <1490978182.85.0.070584210716.issue28847@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +962 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:22 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:22 +0000 Subject: [issue28325] Remove MacOS 9-specific module macurl2path.py In-Reply-To: <1475316954.78.0.654297187037.issue28325@psf.upfronthosting.co.za> Message-ID: <1490978182.91.0.468645910498.issue28325@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +963 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:22 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:22 +0000 Subject: [issue28322] chain.__setstate__ Type Confusion In-Reply-To: <1475303268.33.0.0947529181772.issue28322@psf.upfronthosting.co.za> Message-ID: <1490978182.97.0.319895898366.issue28322@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +964 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:23 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:23 +0000 Subject: [issue24932] Use proper command line parsing in _testembed In-Reply-To: <1440481888.38.0.825081560944.issue24932@psf.upfronthosting.co.za> Message-ID: <1490978183.04.0.191345469247.issue24932@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +965 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:23 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:23 +0000 Subject: [issue29623] configparser.ConfigParser.read() does not accept Pathlib path as a single argument. In-Reply-To: <1487789335.63.0.00643279339965.issue29623@psf.upfronthosting.co.za> Message-ID: <1490978183.11.0.146071483952.issue29623@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +966 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:23 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:23 +0000 Subject: [issue26906] Special method lookup fails on uninitialized types In-Reply-To: <1462194444.45.0.679859267338.issue26906@psf.upfronthosting.co.za> Message-ID: <1490978183.15.0.368084385787.issue26906@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +967 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:23 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:23 +0000 Subject: [issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes In-Reply-To: <1488493463.16.0.114641402405.issue29704@psf.upfronthosting.co.za> Message-ID: <1490978183.23.0.223011062068.issue29704@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +968 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:23 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:23 +0000 Subject: [issue18219] csv.DictWriter is slow when writing files with large number of columns In-Reply-To: <1371273159.09.0.766674685212.issue18219@psf.upfronthosting.co.za> Message-ID: <1490978183.31.0.381191458782.issue18219@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +969 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:23 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:23 +0000 Subject: [issue26182] Deprecation warnings for the future async and await keywords in Python 3.6 In-Reply-To: <1453489566.62.0.462459552998.issue26182@psf.upfronthosting.co.za> Message-ID: <1490978183.44.0.75325002965.issue26182@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +970 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:23 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:23 +0000 Subject: [issue27593] Deprecate sys._mercurial and create sys._git In-Reply-To: <1469223805.51.0.614192375682.issue27593@psf.upfronthosting.co.za> Message-ID: <1490978183.53.0.656609693586.issue27593@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +971 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:23 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:23 +0000 Subject: [issue28387] double free in io.TextIOWrapper In-Reply-To: <1475868777.61.0.59647562301.issue28387@psf.upfronthosting.co.za> Message-ID: <1490978183.66.0.236451771536.issue28387@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +972 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:23 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:23 +0000 Subject: [issue28380] Mock functions with autospec don't support assert_called_once, assert_called, assert_not_called In-Reply-To: <1475784799.56.0.716869368954.issue28380@psf.upfronthosting.co.za> Message-ID: <1490978183.73.0.164181564051.issue28380@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +973 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:23 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:23 +0000 Subject: [issue26909] Asyncio: Pipes and socket IO is very slow In-Reply-To: <1462208793.52.0.483694752489.issue26909@psf.upfronthosting.co.za> Message-ID: <1490978183.8.0.31844005959.issue26909@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +974 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:23 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:23 +0000 Subject: [issue28871] Destructor of ElementTree.Element is recursive In-Reply-To: <1480892604.34.0.360751620771.issue28871@psf.upfronthosting.co.za> Message-ID: <1490978183.87.0.215876592198.issue28871@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:23 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:23 +0000 Subject: [issue28518] execute("begin immediate") throwing OperationalError In-Reply-To: <1477307118.31.0.70785963389.issue28518@psf.upfronthosting.co.za> Message-ID: <1490978183.96.0.275409688221.issue28518@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +976 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:24 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:24 +0000 Subject: [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1490978184.16.0.257149988633.issue27998@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +977 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:19 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:19 +0000 Subject: [issue28333] input() with Unicode prompt produces mojibake on Windows In-Reply-To: <1475335225.65.0.631429009191.issue28333@psf.upfronthosting.co.za> Message-ID: <1490978179.2.0.102103412267.issue28333@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +928 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:24 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:24 +0000 Subject: [issue28782] SEGFAULT when running a given coroutine In-Reply-To: <1479924207.48.0.511908736136.issue28782@psf.upfronthosting.co.za> Message-ID: <1490978184.38.0.636898714505.issue28782@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +978 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:24 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:24 +0000 Subject: [issue20804] Sentinels identity lost when pickled (unittest.mock) In-Reply-To: <1393579357.22.0.503856996983.issue20804@psf.upfronthosting.co.za> Message-ID: <1490978184.49.0.388814801703.issue20804@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +979 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:24 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:24 +0000 Subject: [issue29319] Embedded 3.6.0 distribution cannot run pyz files In-Reply-To: <1484827891.73.0.559570067048.issue29319@psf.upfronthosting.co.za> Message-ID: <1490978184.59.0.163247725309.issue29319@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +980 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:24 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:24 +0000 Subject: [issue28727] Implement comparison (x==y and x!=y) for _sre.SRE_Pattern In-Reply-To: <1479398568.09.0.867806263276.issue28727@psf.upfronthosting.co.za> Message-ID: <1490978184.69.0.833813760114.issue28727@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +981 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:24 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:24 +0000 Subject: [issue28253] calendar.prcal(9999) output has a problem In-Reply-To: <68047ef2.6fd9.15755a09cdb.Coremail.xibeilijp@163.com> Message-ID: <1490978184.8.0.290788531726.issue28253@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:24 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:24 +0000 Subject: [issue28251] Help manuals do not appear in Windows search In-Reply-To: <1474582472.92.0.826055372381.issue28251@psf.upfronthosting.co.za> Message-ID: <1490978184.91.0.0243635018687.issue28251@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:25 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:25 +0000 Subject: [issue29416] Path.mkdir can get into a recursive error loop In-Reply-To: <1485989192.98.0.740495069051.issue29416@psf.upfronthosting.co.za> Message-ID: <1490978185.0.0.425151022976.issue29416@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +984 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:25 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:25 +0000 Subject: [issue28257] Regression for star argument parameter error messages In-Reply-To: <1474631746.14.0.840095421551.issue28257@psf.upfronthosting.co.za> Message-ID: <1490978185.08.0.308016483289.issue28257@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +985 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:25 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:25 +0000 Subject: [issue28548] http.server parse_request() bug and error reporting In-Reply-To: <1477670229.81.0.419990644201.issue28548@psf.upfronthosting.co.za> Message-ID: <1490978185.21.0.0502514611416.issue28548@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:25 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:25 +0000 Subject: [issue29546] A more helpful ImportError message In-Reply-To: <1487003411.13.0.404377957211.issue29546@psf.upfronthosting.co.za> Message-ID: <1490978185.28.0.501764537845.issue29546@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +987 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:25 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:25 +0000 Subject: [issue26661] python fails to locate system libffi In-Reply-To: <1459246152.22.0.57778057602.issue26661@psf.upfronthosting.co.za> Message-ID: <1490978185.34.0.434930035977.issue26661@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +988 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:25 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:25 +0000 Subject: [issue28258] Broken python-config generated with Estonian locale In-Reply-To: <1474637498.59.0.401173871387.issue28258@psf.upfronthosting.co.za> Message-ID: <1490978185.42.0.672764785344.issue28258@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +989 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:25 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:25 +0000 Subject: [issue27517] LZMACompressor and LZMADecompressor raise exceptions if given empty strings twice In-Reply-To: <1468544610.85.0.0793383244022.issue27517@psf.upfronthosting.co.za> Message-ID: <1490978185.51.0.660153204498.issue27517@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +990 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:25 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:25 +0000 Subject: [issue29703] Fix asyncio to support instantiation of new event loops in subprocesses In-Reply-To: <1488491745.35.0.512874829003.issue29703@psf.upfronthosting.co.za> Message-ID: <1490978185.6.0.267006703418.issue29703@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:25 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:25 +0000 Subject: [issue28137] Windows sys.path file should be renamed In-Reply-To: <1473800855.2.0.943648814208.issue28137@psf.upfronthosting.co.za> Message-ID: <1490978185.68.0.214160514358.issue28137@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +992 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:25 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:25 +0000 Subject: [issue28148] [Patch] Also stop using localtime() in timemodule In-Reply-To: <1473856529.08.0.0656229512786.issue28148@psf.upfronthosting.co.za> Message-ID: <1490978185.8.0.317016497127.issue28148@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +993 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:26 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:26 +0000 Subject: [issue28666] Make test.support.rmtree() able to remove non-writable directories In-Reply-To: <1478866355.91.0.707083472132.issue28666@psf.upfronthosting.co.za> Message-ID: <1490978186.01.0.866328593005.issue28666@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +995 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:26 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:26 +0000 Subject: [issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF In-Reply-To: <1478866241.77.0.0742898329944.issue28665@psf.upfronthosting.co.za> Message-ID: <1490978186.08.0.418326269759.issue28665@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +996 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:26 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:26 +0000 Subject: [issue28923] Nonexisting encoding specified in Tix.py In-Reply-To: <1481304070.27.0.11719456506.issue28923@psf.upfronthosting.co.za> Message-ID: <1490978186.15.0.277134200975.issue28923@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +997 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:26 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:26 +0000 Subject: [issue29714] can't interpolate byte string with \x00 before replacement identifier In-Reply-To: <1488567928.06.0.163368634546.issue29714@psf.upfronthosting.co.za> Message-ID: <1490978186.23.0.648454414988.issue29714@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +998 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:26 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:26 +0000 Subject: [issue29290] argparse breaks long lines on NO-BREAK SPACE In-Reply-To: <1484622521.42.0.0580919403747.issue29290@psf.upfronthosting.co.za> Message-ID: <1490978186.3.0.869027720504.issue29290@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +999 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:26 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:26 +0000 Subject: [issue28317] Improve support of FORMAT_VALUE in dis In-Reply-To: <1475245280.55.0.378844922584.issue28317@psf.upfronthosting.co.za> Message-ID: <1490978186.42.0.342611594534.issue28317@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:26 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:26 +0000 Subject: [issue28147] Unbounded memory growth resizing split-table dicts In-Reply-To: <1473853453.13.0.556951743271.issue28147@psf.upfronthosting.co.za> Message-ID: <1490978186.48.0.857305763161.issue28147@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1001 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:26 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:26 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <1490978186.63.0.677295213374.issue24452@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1002 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:26 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:26 +0000 Subject: [issue29159] Regression in bytes constructor In-Reply-To: <1483559394.32.0.335371111214.issue29159@psf.upfronthosting.co.za> Message-ID: <1490978186.76.0.0917185173709.issue29159@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1003 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:26 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:26 +0000 Subject: [issue28314] ElementTree: Element.getiterator(tag) broken in 3.6 In-Reply-To: <1475178246.36.0.289281608925.issue28314@psf.upfronthosting.co.za> Message-ID: <1490978186.84.0.191223748521.issue28314@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1004 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:26 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:26 +0000 Subject: [issue27939] Tkinter mainloop raises when setting the value of ttk.LabeledScale In-Reply-To: <1472811634.57.0.400970918265.issue27939@psf.upfronthosting.co.za> Message-ID: <1490978186.93.0.721850879526.issue27939@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1005 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:27 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:27 +0000 Subject: [issue25659] ctypes.Array.from_buffer segmentation fault when trying to create from array.array In-Reply-To: <1447869436.37.0.609997226839.issue25659@psf.upfronthosting.co.za> Message-ID: <1490978187.0.0.383426563607.issue25659@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1006 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:27 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:27 +0000 Subject: [issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py In-Reply-To: <1485164481.25.0.457345760711.issue29349@psf.upfronthosting.co.za> Message-ID: <1490978187.12.0.835211479687.issue29349@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1007 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:27 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:27 +0000 Subject: [issue24098] Multiple use after frees in obj2ast_* methods In-Reply-To: <1430489429.65.0.587999729774.issue24098@psf.upfronthosting.co.za> Message-ID: <1490978187.22.0.259574156465.issue24098@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1008 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:27 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:27 +0000 Subject: [issue22807] uuid.uuid1() should use uuid_generate_time_safe() if available In-Reply-To: <1415304446.34.0.331764401827.issue22807@psf.upfronthosting.co.za> Message-ID: <1490978187.38.0.725706223167.issue22807@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1010 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:27 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:27 +0000 Subject: [issue28961] unittest.mock._Call ignores `name` parameter In-Reply-To: <1481636868.17.0.0411235027553.issue28961@psf.upfronthosting.co.za> Message-ID: <1490978187.52.0.889503016248.issue28961@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1011 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:27 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:27 +0000 Subject: [issue18287] PyType_Ready() should sanity-check the tp_name field In-Reply-To: <1372000372.42.0.425313116494.issue18287@psf.upfronthosting.co.za> Message-ID: <1490978187.3.0.65147164201.issue18287@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1009 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:27 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:27 +0000 Subject: [issue29080] unnecessary hg required for build version 3.6 on Windows In-Reply-To: <1482832382.86.0.80948215742.issue29080@psf.upfronthosting.co.za> Message-ID: <1490978187.64.0.222501688975.issue29080@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1012 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:27 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:27 +0000 Subject: [issue23722] During metaclass.__init__, super() of the constructed class does not work In-Reply-To: <1426859061.43.0.510286082444.issue23722@psf.upfronthosting.co.za> Message-ID: <1490978187.72.0.0205211615811.issue23722@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1013 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:28 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:28 +0000 Subject: [issue29083] Readd PyArg_VaParse to the stable API In-Reply-To: <1482846112.52.0.144835029316.issue29083@psf.upfronthosting.co.za> Message-ID: <1490978188.1.0.210583423442.issue29083@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1014 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:28 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:28 +0000 Subject: [issue28580] Optimize iterating split table values In-Reply-To: <1478021108.69.0.490757358279.issue28580@psf.upfronthosting.co.za> Message-ID: <1490978188.17.0.898332429287.issue28580@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1015 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:28 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:28 +0000 Subject: [issue29000] Not matched behavior within printf style bytes formatting In-Reply-To: <1481982064.72.0.399504561165.issue29000@psf.upfronthosting.co.za> Message-ID: <1490978188.71.0.575613132595.issue29000@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1017 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:28 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:28 +0000 Subject: [issue28963] Use-after-free in _asyncio_Future_remove_done_callback() of _asynciomodule.c In-Reply-To: <1481657201.46.0.37032067172.issue28963@psf.upfronthosting.co.za> Message-ID: <1490978188.62.0.200311209721.issue28963@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1016 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:28 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:28 +0000 Subject: [issue28176] Fix callbacks race in asyncio.SelectorLoop.sock_connect In-Reply-To: <1473976530.0.0.19666207968.issue28176@psf.upfronthosting.co.za> Message-ID: <1490978188.79.0.335838973309.issue28176@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1018 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:28 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:28 +0000 Subject: [issue28174] asyncio: Handle when SO_REUSEPORT isn't properly supported In-Reply-To: <1473968649.81.0.461772450812.issue28174@psf.upfronthosting.co.za> Message-ID: <1490978188.88.0.615960302776.issue28174@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1019 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:28 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:28 +0000 Subject: [issue27441] redundant assignments to ob_size of new ints that _PyLong_New returned In-Reply-To: <1467470337.8.0.776341442151.issue27441@psf.upfronthosting.co.za> Message-ID: <1490978188.95.0.164255505671.issue27441@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1020 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:29 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:29 +0000 Subject: [issue27030] Remove deprecated re features In-Reply-To: <1463337497.02.0.81864271809.issue27030@psf.upfronthosting.co.za> Message-ID: <1490978189.03.0.420412967668.issue27030@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1021 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:29 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:29 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1490978189.14.0.967158912316.issue18844@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1022 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:29 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:29 +0000 Subject: [issue28929] Provide a link from documentation back to its source file In-Reply-To: <1481331536.86.0.539237207001.issue28929@psf.upfronthosting.co.za> Message-ID: <1490978189.33.0.673243409366.issue28929@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1023 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:29 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:29 +0000 Subject: [issue28774] Better start and end position for unicodeerror in unicode_encode_ucs1 In-Reply-To: <1479824962.83.0.769019580096.issue28774@psf.upfronthosting.co.za> Message-ID: <1490978189.41.0.0932938194648.issue28774@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1024 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:29 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:29 +0000 Subject: [issue26936] android: test_socket fails In-Reply-To: <1462288246.37.0.495121419926.issue26936@psf.upfronthosting.co.za> Message-ID: <1490978189.58.0.0803751990606.issue26936@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1025 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:29 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:29 +0000 Subject: [issue28248] Upgrade installers to OpenSSL 1.0.2j In-Reply-To: <1474552584.95.0.0318594270303.issue28248@psf.upfronthosting.co.za> Message-ID: <1490978189.65.0.983065886295.issue28248@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1026 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:29 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:29 +0000 Subject: [issue28255] TextCalendar.prweek/month/year outputs an extra whitespace character In-Reply-To: <1474620667.82.0.649697112253.issue28255@psf.upfronthosting.co.za> Message-ID: <1490978189.93.0.989759187435.issue28255@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1027 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:30 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:30 +0000 Subject: [issue26355] Emit major version based canonical URLs for docs In-Reply-To: <1455353539.4.0.541474968967.issue26355@psf.upfronthosting.co.za> Message-ID: <1490978190.08.0.229422288382.issue26355@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1028 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:30 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:30 +0000 Subject: [issue29169] update zlib to 1.2.11 In-Reply-To: <1483629107.49.0.982374684244.issue29169@psf.upfronthosting.co.za> Message-ID: <1490978190.19.0.102901220823.issue29169@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1029 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:30 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:30 +0000 Subject: [issue28893] Make sure exceptions raised in __aiter__ are properly chained in ceval In-Reply-To: <1481085693.53.0.293766364883.issue28893@psf.upfronthosting.co.za> Message-ID: <1490978190.29.0.107917400979.issue28893@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1030 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:30 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:30 +0000 Subject: [issue28779] set_forkserver_preload() can crash the forkserver if preloaded module instantiate multiprocessing classes In-Reply-To: <1479914801.47.0.114591938702.issue28779@psf.upfronthosting.co.za> Message-ID: <1490978190.38.0.344721815224.issue28779@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1031 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:30 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:30 +0000 Subject: [issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator In-Reply-To: <1264337326.51.0.913533963705.issue7769@psf.upfronthosting.co.za> Message-ID: <1490978190.46.0.285871725902.issue7769@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1032 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:30 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:30 +0000 Subject: [issue28896] Embeddable zip allows Windows registry to override module location In-Reply-To: <1481128708.35.0.521458556277.issue28896@psf.upfronthosting.co.za> Message-ID: <1490978190.59.0.391549820863.issue28896@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1033 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:30 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:30 +0000 Subject: [issue25400] robotparser doesn't return crawl delay for default entry In-Reply-To: <1444785702.73.0.849541373226.issue25400@psf.upfronthosting.co.za> Message-ID: <1490978190.71.0.87839047165.issue25400@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1034 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:30 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:30 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1490978190.87.0.204993380423.issue28087@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1036 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:30 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:30 +0000 Subject: [issue28549] curses: calling addch() with an 1-length str segfaults with ncurses6 compiled with --enable-ext-colors In-Reply-To: <1477677069.87.0.354681142627.issue28549@psf.upfronthosting.co.za> Message-ID: <1490978190.79.0.158751363797.issue28549@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1035 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:25 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:25 +0000 Subject: [issue28927] bytes.fromhex should ignore all whitespace In-Reply-To: <1481328446.9.0.450435696311.issue28927@psf.upfronthosting.co.za> Message-ID: <1490978185.91.0.701536677076.issue28927@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:30 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:30 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1490978190.97.0.874988566995.issue28556@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1037 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:31 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:31 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx In-Reply-To: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> Message-ID: <1490978191.05.0.779722808255.issue27867@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1038 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:31 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:31 +0000 Subject: [issue28563] Arbitrary code execution in gettext.c2py In-Reply-To: <1477846721.72.0.339090840874.issue28563@psf.upfronthosting.co.za> Message-ID: <1490978191.16.0.279970127423.issue28563@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1039 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:31 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:31 +0000 Subject: [issue28289] ImportError.__init__ doesn't reset not specified exception attributes In-Reply-To: <1474999372.21.0.472143563436.issue28289@psf.upfronthosting.co.za> Message-ID: <1490978191.27.0.903746297598.issue28289@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1040 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:31 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:31 +0000 Subject: [issue26647] ceval: use Wordcode, 16-bit bytecode In-Reply-To: <1459034868.93.0.159802163565.issue26647@psf.upfronthosting.co.za> Message-ID: <1490978191.34.0.715812990798.issue26647@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1041 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:31 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:31 +0000 Subject: [issue28683] bind() on a unix socket raises PermissionError on Android for a non-root user In-Reply-To: <1479065524.08.0.12999801833.issue28683@psf.upfronthosting.co.za> Message-ID: <1490978191.55.0.233139279674.issue28683@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:31 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:31 +0000 Subject: [issue29377] Add the 'wrapper_descriptor' type to the types module In-Reply-To: <1485425778.09.0.153066086326.issue29377@psf.upfronthosting.co.za> Message-ID: <1490978191.64.0.717738423524.issue29377@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1045 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:31 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:31 +0000 Subject: [issue27025] More human readable generated widget names In-Reply-To: <1463299445.94.0.887025569149.issue27025@psf.upfronthosting.co.za> Message-ID: <1490978191.49.0.932053789205.issue27025@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1042 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:31 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:31 +0000 Subject: [issue29376] threading._DummyThread.__repr__ raises AssertionError In-Reply-To: <1485385808.95.0.00162143215773.issue29376@psf.upfronthosting.co.za> Message-ID: <1490978191.58.0.189066218011.issue29376@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1044 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:31 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:31 +0000 Subject: [issue28449] tarfile.open(mode = 'r:*', ignore_zeros = True) has 50% chance failed to open compressed tars? In-Reply-To: <1476522464.39.0.172513688494.issue28449@psf.upfronthosting.co.za> Message-ID: <1490978191.72.0.583615093567.issue28449@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1046 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:31 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:31 +0000 Subject: [issue28448] C implemented Future doesn't work on Windows In-Reply-To: <1476497368.18.0.628065389536.issue28448@psf.upfronthosting.co.za> Message-ID: <1490978191.81.0.829756422015.issue28448@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1047 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:31 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:31 +0000 Subject: [issue26359] CPython build options for out-of-the box performance In-Reply-To: <1455445693.01.0.984013993837.issue26359@psf.upfronthosting.co.za> Message-ID: <1490978191.9.0.838829292507.issue26359@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1048 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:32 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:32 +0000 Subject: [issue28181] Change URL in antigravity library file In-Reply-To: <1474025100.38.0.11071448867.issue28181@psf.upfronthosting.co.za> Message-ID: <1490978192.08.0.435684613553.issue28181@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1049 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:32 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:32 +0000 Subject: [issue26293] Embedded zipfile fields dependent on absolute position In-Reply-To: <1454662355.53.0.48718125489.issue26293@psf.upfronthosting.co.za> Message-ID: <1490978192.14.0.537414011498.issue26293@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1050 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:32 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:32 +0000 Subject: [issue27972] Confusing error during cyclic yield In-Reply-To: <1473157014.91.0.531687158456.issue27972@psf.upfronthosting.co.za> Message-ID: <1490978192.31.0.144497817035.issue27972@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1051 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:32 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:32 +0000 Subject: [issue29572] Upgrade installers to OpenSSL 1.0.2k In-Reply-To: <1487181972.09.0.437715679754.issue29572@psf.upfronthosting.co.za> Message-ID: <1490978192.54.0.911885391322.issue29572@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1053 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:32 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:32 +0000 Subject: [issue28371] Deprecate passing asyncio.Handles to run_in_executor In-Reply-To: <1475706364.89.0.846891709474.issue28371@psf.upfronthosting.co.za> Message-ID: <1490978192.73.0.693601964016.issue28371@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1055 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:32 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:32 +0000 Subject: [issue28369] Raise RuntimeError when transport's FD is used with add_reader etc In-Reply-To: <1475704054.39.0.284138754743.issue28369@psf.upfronthosting.co.za> Message-ID: <1490978192.65.0.369535606935.issue28369@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1054 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:32 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:32 +0000 Subject: [issue28370] Speedup asyncio.StreamReader.readexactly In-Reply-To: <1475704790.2.0.121613727751.issue28370@psf.upfronthosting.co.za> Message-ID: <1490978192.79.0.507846032295.issue28370@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1056 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:32 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:32 +0000 Subject: [issue28162] WindowsConsoleIO readall() fails if first line starts with Ctrl+Z In-Reply-To: <1473909917.67.0.236391762597.issue28162@psf.upfronthosting.co.za> Message-ID: <1490978192.84.0.409165293287.issue28162@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1057 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:32 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:32 +0000 Subject: [issue28372] Fix asyncio to support formatting of non-python coroutines In-Reply-To: <1475710288.73.0.330973256467.issue28372@psf.upfronthosting.co.za> Message-ID: <1490978192.94.0.160908325732.issue28372@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1058 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:33 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:33 +0000 Subject: [issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured In-Reply-To: <1431014086.96.0.315028213592.issue24142@psf.upfronthosting.co.za> Message-ID: <1490978193.0.0.735529476478.issue24142@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1059 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:33 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:33 +0000 Subject: [issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error In-Reply-To: <1464060517.76.0.559675330412.issue27100@psf.upfronthosting.co.za> Message-ID: <1490978193.07.0.736221770242.issue27100@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1060 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:33 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:33 +0000 Subject: [issue28379] PyUnicode_CopyCharacters could lead to undefined behaviour In-Reply-To: <1475777704.53.0.510656129922.issue28379@psf.upfronthosting.co.za> Message-ID: <1490978193.19.0.489642083801.issue28379@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1061 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:33 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:33 +0000 Subject: [issue29271] Task.current_task(None) returns unexpected result In-Reply-To: <1484345484.86.0.127501941011.issue29271@psf.upfronthosting.co.za> Message-ID: <1490978193.27.0.52093004531.issue29271@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1062 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:33 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:33 +0000 Subject: [issue28275] LZMADecompressor.decompress Use After Free In-Reply-To: <1474864416.3.0.139133662072.issue28275@psf.upfronthosting.co.za> Message-ID: <1490978193.35.0.447390097957.issue28275@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1063 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:33 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:33 +0000 Subject: [issue27348] traceback (and threading) drops exception message In-Reply-To: <1466261856.58.0.470780414166.issue27348@psf.upfronthosting.co.za> Message-ID: <1490978193.44.0.0527209480865.issue27348@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1064 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:33 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:33 +0000 Subject: [issue26110] Speedup method calls 1.2x In-Reply-To: <1452791347.05.0.923215900831.issue26110@psf.upfronthosting.co.za> Message-ID: <1490978193.51.0.355069916744.issue26110@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1065 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:33 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:33 +0000 Subject: [issue27222] redundant checks and a weird use of goto statements in long_rshift In-Reply-To: <1465070067.21.0.305651029523.issue27222@psf.upfronthosting.co.za> Message-ID: <1490978193.73.0.85524283143.issue27222@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1066 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:33 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:33 +0000 Subject: [issue20491] textwrap: Non-breaking space not honored In-Reply-To: <1391373997.78.0.616228125857.issue20491@psf.upfronthosting.co.za> Message-ID: <1490978193.81.0.429523616782.issue20491@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1067 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:34 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:34 +0000 Subject: [issue28761] Add the const qualifier to fields name and doc of public structs In-Reply-To: <1479721215.94.0.926847146167.issue28761@psf.upfronthosting.co.za> Message-ID: <1490978194.04.0.811113225186.issue28761@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1068 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:34 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:34 +0000 Subject: [issue28075] os.stat fails when access is denied In-Reply-To: <1473584680.43.0.379847844225.issue28075@psf.upfronthosting.co.za> Message-ID: <1490978194.1.0.0973116213276.issue28075@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1069 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:34 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:34 +0000 Subject: [issue29079] pathlib.resolve() causes infinite loop on Windows In-Reply-To: <1482785174.29.0.0980303906914.issue29079@psf.upfronthosting.co.za> Message-ID: <1490978194.22.0.157658761841.issue29079@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1070 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:34 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:34 +0000 Subject: [issue28768] Warning: implicit declaration of function '_setmode' In-Reply-To: <1479758430.88.0.97682867264.issue28768@psf.upfronthosting.co.za> Message-ID: <1490978194.33.0.353123828362.issue28768@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1071 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:34 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:34 +0000 Subject: [issue28769] Make PyUnicode_AsUTF8 returning "const char *" rather of "char *" In-Reply-To: <1479801324.65.0.962202188144.issue28769@psf.upfronthosting.co.za> Message-ID: <1490978194.46.0.486010539176.issue28769@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1072 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:34 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:34 +0000 Subject: [issue18893] invalid exception handling in Lib/ctypes/macholib/dyld.py In-Reply-To: <1377946586.23.0.205823706154.issue18893@psf.upfronthosting.co.za> Message-ID: <1490978194.56.0.216901704947.issue18893@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:34 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:34 +0000 Subject: [issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1) In-Reply-To: <1420854382.8.0.44417983014.issue23214@psf.upfronthosting.co.za> Message-ID: <1490978194.67.0.331268644396.issue23214@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1074 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:34 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:34 +0000 Subject: [issue18896] Remove namedtuple 255 arguments restriction In-Reply-To: <1377972310.66.0.567176219008.issue18896@psf.upfronthosting.co.za> Message-ID: <1490978194.85.0.0918327851117.issue18896@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1075 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:34 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:34 +0000 Subject: [issue25270] codecs.escape_encode systemerror on empty byte string In-Reply-To: <1443542758.27.0.114315188103.issue25270@psf.upfronthosting.co.za> Message-ID: <1490978194.95.0.244643034245.issue25270@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1076 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:35 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:35 +0000 Subject: [issue25651] Confusing output for TestCase.subTest(0) In-Reply-To: <1447814053.14.0.516761369725.issue25651@psf.upfronthosting.co.za> Message-ID: <1490978195.09.0.58130974695.issue25651@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1077 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:35 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:35 +0000 Subject: [issue27897] Avoid possible crash in pysqlite_connection_create_collation In-Reply-To: <1472574148.53.0.8247324722.issue27897@psf.upfronthosting.co.za> Message-ID: <1490978195.25.0.80313257167.issue27897@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1078 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:35 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:35 +0000 Subject: [issue29384] Unused beos build scripts In-Reply-To: <1485662815.62.0.566203367253.issue29384@psf.upfronthosting.co.za> Message-ID: <1490978195.33.0.0427893845642.issue29384@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1079 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:35 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:35 +0000 Subject: [issue25677] Syntax error caret confused by indentation In-Reply-To: <1447998656.06.0.471632717786.issue25677@psf.upfronthosting.co.za> Message-ID: <1490978195.4.0.846121942953.issue25677@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1080 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:35 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:35 +0000 Subject: [issue20572] subprocess.Popen.wait() undocumented "endtime" parameter In-Reply-To: <1391941400.18.0.703922206544.issue20572@psf.upfronthosting.co.za> Message-ID: <1490978195.48.0.568293053104.issue20572@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1081 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:35 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:35 +0000 Subject: [issue28512] PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject() always set the offset attribute to None In-Reply-To: <1477173007.35.0.842183977255.issue28512@psf.upfronthosting.co.za> Message-ID: <1490978195.69.0.630823246427.issue28512@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:35 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:35 +0000 Subject: [issue26654] asyncio is not inspecting keyword arguments of functools.partial In-Reply-To: <1459159050.15.0.830010057156.issue26654@psf.upfronthosting.co.za> Message-ID: <1490978195.84.0.434854785936.issue26654@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1083 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:35 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:35 +0000 Subject: [issue28517] Dead code in wordcode In-Reply-To: <1477286199.46.0.366284805485.issue28517@psf.upfronthosting.co.za> Message-ID: <1490978195.93.0.894060323994.issue28517@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1084 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:36 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:36 +0000 Subject: [issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros In-Reply-To: <1384348276.8.0.185765824651.issue19569@psf.upfronthosting.co.za> Message-ID: <1490978196.01.0.25117349639.issue19569@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1085 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:36 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:36 +0000 Subject: [issue29347] Python could crash while creating weakref for a given object In-Reply-To: <1485141841.25.0.0993319189306.issue29347@psf.upfronthosting.co.za> Message-ID: <1490978196.13.0.329369867878.issue29347@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:36 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:36 +0000 Subject: [issue27942] Default value identity regression In-Reply-To: <1472834737.57.0.822205168917.issue27942@psf.upfronthosting.co.za> Message-ID: <1490978196.55.0.6653657376.issue27942@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1087 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:36 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:36 +0000 Subject: [issue28849] do not define sys.implementation._multiarch on Android In-Reply-To: <1480579567.9.0.848858013461.issue28849@psf.upfronthosting.co.za> Message-ID: <1490978196.68.0.441774974869.issue28849@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1088 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:37 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:37 +0000 Subject: [issue27611] test_tix cannot import _default_root after test_idle In-Reply-To: <1469412436.77.0.964864196793.issue27611@psf.upfronthosting.co.za> Message-ID: <1490978197.02.0.740449879131.issue27611@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1089 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:37 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:37 +0000 Subject: [issue29058] Mark new limited C API In-Reply-To: <1482538310.89.0.583492092721.issue29058@psf.upfronthosting.co.za> Message-ID: <1490978197.1.0.365968522599.issue29058@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1090 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:37 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:37 +0000 Subject: [issue23903] Generate PC/python3.def by scraping headers In-Reply-To: <1428637761.13.0.348463350169.issue23903@psf.upfronthosting.co.za> Message-ID: <1490978197.19.0.575806086252.issue23903@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1091 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:37 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:37 +0000 Subject: [issue29579] Windows Python 3.7 installer broken by README.txt renamed to README.rst In-Reply-To: <1487238516.39.0.726696732648.issue29579@psf.upfronthosting.co.za> Message-ID: <1490978197.31.0.545557355762.issue29579@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1092 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:37 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:37 +0000 Subject: [issue23839] Clear caches after every test In-Reply-To: <1427887841.84.0.393130432881.issue23839@psf.upfronthosting.co.za> Message-ID: <1490978197.52.0.533963098666.issue23839@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1094 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:32 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:32 +0000 Subject: [issue28522] can't make IDLEX work with python._pth and python-3.6.0b2 In-Reply-To: <1477341913.28.0.0500470674993.issue28522@psf.upfronthosting.co.za> Message-ID: <1490978192.4.0.153459909198.issue28522@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1052 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:37 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:37 +0000 Subject: [issue28214] Improve exception reporting for problematic __set_name__ attributes In-Reply-To: <1474375122.62.0.719507311947.issue28214@psf.upfronthosting.co.za> Message-ID: <1490978197.41.0.140217910063.issue28214@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:37 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:37 +0000 Subject: [issue27759] selectors incorrectly retain invalid file descriptors In-Reply-To: <1471134409.41.0.274513488512.issue27759@psf.upfronthosting.co.za> Message-ID: <1490978197.65.0.573759081595.issue27759@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1095 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:37 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:37 +0000 Subject: [issue29571] test_re is failing when local is set for `en_IN` In-Reply-To: <1487179751.17.0.601093046575.issue29571@psf.upfronthosting.co.za> Message-ID: <1490978197.76.0.971995311843.issue29571@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1096 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:37 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:37 +0000 Subject: [issue28368] Refuse monitoring processes if the child watcher has no loop attached In-Reply-To: <1475700815.84.0.114441761384.issue28368@psf.upfronthosting.co.za> Message-ID: <1490978197.89.0.944920043173.issue28368@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1097 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:38 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:38 +0000 Subject: [issue28376] rangeiter_new fails when creating a range of step 0 In-Reply-To: <1475755227.93.0.551363347905.issue28376@psf.upfronthosting.co.za> Message-ID: <1490978197.98.0.531997434957.issue28376@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:38 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:38 +0000 Subject: [issue24241] webbrowser default browser detection and/or public API for _trylist. In-Reply-To: <1432042982.05.0.828874094042.issue24241@psf.upfronthosting.co.za> Message-ID: <1490978198.12.0.767189737608.issue24241@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1099 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:38 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:38 +0000 Subject: [issue29576] Improve some deprecations in the importlib In-Reply-To: <1487208454.1.0.000568467436348.issue29576@psf.upfronthosting.co.za> Message-ID: <1490978198.23.0.970629466189.issue29576@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1100 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:38 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:38 +0000 Subject: [issue28192] Don't import readline in isolated mode In-Reply-To: <1474138714.57.0.361326566705.issue28192@psf.upfronthosting.co.za> Message-ID: <1490978198.33.0.238854945448.issue28192@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:38 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:38 +0000 Subject: [issue28115] Use argparse for the zipfile module In-Reply-To: <1473750423.74.0.95052105427.issue28115@psf.upfronthosting.co.za> Message-ID: <1490978198.39.0.444738425306.issue28115@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1102 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:38 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:38 +0000 Subject: [issue28598] RHS not consulted in `str % subclass_of_str` case. In-Reply-To: <1478180164.76.0.63576586286.issue28598@psf.upfronthosting.co.za> Message-ID: <1490978198.53.0.355121782904.issue28598@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1103 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:38 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:38 +0000 Subject: [issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow In-Reply-To: <1466473561.23.0.768330028286.issue27358@psf.upfronthosting.co.za> Message-ID: <1490978198.61.0.999138082844.issue27358@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1104 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:38 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:38 +0000 Subject: [issue28676] On macOS Sierra, warning: implicit declaration of function 'getentropy' In-Reply-To: <1478979020.94.0.0997412321445.issue28676@psf.upfronthosting.co.za> Message-ID: <1490978198.73.0.579516318899.issue28676@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1105 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:38 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:38 +0000 Subject: [issue28110] launcher.msi has different product codes between 32 and 64-bit In-Reply-To: <1473712654.55.0.666881754896.issue28110@psf.upfronthosting.co.za> Message-ID: <1490978198.8.0.216485687276.issue28110@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1106 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:38 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:38 +0000 Subject: [issue28402] Add signed catalog files for stdlib on Windows In-Reply-To: <1476069470.02.0.829638678389.issue28402@psf.upfronthosting.co.za> Message-ID: <1490978198.88.0.352565285632.issue28402@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1107 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:38 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:38 +0000 Subject: [issue29100] datetime.fromtimestamp() doesn't check min/max year anymore: regression of Python 3.6 In-Reply-To: <1482972647.78.0.524140289263.issue29100@psf.upfronthosting.co.za> Message-ID: <1490978198.96.0.94104265945.issue29100@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1108 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:39 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:39 +0000 Subject: [issue28321] Plistlib: Half of the double width characters are missing when writing binary plist In-Reply-To: <1475276484.39.0.492967421117.issue28321@psf.upfronthosting.co.za> Message-ID: <1490978199.04.0.40324645537.issue28321@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1109 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:39 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:39 +0000 Subject: [issue28200] Windows: path_converter() leaks memory for Unicode filenames In-Reply-To: <1474239398.07.0.0972680059215.issue28200@psf.upfronthosting.co.za> Message-ID: <1490978199.25.0.140852127035.issue28200@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:39 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:39 +0000 Subject: [issue28203] complex() gives wrong error when the second argument has an invalid type In-Reply-To: <1474270906.0.0.604707439727.issue28203@psf.upfronthosting.co.za> Message-ID: <1490978199.33.0.57451233923.issue28203@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1112 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:39 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:39 +0000 Subject: [issue28596] on Android _bootlocale on startup relies on too many library modules In-Reply-To: <1478166520.26.0.975749703987.issue28596@psf.upfronthosting.co.za> Message-ID: <1490978199.41.0.396869768932.issue28596@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:36:39 2017 From: report at bugs.python.org (Donald Stufft) Date: Fri, 31 Mar 2017 16:36:39 +0000 Subject: [issue28201] dict: perturb shift should be done when first conflict In-Reply-To: <1474259113.17.0.570923386086.issue28201@psf.upfronthosting.co.za> Message-ID: <1490978199.11.0.191966992537.issue28201@psf.upfronthosting.co.za> Changes by Donald Stufft : ---------- pull_requests: +1110 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:37:57 2017 From: report at bugs.python.org (Thomas Wouters) Date: Fri, 31 Mar 2017 16:37:57 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490978277.69.0.293896491341.issue29941@psf.upfronthosting.co.za> Changes by Thomas Wouters : ---------- pull_requests: +1114 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 12:45:11 2017 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 31 Mar 2017 16:45:11 +0000 Subject: [issue29954] multiprocessing.Pool.__exit__() calls terminate() instead of close() In-Reply-To: <1490978159.71.0.789108610011.issue29954@psf.upfronthosting.co.za> Message-ID: <1490978711.93.0.239339218074.issue29954@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:02:48 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 31 Mar 2017 17:02:48 +0000 Subject: [issue28157] Document time module constants (timezone, tzname, etc.) as deprecated. In-Reply-To: <1473880626.53.0.480703935063.issue28157@psf.upfronthosting.co.za> Message-ID: <1490979768.46.0.669031583972.issue28157@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: needs patch -> patch review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:02:51 2017 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 31 Mar 2017 17:02:51 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <1490979771.31.0.209981634704.issue24452@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: I have Windows 10, 64-bit, and Python 3.6.1, 64-bit, and the code still does not work! >>> import webbrowser >>> webbrowser.get("chrome") Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python 3.6\lib\webbrowser.py", line 51, in get raise Error("could not locate runnable browser") webbrowser.Error: could not locate runnable browser Note: Yes, my Google Chrome browser was running when this command was executed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:05:03 2017 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 31 Mar 2017 17:05:03 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <1490979903.21.0.834498415952.issue24452@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:09:42 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 31 Mar 2017 17:09:42 +0000 Subject: [issue29534] _decimal difference with _pydecimal In-Reply-To: <1486821255.04.0.156424545638.issue29534@psf.upfronthosting.co.za> Message-ID: <1490980182.53.0.92188732115.issue29534@psf.upfronthosting.co.za> Stefan Krah added the comment: Does anyone know how to disable the spurious pull requests that keep coming in? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:12:04 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 31 Mar 2017 17:12:04 +0000 Subject: [issue24452] Make webbrowser support Chrome on Mac OS X In-Reply-To: <1434317605.99.0.218705045555.issue24452@psf.upfronthosting.co.za> Message-ID: <1490980324.97.0.446195660407.issue24452@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi Bo?tjan Mejak, this ticket addresses the change for MacOS. The windows support is in http://bugs.python.org/issue8232. Please raise the issue there. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:18:07 2017 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 31 Mar 2017 17:18:07 +0000 Subject: [issue29955] logging decimal point should come from locale Message-ID: <1490980687.61.0.0711345645767.issue29955@psf.upfronthosting.co.za> New submission from Skip Montanaro: The logging module hard codes the decimal point for timestamps to be ",". It should use locale.localeconv()["decimal_point"] instead. ---------- components: Library (Lib) messages: 290927 nosy: skip.montanaro priority: normal severity: normal status: open title: logging decimal point should come from locale type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:19:50 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 31 Mar 2017 17:19:50 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1490980790.46.0.105735850379.issue29949@psf.upfronthosting.co.za> INADA Naoki added the comment: I agree. Before thinking about rebalance between size and speed, resolving regression is important. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:19:55 2017 From: report at bugs.python.org (Thomas Wouters) Date: Fri, 31 Mar 2017 17:19:55 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490980795.89.0.40660172907.issue29941@psf.upfronthosting.co.za> Changes by Thomas Wouters : ---------- pull_requests: +1115 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:21:50 2017 From: report at bugs.python.org (Thomas Wouters) Date: Fri, 31 Mar 2017 17:21:50 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490980910.59.0.113518428661.issue29941@psf.upfronthosting.co.za> Thomas Wouters added the comment: FYI, buildbot issues should be fixed by PR #930. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:22:26 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 31 Mar 2017 17:22:26 +0000 Subject: [issue8232] webbrowser.open incomplete on Windows In-Reply-To: <1269541962.46.0.762619344208.issue8232@psf.upfronthosting.co.za> Message-ID: <1490980946.45.0.283368532396.issue8232@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Steve, would you like to create a PR based on your patch here? Also, what versions should this be targeted to now? Thanks. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:29:06 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 31 Mar 2017 17:29:06 +0000 Subject: [issue29951] PyArg_ParseTupleAndKeywords exception messages containing "function" In-Reply-To: <1490918587.4.0.0607667805061.issue29951@psf.upfronthosting.co.za> Message-ID: <1490981346.04.0.272899615409.issue29951@psf.upfronthosting.co.za> R. David Murray added the comment: If you want to be completely unambiguous, you could say "keyword argument names". "keyword argument" appears to mean different things in different contexts; sometimes it means the name and the value together, sometimes one or the other. Usually which one it is is clear from context, but it seems in this case it is not clear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:40:47 2017 From: report at bugs.python.org (Roundup Robot) Date: Fri, 31 Mar 2017 17:40:47 +0000 Subject: [issue29955] logging decimal point should come from locale In-Reply-To: <1490980687.61.0.0711345645767.issue29955@psf.upfronthosting.co.za> Message-ID: <1490982047.99.0.921665696389.issue29955@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +1116 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:49:52 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 31 Mar 2017 17:49:52 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490982592.01.0.604966431253.issue29941@psf.upfronthosting.co.za> Zachary Ware added the comment: Buildbots are happy, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 13:58:57 2017 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 31 Mar 2017 17:58:57 +0000 Subject: [issue29955] logging decimal point should come from locale In-Reply-To: <1490980687.61.0.0711345645767.issue29955@psf.upfronthosting.co.za> Message-ID: <1490983137.15.0.326163845696.issue29955@psf.upfronthosting.co.za> Vinay Sajip added the comment: It's not exactly a decimal point, more a "decimal mark" as per ISO 8601. From the Wikipedia article for the standard at "https://en.wikipedia.org/wiki/ISO_8601#Times - "However, a fraction may only be added to the lowest order time element in the representation. A decimal mark, either a comma or a dot (without any preference as stated in resolution 10 of the 22nd General Conference CGPM in 2003, but with a preference for a comma according to ISO 8601:2004) is used as a separator between the time element and its fraction." and the citation is "ISO 8601:2004(E), ISO, 2004-12-01, 4.2.2.4 ... the decimal fraction shall be divided from the integer part by the decimal sign specified in ISO 31-0, i.e. the comma [,] or full stop [.]. Of these, the comma is the preferred sign." Nothing about picking a decimal point based on the current locale. ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 14:01:38 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 31 Mar 2017 18:01:38 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1490983298.61.0.701404982348.issue29949@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Do you want to prepare a PR for me? I not yet set-up with the ways of Github. Please limit the PR to just unwinding the refactoring in the simplest possible way.. If in the future you want to chat about speed/space trade-offs, we can do that offline. I've spent years thinking about this, interacting with users, discussing with other devs, speaking on the topic, and working through use cases for sets. The original reasons for the choices made largely are still true today. I would be happy to walk you through the history (the tracker isn't a good place to do this, IRC would serve us better). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 14:01:40 2017 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 31 Mar 2017 18:01:40 +0000 Subject: [issue8232] webbrowser.open incomplete on Windows In-Reply-To: <1269541962.46.0.762619344208.issue8232@psf.upfronthosting.co.za> Message-ID: <1490983300.39.0.144322293918.issue8232@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: I have Windows 10, 64-bit, and Python 3.6.1, 64-bit, and the code still does not work! >>> import webbrowser >>> webbrowser.get("chrome") Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python 3.6\lib\webbrowser.py", line 51, in get raise Error("could not locate runnable browser") webbrowser.Error: could not locate runnable browser Note: Yes, my Google Chrome browser was running when this command was executed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 15:48:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 19:48:18 +0000 Subject: [issue29953] Memory leak in the replace() method of datetime and time objects In-Reply-To: <1490967865.61.0.513039272437.issue29953@psf.upfronthosting.co.za> Message-ID: <1490989698.9.0.304886891887.issue29953@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 314d6fca36a4eaa0541218431d14804fadec6488 by Serhiy Storchaka in branch 'master': bpo-29953: Fix memory leaks in the replace() method of datetime and time (#927) https://github.com/python/cpython/commit/314d6fca36a4eaa0541218431d14804fadec6488 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 15:51:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 19:51:44 +0000 Subject: [issue29953] Memory leak in the replace() method of datetime and time objects In-Reply-To: <1490967865.61.0.513039272437.issue29953@psf.upfronthosting.co.za> Message-ID: <1490989904.49.0.537553876581.issue29953@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +1117 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 15:53:35 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 31 Mar 2017 19:53:35 +0000 Subject: [issue29922] error message when __aexit__ is not async In-Reply-To: <1490635462.94.0.877144122619.issue29922@psf.upfronthosting.co.za> Message-ID: <1490990015.56.0.664248398821.issue29922@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 16:08:37 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 31 Mar 2017 20:08:37 +0000 Subject: [issue29956] math.exp documentation is misleading Message-ID: <1490990917.06.0.404933995002.issue29956@psf.upfronthosting.co.za> New submission from Alexander Belopolsky: The math.exp(x) function is documented to "Return e**x" . This is misleading because even in the simplest case, math.exp(x) is not the same as math.e ** x: >>> import math >>> math.exp(2) - math.e ** 2 8.881784197001252e-16 I suggest using ex instead of e**x to distinguish between Python syntax and mathematical operation and change "Return e**x" to "Return ex, the base-e exponential of x." ---------- assignee: docs at python components: Documentation messages: 290937 nosy: belopolsky, docs at python priority: normal severity: normal status: open title: math.exp documentation is misleading versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 16:23:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 20:23:51 +0000 Subject: [issue29953] Memory leak in the replace() method of datetime and time objects In-Reply-To: <1490967865.61.0.513039272437.issue29953@psf.upfronthosting.co.za> Message-ID: <1490991831.58.0.640951867926.issue29953@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 7d5d13d8d003ae5b62bb8c9ef1d1f310eaabc506 by Serhiy Storchaka in branch '3.6': bpo-29953: Fix memory leaks in the replace() method of datetime and t? (#933) https://github.com/python/cpython/commit/7d5d13d8d003ae5b62bb8c9ef1d1f310eaabc506 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 16:24:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 20:24:49 +0000 Subject: [issue29953] Memory leak in the replace() method of datetime and time objects In-Reply-To: <1490967865.61.0.513039272437.issue29953@psf.upfronthosting.co.za> Message-ID: <1490991889.08.0.96746900163.issue29953@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 16:29:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 20:29:30 +0000 Subject: [issue29956] math.exp documentation is misleading In-Reply-To: <1490990917.06.0.404933995002.issue29956@psf.upfronthosting.co.za> Message-ID: <1490992170.95.0.696355682594.issue29956@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is because math.e is not the same as e. ---------- nosy: +mark.dickinson, rhettinger, serhiy.storchaka, stutzbach, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 16:36:18 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 31 Mar 2017 20:36:18 +0000 Subject: [issue29956] math.exp documentation is misleading In-Reply-To: <1490990917.06.0.404933995002.issue29956@psf.upfronthosting.co.za> Message-ID: <1490992578.34.0.721148151282.issue29956@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > This is because math.e is not the same as e. Right. That's why I think it would be nice to distinguish math.e and the base of the natural logarithm typographically in the docs. Can we use sphinx math mode? If not, I would use italic for the mathematical e. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 16:54:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 31 Mar 2017 20:54:14 +0000 Subject: [issue29956] math.exp documentation is misleading In-Reply-To: <1490990917.06.0.404933995002.issue29956@psf.upfronthosting.co.za> Message-ID: <1490993654.0.0.877979076518.issue29956@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: *e*:sup:`x` ? I like this idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 17:19:33 2017 From: report at bugs.python.org (Thomas Wouters) Date: Fri, 31 Mar 2017 21:19:33 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490995173.02.0.702002032146.issue29941@psf.upfronthosting.co.za> Changes by Thomas Wouters : ---------- pull_requests: +1118 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 17:20:07 2017 From: report at bugs.python.org (Thomas Wouters) Date: Fri, 31 Mar 2017 21:20:07 +0000 Subject: [issue29941] Confusion between asserts and Py_DEBUG In-Reply-To: <1490805708.56.0.244134698101.issue29941@psf.upfronthosting.co.za> Message-ID: <1490995207.78.0.724194052095.issue29941@psf.upfronthosting.co.za> Changes by Thomas Wouters : ---------- pull_requests: +1119 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 17:37:03 2017 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 31 Mar 2017 21:37:03 +0000 Subject: [issue29955] logging decimal point should come from locale In-Reply-To: <1490980687.61.0.0711345645767.issue29955@psf.upfronthosting.co.za> Message-ID: <1490996223.95.0.0969408078806.issue29955@psf.upfronthosting.co.za> Skip Montanaro added the comment: It's Vinay's code, so what he wants should carry the most weight. I did this as much as an exercise in figuring out the whole pull request/bug report process as anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 17:37:56 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 31 Mar 2017 21:37:56 +0000 Subject: [issue29725] sqlite3.Cursor doesn't properly document "arraysize" In-Reply-To: <1488732449.69.0.822466282685.issue29725@psf.upfronthosting.co.za> Message-ID: <1490996276.34.0.0611315248176.issue29725@psf.upfronthosting.co.za> Berker Peksag added the comment: > There is another attribute called row_factory in the cursor structure > that isn't in the docs. There is a row_factory defined in the docs, > but that one is for the connection structure. Should it be added under > cursor as well? Thank you for working on this issue, Cheryl. Cursor.row_factory is there for backwards compatibility reasons so we can't remove it until we retire Python 2. For example, pysqlite has already been removed it in version 2.8.0 [1] but they don't have a strict backwards compatibility policy since their user base is much smaller than us and it only supports Python 2. [1] https://github.com/ghaering/pysqlite/commit/10dbbe4cca7487a3c65776186b3fb4ceeab5e8fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 17:48:14 2017 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 31 Mar 2017 21:48:14 +0000 Subject: [issue29955] logging decimal point should come from locale In-Reply-To: <1490980687.61.0.0711345645767.issue29955@psf.upfronthosting.co.za> Message-ID: <1490996894.83.0.00767163134546.issue29955@psf.upfronthosting.co.za> Skip Montanaro added the comment: One example demonstrating that the datetime module at least prefers a decimal point: >>> import dateutil.parser >>> t = '1993-04-21 08:03:00,123' >>> dateutil.parser.parse(t) datetime.datetime(1993, 4, 21, 8, 3, 0, 123000) >>> dateutil.parser.parse(t).isoformat() '1993-04-21T08:03:00.123000' Looking at datetime.py, it appears the dot is hard-coded there. Maybe there would be value in the right hand (logging) and the left hand (datetime) doing things the same way? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 18:01:47 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 31 Mar 2017 22:01:47 +0000 Subject: [issue29595] Expose max_queue_size in ThreadPoolExecutor In-Reply-To: <1487369423.42.0.265838648983.issue29595@psf.upfronthosting.co.za> Message-ID: <1490997707.0.0.717958991758.issue29595@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 18:53:42 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 31 Mar 2017 22:53:42 +0000 Subject: [issue28157] Document time module constants (timezone, tzname, etc.) as deprecated. In-Reply-To: <1473880626.53.0.480703935063.issue28157@psf.upfronthosting.co.za> Message-ID: <1491000822.69.0.0958378030222.issue28157@psf.upfronthosting.co.za> Cheryl Sabella added the comment: We were discussing changing the docstring on the pull request and I had additional questions, so I am moving them here for discussion: I've been looking at pydoc math and pydoc time (and the the module.c source). Before I go down the wrong path, I'm not sure I fully understand your comment - "(Also, markup can be improved in the time module docstring. Compare pydoc time and pydoc math.)" The time one is more vebose in the description and it lists the Variables and Functions in the text and then defines them with markup further down. Are you saying the variables and functions should be removed from being written in text within the description? Thanks. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 18:54:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 Mar 2017 22:54:41 +0000 Subject: [issue25464] Tix HList header_exists should be "exist" In-Reply-To: <1445555946.1.0.542845821493.issue25464@psf.upfronthosting.co.za> Message-ID: <1491000881.65.0.930302679583.issue25464@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: -833 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 18:59:13 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 31 Mar 2017 22:59:13 +0000 Subject: [issue28157] Document time module constants (timezone, tzname, etc.) as deprecated. In-Reply-To: <1473880626.53.0.480703935063.issue28157@psf.upfronthosting.co.za> Message-ID: <1491001153.55.0.843648068546.issue28157@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The time and math modules are probably the oldest Python modules, but math have seen more development recently, so it should serve as a good model for how things should be organized. Yes, I believe re-listing module functions and constants in the module docstring is redundant and error-prone. ---------- nosy: +haypo, mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 19:11:11 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 31 Mar 2017 23:11:11 +0000 Subject: [issue28157] Document time module constants (timezone, tzname, etc.) as deprecated. In-Reply-To: <1473880626.53.0.480703935063.issue28157@psf.upfronthosting.co.za> Message-ID: <1491001871.84.0.220931362779.issue28157@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: A question for Victor: Should we split the "Constants" section into "Clock ID constants" and "Timezone constants"? (See PR 928.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 19:11:58 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 31 Mar 2017 23:11:58 +0000 Subject: [issue29956] math.exp documentation is misleading In-Reply-To: <1490990917.06.0.404933995002.issue29956@psf.upfronthosting.co.za> Message-ID: <1491001918.93.0.431287346263.issue29956@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I suggest changing the main docs to match the existing docstring, "Return e raised to the power of x." The exp() function is a thin wrapper around the C math library and where it is documented as "compute e (the base of natural logarithms) raised to the power x" or "e raised to the power X (where e is the base of the natural system of logarithms, approximately 2.71828)." Our docs shouldn't make more or fewer promises than the upstream libraries are making. Perhaps there can be a general note about reading too much into the math module implementation details. We expect some relationships to only be approximate: log(x)+1?log1p(x), log2(x)?log(x,2.0), exp(lgamma(x))?gamma(x), sqrt(x)?x**0.5, etc. These are floating point math library "facts of life". * http://www.slac.stanford.edu/comp/unix/package/rtems/doc/html/libm/libm.info.exp.html * https://www.gnu.org/software/libc/manual/html_node/Exponents-and-Logarithms.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 19:12:12 2017 From: report at bugs.python.org (Cameron Simpson) Date: Fri, 31 Mar 2017 23:12:12 +0000 Subject: [issue29949] sizeof set after set_merge() is doubled from 3.5 In-Reply-To: <1490897353.44.0.901506949839.issue29949@psf.upfronthosting.co.za> Message-ID: <1491001932.86.0.770793212489.issue29949@psf.upfronthosting.co.za> Changes by Cameron Simpson : ---------- nosy: +cameron _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 19:12:21 2017 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 31 Mar 2017 23:12:21 +0000 Subject: [issue28596] on Android _bootlocale on startup relies on too many library modules In-Reply-To: <1478166520.26.0.975749703987.issue28596@psf.upfronthosting.co.za> Message-ID: <1491001941.31.0.771082455525.issue28596@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 19:19:49 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 31 Mar 2017 23:19:49 +0000 Subject: [issue29595] Expose max_queue_size in ThreadPoolExecutor In-Reply-To: <1487369423.42.0.265838648983.issue29595@psf.upfronthosting.co.za> Message-ID: <1491002389.74.0.0742297977339.issue29595@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Prayslayer, please don't shove. Your PR request was responded to by Mariatta so it wasn't ignored. Making decisions about API expansions takes a while (making sure it fits the intended use, that it isn't a bug factory itself, that it is broadly useful, that it is the best solution to the problem, that is doesn't complicate the implementation or limit future opportunities, that there are unforeseen problems). Among the core developers, there are only a couple part-time contributors who are qualified to make these assessments for the multi-processing module (those devs don't include me). ---------- assignee: -> davin nosy: +davin, pitrou, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 19:23:42 2017 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 31 Mar 2017 23:23:42 +0000 Subject: [issue28596] on Android _bootlocale on startup relies on too many library modules In-Reply-To: <1478166520.26.0.975749703987.issue28596@psf.upfronthosting.co.za> Message-ID: <1491002622.44.0.105186219487.issue28596@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- pull_requests: -1113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 19:30:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 31 Mar 2017 23:30:56 +0000 Subject: [issue28157] Document time module constants (timezone, tzname, etc.) as deprecated. In-Reply-To: <1473880626.53.0.480703935063.issue28157@psf.upfronthosting.co.za> Message-ID: <1491003056.47.0.779005093537.issue28157@psf.upfronthosting.co.za> STINNER Victor added the comment: IMHO it's worth it to have a dedicated section for CLOCK_xxx constants. It would allow to mention which functions use them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 19:33:06 2017 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 31 Mar 2017 23:33:06 +0000 Subject: [issue28596] on Android _bootlocale on startup relies on too many library modules In-Reply-To: <1478166520.26.0.975749703987.issue28596@psf.upfronthosting.co.za> Message-ID: <1491003186.38.0.846535672284.issue28596@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- pull_requests: +1113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 19:33:26 2017 From: report at bugs.python.org (admin) Date: Fri, 31 Mar 2017 23:33:26 +0000 Subject: [issue28596] on Android _bootlocale on startup relies on too many library modules In-Reply-To: <1478166520.26.0.975749703987.issue28596@psf.upfronthosting.co.za> Message-ID: <1491003206.69.0.772741980874.issue28596@psf.upfronthosting.co.za> Changes by admin : ---------- pull_requests: -1113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 20:08:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 01 Apr 2017 00:08:27 +0000 Subject: [issue29944] Argumentless super() fails in classes constructed with type() In-Reply-To: <1490855809.89.0.267666010996.issue29944@psf.upfronthosting.co.za> Message-ID: <1491005307.27.0.017852481575.issue29944@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: Argumentless super() calls do not work in classes constructed with type() -> Argumentless super() fails in classes constructed with type() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 20:09:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 01 Apr 2017 00:09:48 +0000 Subject: [issue29952] "keys and values" preferred to "keys and elements" for dict constituent In-Reply-To: <1490931613.41.0.406216073022.issue29952@psf.upfronthosting.co.za> Message-ID: <1491005388.7.0.334189531325.issue29952@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: "keys and values" is preferred to "keys and elements" for name of dict constituent -> "keys and values" preferred to "keys and elements" for dict constituent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 21:05:57 2017 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 01 Apr 2017 01:05:57 +0000 Subject: [issue29954] multiprocessing.Pool.__exit__() calls terminate() instead of close() In-Reply-To: <1490978159.71.0.789108610011.issue29954@psf.upfronthosting.co.za> Message-ID: <1491008757.25.0.111512970397.issue29954@psf.upfronthosting.co.za> Josh Rosenberg added the comment: I suspect it's far too late to change this, given compatibility constraints. If you want it to close instead of terminate, contextlib.closing is always an option. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 22:06:25 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 01 Apr 2017 02:06:25 +0000 Subject: [issue29947] In SocketServer, why not passing a factory instance for the RequestHandlerClass instead of the class itself? In-Reply-To: <1490875733.83.0.750732897079.issue29947@psf.upfronthosting.co.za> Message-ID: <1491012385.63.0.920996582853.issue29947@psf.upfronthosting.co.za> R. David Murray added the comment: I think I'm missing something here. What prevents one from passing a factory function as the RequestHandlerClass argument? In Python, a class name *is* a factory function for class instances. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Mar 31 22:10:10 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Sat, 01 Apr 2017 02:10:10 +0000 Subject: [issue28629] Emit ResourceWarning when implicitly terminating a suspended frame? In-Reply-To: <1478487031.39.0.63356302946.issue28629@psf.upfronthosting.co.za> Message-ID: <1491012610.15.0.300189604158.issue28629@psf.upfronthosting.co.za> Nathaniel Smith added the comment: It does make sense to skip emitting a warning if there's no try or with block active. Don't we already have the ability to check for this, though, without any extensions to the frame or code objects? That's what the public PyGen_NeedsFinalizing does, right? It's implemented as a for loop over the frame's block stack, which in most cases should be extremely small, so the performance cost of running this from generator.__del__ seems likely to be minimal. (I think currently the implementation is not *quite* correct if there's a 'yield from' active ? in most cases it won't much matter because if A is yielding from B and A is collected, then B will probably be collected a moment later and have its own __del__ called. But this is not *quite* the same as what should happen, which is that collecting A should immediately call B.close(), which in principle might do something arbitrarily different than B.__del__. But adding a check for whether a 'yield from' is active would be pretty trivial.) ---------- _______________________________________ Python tracker _______________________________________