[issue29441] Update examples to use async and await keywords in asyncio-task.rst

2017-02-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset dbfbdf9dce7889699e1eb7cc4644a911b16665ec by Berker Peksag in branch 'master': Issue #29441: Update examples to use async and await keywords in asyncio-task.rst https://github.com/python/cpython/commit/dbfbdf9dce7889699e1eb7cc4644a911b16665ec New

[issue29441] Update examples to use async and await keywords in asyncio-task.rst

2017-02-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset dbfbdf9dce7889699e1eb7cc4644a911b16665ec by Berker Peksag in branch '3.6': Issue #29441: Update examples to use async and await keywords in asyncio-task.rst https://github.com/python/cpython/commit/dbfbdf9dce7889699e1eb7cc4644a911b16665ec New

[issue29441] Update examples to use async and await keywords in asyncio-task.rst

2017-02-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset dbfbdf9dce7889699e1eb7cc4644a911b16665ec by Berker Peksag in branch '3.5': Issue #29441: Update examples to use async and await keywords in asyncio-task.rst https://github.com/python/cpython/commit/dbfbdf9dce7889699e1eb7cc4644a911b16665ec

[issue29453] Remove reference to undefined dictionary ordering in Tutorial

2017-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't know. David, Raymond, what are your thoughts? -- ___ Python tracker ___

