[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-03 Thread Anthony Sottile
New submission from Anthony Sottile : Fortunately, this can be reproduced with the testsuite: ``` == ERROR: test_copystat_symlinks (__main__.TestShutil)

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-03 Thread Anthony Sottile
Anthony Sottile added the comment: Here's one idea for a patch (inspired by the rest of the function): ``` diff --git a/Lib/shutil.py b/Lib/shutil.py index 464ee91..2099289 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -213,6 +213,13 @@ def copystat(src, dst, *,

[issue31889] difflib SequenceMatcher ratio() still have unpredictable behavior

2017-11-03 Thread Tim Peters
Tim Peters added the comment: Pass "autojunk=False" to your SequenceMatcher constructor and the ratio you get back will continue to increase as `i` increases. The docs: """ Automatic junk heuristic: SequenceMatcher supports a heuristic that automatically treats certain

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Steve D'Aprano
On Sat, 4 Nov 2017 06:15 am, Michael Torrie wrote: > In fact if you have no break you may as well drop the > else entirely, because the block will always execute. That's incorrect. There are multiple ways to exit a loop that will prevent the `else` block from executing, `break` is only one.

Re: Thread safety issue (I think) with defaultdict

2017-11-03 Thread Steve D'Aprano
On Sat, 4 Nov 2017 05:12 am, Israel Brewster wrote: [...] >> People generally understand how to move data around, and the mistakes are >> usually pretty obvious when they happen. > > I think the existence of this thread indicates otherwise :-) This mistake > was far from obvious, and clearly I

[issue31935] subprocess.run() timeout not working with grandchildren and stdout=PIPE

2017-11-03 Thread Martin Panter
Martin Panter added the comment: This proposal sounds like a race condition. Closing the output pipe as a child exits means you risk missing recent output. On the other hand, if you don’t care about the output any more, close the pipe first and then wait for the child.

[issue31941] ImportError: DLL Load Failure: The specified module cannot be found

2017-11-03 Thread xoviat
New submission from xoviat : Yes, I know that this isn't Python's fault. I know how to resolve the problem. But what's frustrating is that this error message is totally unhelpful, because it doesn't contain the DLL that Python is looking for. Yes, I know that the error

[issue31941] ImportError: DLL Load Failure: The specified module cannot be found

2017-11-03 Thread R. David Murray
R. David Murray added the comment: Duplicate of #25655. Any concrete proposals for how to make this better are welcome. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Python errors related to

[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Christian Heimes
Christian Heimes added the comment: New changeset a512493371a073e252a2e52b445aa2d66ddca7cb by Christian Heimes (Miss Islington (bot)) in branch '3.6': bpo-31933: fix blake2 multi-byte params on big endian platforms (GH-4250) (#4262)

[issue9678] uuid._ifconfig_getnode can't work on NetBSD

2017-11-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4226 status: pending -> open ___ Python tracker ___

[issue31936] "5. The import system" grammatical error

2017-11-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: New changeset 93952f881500053057c2e08c4b253ac61233d7db by Barry Warsaw in branch 'master': Fix a grammatical problem and reword for clarity. (#4257) https://github.com/python/cpython/commit/93952f881500053057c2e08c4b253ac61233d7db

[issue31937] Add the term "dunder" to the glossary

2017-11-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: -1 until we have something we can call a "mifflin". (Kidding of course!) -- nosy: +barry ___ Python tracker

[issue31937] Add the term "dunder" to the glossary

2017-11-03 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: > until we have something we can call a "mifflin". Name of next GitHub bot? :P -- nosy: +Mariatta ___ Python tracker

[issue31415] Add -X option to show import time

2017-11-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: > `PYTHONPROFILEIMPORTTIME=x python` isn’t *too* onerous It does not work on Windows. C:\Users\Terry>PYTHONPROFILEIMPORTTIME=x python 'PYTHONPROFILEIMPORTTIME' is not recognized as an internal or external command, operable program or batch

[issue31415] Add -X option to show import time

2017-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: On Windows you can create a 2-line bat-file that sets the environment variable and runs Python. -- ___ Python tracker

[issue31932] setup.py cannot find vcversall.bat on MSWin 8.1 if installed in user AppData

2017-11-03 Thread Hugh Fisher
Change by Hugh Fisher : -- keywords: +patch pull_requests: +4227 stage: -> patch review ___ Python tracker ___

[issue31938] Convert selectmodule.c to Argument Clinic

2017-11-03 Thread Tal Einat
Tal Einat added the comment: See PR 4265. -- ___ Python tracker ___ ___

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Ian Kelly
On Fri, Nov 3, 2017 at 3:25 PM, Stefan Ram wrote: > Jon Ribbens writes: >>No, it's an obvious bug. You have a 'for...else' with no 'break'. >>Like I said, that should probably be a syntax error. > > It should make the syntax of Python much

[issue31938] Convert selectmodule.c to Argument Clinic

2017-11-03 Thread Tal Einat
Change by Tal Einat : -- keywords: +patch pull_requests: +4228 stage: -> patch review ___ Python tracker ___

Re: python3 byte decode

2017-11-03 Thread Terry Reedy
On 11/3/2017 5:24 AM, Ali Rıza KELEŞ wrote: Hi, Yesterday, while working with redis, i encountered a strange case. I want to ask why is the following `True` ``` "s" is b"s".decode() ``` while the followings are `False`? ``` "so" is b"so".decode() "som" is b"som".decode() "some" is

[issue31889] difflib SequenceMatcher ratio() still have unpredictable behavior

2017-11-03 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +tim.peters versions: +Python 3.7 -Python 3.5 ___ Python tracker ___

[issue31924] Fix test_curses on NetBSD 8

2017-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8ce98543ef959bb65da2fb57b0d442b3b6e8a087 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-31924: Fix test_curses on NetBSD 8. (GH-4228) (#4259)

[issue31924] Fix test_curses on NetBSD 8

2017-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6a9a331b34f39a3df1c3a91ffcac12a9608b1e57 by Serhiy Storchaka (Miss Islington (bot)) in branch '2.7': bpo-31924: Fix test_curses on NetBSD 8. (GH-4228) (#4260)

[issue31904] Python should support VxWorks RTOS

2017-11-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: The following might be relevant to this issue: https://www.python.org/dev/peps/pep-0011/#supporting-platforms -- nosy: +terry.reedy ___ Python tracker

[issue31937] Add the term "dunder" to the glossary

2017-11-03 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Anyway, +1 to adding dunder to glossary. -- ___ Python tracker ___

[issue31938] Convert selectmodule.c to Argument Clinic

2017-11-03 Thread Tal Einat
New submission from Tal Einat : Continuing the work begun as part of issue #20182, this is regarding the Argument Clinic conversion of Modules/selectmodule.c.h. I have a complete conversion ready and will create a PR momentarily. -- components: Argument Clinic

[issue31415] Add -X option to show import time

2017-11-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that with environment variable you get more information. $ ./python -X importtime -c pass import time: self [us] | cumulative | imported package import time:88 | 88 | _codecs import time: 789 |

[issue31870] add timeout parameter for get_server_certificate in ssl.py

2017-11-03 Thread Christian Heimes
Change by Christian Heimes : -- assignee: -> christian.heimes components: +SSL -Library (Lib) nosy: +alex, christian.heimes, dstufft, janssen stage: -> patch review versions: +Python 3.7 ___ Python tracker

[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-11-03 Thread Tal Einat
Tal Einat added the comment: See issue #31938 regarding Modules/selectmodule.c. -- ___ Python tracker ___

[issue31924] Fix test_curses on NetBSD 8

2017-11-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue9678] uuid._ifconfig_getnode can't work on NetBSD

2017-11-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5 ___ Python tracker ___

[issue31936] "5. The import system" grammatical error

2017-11-03 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31937] Add the term "dunder" to the glossary

2017-11-03 Thread Brett Cannon
New submission from Brett Cannon : The term "dunder" is used out in the community regularly, but if you have never been exposed to it before it can seem a little odd without context. -- assignee: docs@python components: Documentation messages: 305509 nosy:

[issue4356] Add "key" argument to "bisect" module functions

2017-11-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: obviously didn't make it in 3.6 but this still seems desirable. I just saw someone at work propose a trivial port of golang's sort.Search - https://golang.org/pkg/sort/#Search - in Python which caused me to hunt for an issue on bisect

[issue31933] some Blake2 parameters are encoded backwards on big-endian platforms

2017-11-03 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue31415] Add -X option to show import time

2017-11-03 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Nov 3, 2017, at 11:05, Serhiy Storchaka wrote: > > But now, after adding the environment variable, do we still need the -X > option? From a user side I don't see much difference between specifying an > option

[issue31895] Native hijri calendar support

2017-11-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Haneef, thank you for the explanation. Any such addition would need a PEP. But I agree with Marc-Andre that supporting the multitude of calendars is out of scope for the stdlib. So I suspect such a PEP would be rejected, with the

[issue31896] In function define class inherit ctypes.structure, and using ctypes.pointer leak memory

2017-11-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: The tracker is for patching CPython. Please consider closing this and asking your question on python-list. When you post code, do so only once, and without line numbers, so it can be copied and run as is. Do include data on the ref

[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-11-03 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +4229 ___ Python tracker ___ ___

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Chris Angelico
On Sat, Nov 4, 2017 at 1:57 PM, Michael Torrie wrote: > On 11/03/2017 07:09 PM, Steve D'Aprano wrote: >> On Sat, 4 Nov 2017 06:15 am, Michael Torrie wrote: >> >>> In fact if you have no break you may as well drop the >>> else entirely, because the block will always execute. >>

[issue31415] Add -X option to show import time

2017-11-03 Thread INADA Naoki
INADA Naoki added the comment: I'm +1 to remove -X option. Supporting both form makes code ugly and benefit is too small. And +1 to negative cache too. It's simple for environment varianle. -- ___ Python tracker

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-03 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +4230 stage: -> patch review ___ Python tracker ___

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Michael Torrie
On 11/03/2017 09:06 PM, Chris Angelico wrote: > On Sat, Nov 4, 2017 at 1:57 PM, Michael Torrie wrote: >> On 11/03/2017 07:09 PM, Steve D'Aprano wrote: >>> On Sat, 4 Nov 2017 06:15 am, Michael Torrie wrote: >>> In fact if you have no break you may as well drop the else

Re: replacing `else` with `then` in `for` and `try`

2017-11-03 Thread Michael Torrie
On 11/03/2017 07:09 PM, Steve D'Aprano wrote: > On Sat, 4 Nov 2017 06:15 am, Michael Torrie wrote: > >> In fact if you have no break you may as well drop the >> else entirely, because the block will always execute. > > That's incorrect. There are multiple ways to exit a loop that will prevent

[issue31898] Add a `recommended-packages.txt` file

2017-11-03 Thread Nick Coghlan
Nick Coghlan added the comment: In https://mail.python.org/pipermail/python-ideas/2017-October/047599.html, Guido suggested managing this as an occasionally updated Informational PEP (somewhat akin to PEP 394), and I think that will actually work fairly well: * it clearly

Re: Share unpickleable object across processes

2017-11-03 Thread dieter
Israel Brewster writes: > I have a Flask/UWSGI web app that serves up web socket connections. When a > web socket connection is created, I want to store a reference to said web > socket so I can do things like write messages to every connected > socket/disconnect

<    1   2