[issue29470] [python] Error in `/usr/bin/python': free(): invalid size: 0x00007f628400d0e0

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: Python 3.6 got a new PYTHONMALLOC env var which should help you ;-) Please try to get the Python traceback on the crash and use Python builtin memory debugger: PYTHONMALLOC=debug python3 -X faulthandler ... > i've restarted this under valgrind to debug it.

[issue29465] Add _PyObject_FastCall() to reduce stack consumption

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: Oh, pyobject_fastcall-3.patch contains a performance bug :-p PyObject_Call() "unpacks" the tuple and then recreates a new tuple to call functions in for functions other than Python and C functions. -- ___ Python

[issue29441] Update examples to use async and await keywords in asyncio-task.rst

2017-02-07 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the reviews! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29441] Update examples to use async and await keywords in asyncio-task.rst

2017-02-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 514571268743 by Berker Peksag in branch '3.5': Issue #29441: Update examples to use async and await keywords in asyncio-task.rst https://hg.python.org/cpython/rev/514571268743 New changeset 975e03b0aea6 by Berker Peksag in branch '3.6': Issue

[issue29469] AST-level Constant folding

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: With this change, the Python compiler doesn't emit ast.Num nor ast.Str, right? If we merge such change, we should prepare projects using AST. There is something like that in pip, but I failed to remind which one :-/ It should be easy: apply your patch, try to

[issue29471] AST: add an attribute to FunctionDef to distinguish functions from generators and coroutines

2017-02-07 Thread Vedran Čačić
Vedran Čačić added the comment: I remember the message from Guido, long time ago when the syntax of generators was discussed. He said he has a hunch that new keyword will not be necessary, that the presence of yield will be enough. It'd be interesting to see if he has changed his mind, or he

[issue29256] Windows select() errors out when given no fds to select on, which breaks SelectSelector

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: > 2) Modify the select.select() wrapper so that it behaves consistently on all > operating systems, by special-casing this situation on Windows. Please don't do that. In Python, we have a long tradition of trying to provide thin wrappers to OS functions: os

[issue29463] Change docstring to attribute from first statement.

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: I like the change because (IMHO) it makes the code simpler, and becase it also changes the first line of code object. I reviewed the patch: need basic unit tests. -- ___ Python tracker

[issue29469] AST-level Constant folding

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: I suggest you to look at my AST optimizer, especially the constant folding part: https://github.com/haypo/fatoptimizer/blob/master/fatoptimizer/const_fold.py And the unit tests, search for BaseConstantFoldingTests:

[issue29471] AST: add an attribute to FunctionDef to distinguish functions from generators and coroutines

2017-02-07 Thread STINNER Victor
New submission from STINNER Victor: Currently, symtable_visit_expr() has browse into the AST tree to look up yield, yield from or await to check if a function is a generator or a coroutine. If we choose to start to work on AST optimizers, I would suggest to add an attribute to ast.FunctionDef

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: I created the issue #29471: "AST: add an attribute to FunctionDef to distinguish functions from generators and coroutines". -- ___ Python tracker

[issue29469] AST-level Constant folding

2017-02-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Interpreter Core nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, serhiy.storchaka, yselivanov stage: -> patch review type: -> enhancement ___ Python tracker

[issue29425] File-altering aspects of pathlib should return new pathlib objects

2017-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Path.rename() is simple wrapper around os.rename() and returns the result of os.rename(). If os.rename() became returning something useful, this change will made impossible to return it from Path.rename(). Why not create destination Path object explicitly?

[issue29256] Windows select() errors out when given no fds to select on, which breaks SelectSelector

2017-02-07 Thread Berker Peksag
Berker Peksag added the comment: See http://bugs.python.org/issue25680#msg255116 for Guido's comment on platform differences. -- nosy: +berker.peksag ___ Python tracker

[issue29256] Windows select() errors out when given no fds to select on, which breaks SelectSelector

2017-02-07 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___

[issue29465] Add _PyObject_FastCall() to reduce stack consumption

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: Benchmarks result. Some are slower (code placement issue?), the faster benchmark are not really much faster. haypo@speed-python$ python3 -m perf compare_to /home/haypo/benchmarks/2017-02-06_07-15-default-e06af4027546.json

[issue29438] use after free in key sharing dict

2017-02-07 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file46556/29438-sharedkey-useafterfree-py36.patch ___ Python tracker ___

[issue29462] RFC822-comments in email header fields can fool, e.g., get_filename()

2017-02-07 Thread Alessandro Vesely
Alessandro Vesely added the comment: We can close this, then. Let's hope migration to Python3 isn't going to last forever... Thank you for your cooperation -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker

[issue22594] Add a link to the regex module in re documentation

2017-02-07 Thread Marco Buttu
Marco Buttu added the comment: IMHO the reference proposed in the patch is too verbose. Adding details like what is supported and how to use some features I think is out of the scope of the reference. Moreover, if the regex module changes the features we are reporting in the reference, we'll

[issue29463] Change docstring to attribute from first statement.

2017-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I like this change. Added comments on Rietveld. Are changes in importlib.h only due to changing first line numbers? -- components: +Interpreter Core nosy: +benjamin.peterson, georg.brandl, serhiy.storchaka stage: -> patch review type: ->

[issue26355] Emit major version based canonical URLs for docs

2017-02-07 Thread Nick Coghlan
Nick Coghlan added the comment: OK, I've marked 2.7 and 3.5+ as the minimal set of versions to get the change via the CPython source repo. However, looking at the results of https://www.google.com/search?q=python+httplib and https://www.google.com/search?q=python+http+client I think it's

[issue27727] Update Tools/freeze to use .vcxproj files

2017-02-07 Thread Kaeptm Blaubaer
Changes by Kaeptm Blaubaer : -- type: -> behavior ___ Python tracker ___ ___

[issue27727] Update Tools/freeze to use .vcxproj files

2017-02-07 Thread Kaeptm Blaubaer
Changes by Kaeptm Blaubaer : -- type: behavior -> ___ Python tracker ___ ___

[issue29256] Windows select() errors out when given no fds to select on, which breaks SelectSelector

2017-02-07 Thread Nathaniel Smith
Nathaniel Smith added the comment: > Please don't do that. In Python, we have a long tradition of trying to > provide thin wrappers to OS functions: os and select modules are good example. I don't find this argument terribly convincing... Python also has a long history of papering over small

[issue29412] IndexError thrown on email.message.Message.get

2017-02-07 Thread Joel Uckelman
Joel Uckelman added the comment: I'm working on a patch now. -- ___ Python tracker ___ ___ Python-bugs-list

[issue22594] Add a link to the regex module in re documentation

2017-02-07 Thread Matthew Barnett
Matthew Barnett added the comment: I agree with Marco that it shouldn't be too verbose. I'd like to suggest that it says that it's compatible (i.e. has the same API), but with additional features. -- ___ Python tracker

[issue29469] AST-level Constant folding

2017-02-07 Thread INADA Naoki
INADA Naoki added the comment: Do you mean https://github.com/pypa/pip/blob/403e398330c8e841e4633aceda859430f5f7b913/pip/_vendor/distlib/markers.py ? This doesn't affect, maybe. Constant folding is executed right before producing bytecode. It doesn't affect to PyCF_ONLY_AST. BTW, how do you

[issue29472] subprocess.communicate with timeout 0 and already terminated process generates TimeoutExpired on Linux

2017-02-07 Thread spoorcc
Changes by spoorcc : -- nosy: +spoorcc ___ Python tracker ___ ___ Python-bugs-list mailing

[issue24363] httplib fails to handle semivalid HTTP headers

2017-02-07 Thread Guillaume Boudreau
Guillaume Boudreau added the comment: Any chance this could get reviewed and merged soon? I got hit by a similar issue (see #29445) where the server, which I don't control, sends me invalid HTTP headers, and the prevents all the headers that follow it to not be parsed. The latest attached

[issue29472] subprocess.communicate with timeout 0 and already terminated process generates TimeoutExpired on Linux

2017-02-07 Thread Maurice van der Pot
New submission from Maurice van der Pot: This only happens when: - timeout is small enough - at least one stream is redirected to a PIPE When I know for certain that a subprocess has already terminated and I call communicate to retrieve its results with a timeout of 0 (or other small enough

[issue29472] subprocess.communicate with timeout 0 and already terminated process generates TimeoutExpired on Linux

2017-02-07 Thread Maurice van der Pot
Changes by Maurice van der Pot : Added file: http://bugs.python.org/file46557/test.py ___ Python tracker ___

[issue29439] _decimal on Android requires linking with libm

2017-02-07 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Actually my device is 6.0. Seems there's nothing interesting between API 23 and 24 on android-changes-for-ndk-developers.md :) Anyway, _decimal should not depend on the whether the python binary references to libm.so or not. Instead, _decimal should explicitly

[issue29465] Add _PyObject_FastCall() to reduce stack consumption

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: Ok, I fixed the PyObject_Call() bug, and tried a new approach to help the compiler for code placement: I moved all "call" functions into a new Objects/call.c file. It should help the compiler to inline more code, and I move functions which call themself

[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There was a bug in previous patch. The signature of generated by Argument Clinic functions was not changed. Updated patch fixes this bug and also fixes the use of fast call in deque methods. -- Added file:

[issue29465] Add _PyObject_FastCall() to reduce stack consumption

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: Oh, with pyobject_fastcall-4.patch, the stack usage of test_python_iterator is even better. The reference is 1056 bytes/call, pyobject_fastcall-2.patch was 944 bytes/call. haypo@smithers$ ./python ../default/stack_overflow_28870-sp.py test_python_call:

[issue19675] Pool dies with excessive workers, but does not cleanup

2017-02-07 Thread Vladimir Feinberg
Vladimir Feinberg added the comment: I'm still hitting this issue in Python 3.6.0 :: Anaconda 4.3.0 (64-bit). Is there a reason this patch has been ignored? This is on CentOS release 6.5 -- nosy: +Vladimir Feinberg versions: +Python 3.6 -Python 2.7, Python 3.3 Added file:

[issue22594] Add a link to the regex module in re documentation

2017-02-07 Thread Matthew Barnett
Matthew Barnett added the comment: With the VERSION0 flag (the default behaviour), it should behave the same as the re module, and that's not going to change. -- ___ Python tracker

[issue28686] py.exe ignored PATH when using python3 shebang

2017-02-07 Thread Paul Moore
Paul Moore added the comment: > - when inside a venv (almost always) go 'python' the old way, because 'py' is > unreliable here, *unless* you manually check the shebang of your scripts > before you execute them. No. When inside a venv: - If you want to use the interactive interpreter, use

[issue29473] subprocces check_output

2017-02-07 Thread Steve Dower
Steve Dower added the comment: What's your actual command? And what output is it producing? Without those, we've got no hope of guessing what is going on here. Nothing in subprocess should have changed because of my PEPs, other than decoding bytes passed as arguments (which IIRC wasn't

[issue29474] Grammatical errors in weakref.WeakValueDictionary docs

2017-02-07 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: You're right, Victor :) The wording in 2.7 is a little bit different, but should be fixed too. In 2.7: These method have the same issues as the iterkeyrefs() and keyrefs() methods of WeakKeyDictionary objects. Assigning this to myself. --

[issue29474] Grammatical errors in weakref.WeakValueDictionary docs

2017-02-07 Thread Mariatta Wijaya
New submission from Mariatta Wijaya: https://docs.python.org/3/library/weakref.html?highlight=weakref#weakref.WeakValueDictionary There are grammatical errors in the sentence: These method have the same issues as the and keyrefs() method of WeakKeyDictionary objects. Reported by Arthur

[issue28686] py.exe ignored PATH when using python3 shebang

2017-02-07 Thread Riccardo Polignieri
Riccardo Polignieri added the comment: Paul: > it's not possible to tell by inspection the version of a Python interpreter. True, but it's an implementation detail. Couldn't be solved? Versioned interpreters a la Linux, of course, or maybe how about including some kind of manifest file?

[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: Ok, so I looked again at your change: fastcall-no-keywords-2.patch LGTM, I like the idea! Since your patch is huge, I expect that it will be a pain to rebase it. I suggest you to push it as soon as possible, to avoid conflicts. I will rework my issue #29465

[issue29412] IndexError thrown on email.message.Message.get

2017-02-07 Thread Joel Uckelman
Joel Uckelman added the comment: Here's a patch, complete with tests. If the value is all CFWS, then get_cfws(value)[1], which is what's left after the CFWS is extracted, is the empty string---which is why value[0] throws in this case. -- keywords: +patch Added file:

[issue29474] Grammatical errors in weakref.WeakValueDictionary docs

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: Would you mind to propose a patch? Thanks in advance. Note: the sentence is also wrong in Python 2.7 doc, no? -- nosy: +haypo ___ Python tracker

[issue24363] httplib fails to handle semivalid HTTP headers

2017-02-07 Thread R. David Murray
R. David Murray added the comment: Yeah, I'm going to try to get to this this weekend. -- ___ Python tracker ___

[issue29473] subprocces check_output

2017-02-07 Thread Вадим Кара
New submission from Вадим Кара: check_output(['command']) Can't be decoded as it was in 3.5 check_output(['command']).decode('utf-8') returns UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8d in position 2: invalid start byte error. -- components: Windows messages: 287239 nosy:

[issue22594] Add a link to the regex module in re documentation

2017-02-07 Thread Marco Buttu
Marco Buttu added the comment: Looking at the regex module and documentation, it is not clear to me whether its API behaves exactly as the re API. In addition, being a third-party module, things can change in the future. To be defensive, IMO it is better to write as in the Ezio comment (in

[issue19675] Pool dies with excessive workers, but does not cleanup

2017-02-07 Thread Ned Deily
Changes by Ned Deily : -- nosy: +davin ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26355] Emit major version based canonical URLs for docs

2017-02-07 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : Added file: http://bugs.python.org/file46565/cannonical-doc-for-2.6.patch ___ Python tracker ___

[issue19240] iglob should try to use `readdir`

2017-02-07 Thread Ben Longbons
Ben Longbons added the comment: This is a duplicate of bug 25596, which is now fixed. -- nosy: +o11c ___ Python tracker ___

[issue29438] use after free in key sharing dict

2017-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyDict_SetItem() can trigger destructor which first call _PyObjectDict_SetItem() which change CACHED_KEYS(tp) and then call PyDict_SetItem() which call dictresize(). At the end it may be possible that cached != ((PyDictObject *)dict)->ma_keys and cached !=

[issue29475] option to not follow symlinks when globbing

2017-02-07 Thread Ben Longbons
New submission from Ben Longbons: Background: I have a data hierarchy with a lot of "sibling" symlinked directories/files. I want to glob only the non-symlink files, because it's a *huge* performance increase. Before `os.scandir`, I was using a local copy of `glob.py` and calling

[issue29465] Add _PyObject_FastCall() to reduce stack consumption

2017-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Awesome! This looks fantastic! I need to check the patch very carefully to be sure that we haven't missed something important. Isn't the Python directory more appropriate place for call.c? -- stage: -> patch review

[issue29438] use after free in key sharing dict

2017-02-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Interpreter Core stage: -> patch review ___ Python tracker ___

[issue29465] Add _PyObject_FastCall() to reduce stack consumption

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka added the comment: > Isn't the Python directory more appropriate place for call.c? I moved code from other .c files in Objects/, so for me it seems more natural to add the code in Objects/ as well. It seems like most of the code in Python/ is

[issue29465] Add _PyObject_FastCall() to reduce stack consumption

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: pyobject_fastcall-4.patch combines a lot of changes. I wrote it to experiment _PyObject_FastCall(). I will rewrite these changes as a patch serie with smaller changes. The design of PyObject_FastCall*() is to be short and simple. Changes: * Add

[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: "I prefer to delay pushing the patch until we prove its usefulness, because the cost of this change is not zero. Is it a stopper for issue29465?" Ok. No, it's not a blocker for my issue #29465. About usefulness, I'm curious of the

[issue29470] [python] Error in `/usr/bin/python': free(): invalid size: 0x00007f628400d0e0

2017-02-07 Thread David Ford (FirefighterBlu3)
David Ford (FirefighterBlu3) added the comment: does the builtin memory debugger handle things well such as when involving external libraries like ssl/libcrypto? -- ___ Python tracker

[issue29470] [python] Error in `/usr/bin/python': free(): invalid size: 0x00007f628400d0e0

2017-02-07 Thread STINNER Victor
STINNER Victor added the comment: David Ford: "does the builtin memory debugger handle things well such as when involving external libraries like ssl/libcrypto?" Nope, see: http://bugs.python.org/issue18227#msg191610 Please try what I suggested. Buffer overflows may not crash immediatly, but

[issue29470] [python] Error in `/usr/bin/python': free(): invalid size: 0x00007f628400d0e0

2017-02-07 Thread David Ford (FirefighterBlu3)
David Ford (FirefighterBlu3) added the comment: yes, it's running now, hasn't crashed yet -- ___ Python tracker ___

[issue16011] "in" should be consistent with return value of __contains__

2017-02-07 Thread R. David Murray
R. David Murray added the comment: Eric: that is not precise enough, I'm afraid :) See msg171093 for the correct documentation update. Specifically, in returns True if __contains__ returns a true value, and False otherwise (not the difference in case, it matters). There are more things

[issue16011] "in" should be consistent with return value of __contains__

2017-02-07 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi, For user-defined class, it's up to the class to do the right implementation in my opinion. It's true the description is wrong though. x in y means that x exist inside of y (so that the execution of y.__contain__(x) is executed successfully and (I

[issue29232] Quiet Install

2017-02-07 Thread Earl Maier
Earl Maier added the comment: Update. I have been able to reproduce the issue/pin point the problem. The all user flag on the installer doesn't install under all users. I install as an admin (under a different user) but python doesn't install for the current user (user). --

[issue19217] Calling assertEquals for moderately long list takes too long

2017-02-07 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi all, What do we do with this ticket? Patch were provided, People have agreed (I think). So what's missing to close it (or pass to the next step)? It's going to be a year that a high priority ticket has no update and I would like to accelerate it if I

[issue19217] Calling assertEquals for moderately long list takes too long

2017-02-07 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +needs review ___ Python tracker ___ ___

[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The major part of the patch is generated by Argument Clinic. It is not a pain to rebase it. I prefer to delay pushing the patch until we prove its usefulness, because the cost of this change is not zero. Is it a stopper for issue29465? -- assignee:

[issue29438] use after free in key sharing dict

2017-02-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please write tests Inada? It would be nice to test also the case that fails with 29438-sharedkey-useafterfree-py36.patch. Actually I don't know if this is easy to reproduce, it was just my guessing. --

[issue29438] use after free in key sharing dict

2017-02-07 Thread INADA Naoki
INADA Naoki added the comment: to: Serhiy I can reproduce the issue by 29438-minimum.py, on Python 3.7 with pydebug. But since this issue is "use after free", it may and may not crash. It's up to how freed memory block is used from another part of Python. Deterministic test which doesn't tied

[issue29463] Change docstring to attribute from first statement.

2017-02-07 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file46569/ast-docstring-3.patch ___ Python tracker ___

[issue29474] Grammatical errors in weakref.WeakValueDictionary docs

2017-02-07 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: And here is the patch that fixes the issue for python 2.7. -- Added file: http://bugs.python.org/file46571/issue29474py2.patch ___ Python tracker

[issue29474] Grammatical errors in weakref.WeakValueDictionary docs

2017-02-07 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Attached is the patch to fix the grammatical errors for versions 3.5+ -- keywords: +patch Added file: http://bugs.python.org/file46570/issue29474py3.patch ___ Python tracker

[issue29326] Blank lines in ._pth file are not ignored

2017-02-07 Thread Ammar Askar
Changes by Ammar Askar : -- status: open -> closed ___ Python tracker ___ ___

[issue29438] use after free in key sharing dict

2017-02-07 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file46572/29438-sharedkey-useafterfree-py36-2.patch ___ Python tracker ___

[issue29438] use after free in key sharing dict

2017-02-07 Thread Xiang Zhang
Xiang Zhang added the comment: I left one review about the comment on Rietvied last patch. :-) -- ___ Python tracker ___

[issue29463] Add `docstring` attribute to AST nodes

2017-02-07 Thread INADA Naoki
Changes by INADA Naoki : -- title: Change docstring to attribute from first statement. -> Add `docstring` attribute to AST nodes ___ Python tracker

[issue29449] clear() should return prior state in threading.Event

2017-02-07 Thread Tim Peters
Tim Peters added the comment: I can't judge a use case for a thread gimmick in the absence of wholly specified examples. There are too many possible subtleties. Indeed, if I'd do anything with Event.clear() it would be to remove it - I've seen too much code that suffers subtle race bugs

[issue29476] Simplify set_add_entry()

2017-02-07 Thread INADA Naoki
INADA Naoki added the comment: I like this idea. -- nosy: +inada.naoki ___ Python tracker ___ ___

[issue16011] "in" should be consistent with return value of __contains__

2017-02-07 Thread R. David Murray
R. David Murray added the comment: >>> bool(()) False >>> bool([]) False >>> bool('') False What you want to say is that 'in' coerces the result returned by __contains__ to a boolean value. -- ___ Python tracker

[issue29463] Change docstring to attribute from first statement.

2017-02-07 Thread INADA Naoki
Changes by INADA Naoki : Added file: http://bugs.python.org/file46567/ast-docstring-2.patch ___ Python tracker ___

[issue29438] use after free in key sharing dict

2017-02-07 Thread Xiang Zhang
Xiang Zhang added the comment: > if (was_shared && (cached = CACHED_KEYS(tp)) != NULL && cached != > ((PyDictObject *)dict)->ma_keys) +1 on this and I think the deletion should also use if ((cached = CACHED_KEYS(tp) != NULL) -- ___ Python tracker

[issue29474] Grammatical errors in weakref.WeakValueDictionary docs

2017-02-07 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> patch review ___ Python tracker ___ ___

[issue29475] option to not follow symlinks when globbing

2017-02-07 Thread Ethan Furman
Ethan Furman added the comment: Before talking about the patch, have you signed the Contributer License Agreement yet? The issue tracker isn't showing that you have. Check out https://www.python.org/psf/contrib/contrib-form/ to do so. --- The `symlinks` flag: can you give some glob

[issue16011] "in" should be consistent with return value of __contains__

2017-02-07 Thread Eric Lafontaine
Eric Lafontaine added the comment: (first time trying to reply through email) thanks for the example and you are right : class Foo_emptylist(object): def __contains__(self,item): return [] class Foo_emptydict(object): def __contains__(self,item): return {} class

[issue29476] Simplify set_add_entry()

2017-02-07 Thread Raymond Hettinger
New submission from Raymond Hettinger: Dummy entries created by deletions are currently handled in two places. The code in set_add_entry() tracks a freeslot to allow dummy slots to be reused when new elements are inserted. The dummies are also eliminated during resizing. The freeslot checks

[issue16011] "in" should be consistent with return value of __contains__

2017-02-07 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi all, Here are the test I've made to understand the behavior : class Foo_42(object): def __contains__(self,item): return 42 class Foo_neg(object): def __contains__(self,item): return -42 class Foo_None(object): def

[issue16011] "in" should be consistent with return value of __contains__

2017-02-07 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi David, sorry for the delay on my part for providing how I was getting to that conclusion. I've also resurrected an old post as I want to start contributing more seriously :). As this is documentation only (not changing the code behavior), I didn't take a

[issue29463] Change docstring to attribute from first statement.

2017-02-07 Thread INADA Naoki
INADA Naoki added the comment: lnotab is changed too. -0,0,0,115,12,0,0,0,8,4,4,2,8,8,8,12, -8,25,8,13,114,18,0,0,0,99,0,0,0,0,0,0, +0,0,0,115,10,0,0,0,12,6,8,8,8,12,8,25, +8,13,114,18,0,0,0,99,0,0,0,0,0,0,0,0, 115 is header for bytes type. next 4 bytes is it's length (little

[issue16011] "in" should be consistent with return value of __contains__

2017-02-07 Thread Eric Lafontaine
Eric Lafontaine added the comment: oh, I've got what you meant! Proposed change : For user-defined classes which define the __contains__() method, the in operator will convert to False "x in y" if y.__contains__(x) return False, 0 or None. Otherwise, the in operator will return True for any

[issue29425] File-altering aspects of pathlib should return new pathlib objects

2017-02-07 Thread Walter Szeliga
Walter Szeliga added the comment: If Path.rename() were made to be slightly more than a wrapper around os.rename(), then any future changes to the return value of os.rename() could be taken into consideration in the return value of Path.rename(). I don't see how anything would become

[issue19240] iglob should try to use `readdir`

2017-02-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Use scandir() to speed up the glob module ___ Python tracker

[issue26355] Emit major version based canonical URLs for docs

2017-02-07 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: Updated patch to take comments into account (added space before /> for consistency). I'm still unfamiliar with hg so let me know if I did anything wrong. -- Added file: http://bugs.python.org/file46563/cannonical-doc-for-3.4plus.patch

[issue29351] absolute imports for logging

2017-02-07 Thread Vinay Sajip
Changes by Vinay Sajip : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29372] RotatingFileHandler rotates empty logfile if it emits a large string

2017-02-07 Thread Vinay Sajip
Changes by Vinay Sajip : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26355] Emit major version based canonical URLs for docs

2017-02-07 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : Removed file: http://bugs.python.org/file46426/cannonical-doc-for-3.4plus.patch ___ Python tracker

[issue26355] Emit major version based canonical URLs for docs

2017-02-07 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : Added file: http://bugs.python.org/file46564/cannonical-doc-for-2.7.patch ___ Python tracker ___

  1   2   >