[issue25770] expose name, args, and kwargs from methodcaller

2015-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: functools.partial() is unique in it's usage of name "keywords". -- nosy: +ncoghlan, rhettinger ___ Python tracker ___

[issue19527] Test failures with COUNT_ALLOCS

2015-12-02 Thread Robert Kuska
Robert Kuska added the comment: With Python-3.5 and COUNT_ALLOCS enabled following new tests fail also: FAIL: test_is_finalizing (test.test_sys.SysModuleTest) -- Traceback (most recent call last): File "/builddir/build/BUILD/

[issue19527] Test failures with COUNT_ALLOCS

2015-12-02 Thread STINNER Victor
STINNER Victor added the comment: COUNT_ALLOCS was added 22 years ago. I guess that the usecase is to track memory leaks, right? branch: legacy-trunk user:Sjoerd Mullender date:Mon Oct 11 12:54:31 1993 + files: Include/object.h Modules/arraymodule.c Modules/confi

[issue25776] More compact pickle of iterators etc

2015-12-02 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes a number of classes produce more compact pickle data in common case. This includes iterators of list, tuple, str, bytes, bytearray, enumerate, array, deque, iterator object for classes with __getitem__, some itertools iterators, and no

[issue19527] Test failures with COUNT_ALLOCS

2015-12-02 Thread STINNER Victor
STINNER Victor added the comment: 00141-fix-tests_with_COUNT_ALLOCS-v5.patch: please don't do that! It makes tests much more verbose for a compilation option which is hidden and probably almost never used in the wild. The option has no configuration option for example. *If* you really want to

[issue19527] Test failures with COUNT_ALLOCS

2015-12-02 Thread Robert Kuska
Robert Kuska added the comment: FYI There is also issue23034 where is proposed "-X showalloccount" option to suppress the output, we use (custom patch) environment variable to filter out the verbose output in Fedora. -- ___ Python tracker

[issue19527] Test failures with COUNT_ALLOCS

2015-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, I also don't want to use 00141-fix-tests_with_COUNT_ALLOCS-v5.patch if there is better alternative. See issue23034 (I'm uncertain only in option name). -- ___ Python tracker

[issue19527] Test failures with COUNT_ALLOCS

2015-12-02 Thread Bohuslav "Slavek" Kabrda
Bohuslav "Slavek" Kabrda added the comment: > IMHO these two debug features superseded COUNT_ALLOCS. Please try to convince > me of the use case of this very old debug feature. I no longer use this feature and I think that noone does. As you said, it seems to be obsoleted by other new features

[issue22039] PyObject_SetAttr doesn't mention value = NULL

2015-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See two alternative issues: issue25701 for documenting existing behavior, and issue25773 for deprecating it (and converting PyObject_DelAttr to a function). -- nosy: +serhiy.storchaka ___ Python tracker

[issue25709] Problem with string concatenation and utf-8 cache.

2015-12-02 Thread Larry Hastings
Larry Hastings added the comment: Is this going in soon? I want to cherry-pick this for 3.5.1, which I tag in about 80 hours. -- ___ Python tracker ___

[issue25715] Python 3.5.1 installer shows wrong upgrade path

2015-12-02 Thread Larry Hastings
Larry Hastings added the comment: You can have it in 3.5.1, and we can negotiate about how to get it in. -- ___ Python tracker ___ ___

[issue14285] Traceback wrong on ImportError while executing a package

2015-12-02 Thread Martin Panter
Martin Panter added the comment: Thanks for the review Nick. You removed Python 3.4 from the versions; do you think it is not worth the risk committing in 3.4? I understand the deadline for the final release of 3.4 is the end of this week. -- ___ Py

[issue25709] Problem with string concatenation and utf-8 cache.

2015-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I wait only Greg's approving for 3.3. If I'll not get it in a day, I'll commit the patch for 3.4+. -- ___ Python tracker ___

[issue25756] asyncio WriteTransport documentation typo

2015-12-02 Thread Andrew Svetlov
Andrew Svetlov added the comment: I think the doc is correct. `pause_writing` is called when write buffer becomes non empty, empty buffer is precondition for `resume_writing` call. -- nosy: +asvetlov resolution: -> not a bug stage: -> resolved status: open -> closed versions: -Python

[issue25709] Problem with string concatenation and utf-8 cache.

2015-12-02 Thread STINNER Victor
STINNER Victor added the comment: Please commit right now to 3.4+. Backport to 3.3 can be done later. -- ___ Python tracker ___ ___ Py

[issue19527] Test failures with COUNT_ALLOCS

2015-12-02 Thread STINNER Victor
STINNER Victor added the comment: I propose to emit a compiler warning (or even an error?) in 3.5.x and drop the code in 3.6. I don't think that a long deprecation period is requied. The feature is not widely used. -- ___ Python tracker

[issue25777] Misleading descriptions in docs about invoking descriptors.

2015-12-02 Thread Juchen Zeng
New submission from Juchen Zeng: [Doc Link](https://docs.python.org/2/howto/descriptor.html#invoking-descriptors) In descriptions about how to invoke descriptors with super(), it says: The call super(B, obj).m() searches obj.__class__.__mro__ for the base class A immediately following B an

[issue16251] pickle special methods are looked up on the instance rather than the type

2015-12-02 Thread Rob Agar
Changes by Rob Agar : -- nosy: +robagar ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue25719] Deprecate spitfire benchmark

2015-12-02 Thread Florin Papa
Florin Papa added the comment: No problem. Thank you! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue25177] OverflowError in statistics.mean when summing large floats

2015-12-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset a7d2307055e7 by Victor Stinner in branch 'default': Null merge 3.5, patch was already applied to default (isuse #25177) https://hg.python.org/cpython/rev/a7d2307055e7 -- ___ Python tracker

[issue25778] Error on import matplotlib.pyplot and seaborn (Python3 - Windows 10 64-bit issue)

2015-12-02 Thread Anshul Agrawal
New submission from Anshul Agrawal: I have described the error message I got when I recently installed Python 3.5.0 (via Anaconda3) and then subsequently tried to import mathplotlib.pyplot and seaborn packages at this StackOverflow post (http://stackoverflow.com/questions/34004063/error-on-imp

[issue14285] Traceback wrong on ImportError while executing a package

2015-12-02 Thread Nick Coghlan
Nick Coghlan added the comment: Right, while I agree this is a bug fix that makes sense to apply to 2.7 and 3.5, it's also a large enough change to runpy's control flow logic that I'm wary of including it in the final 3.4 binary release. -- ___ Pyth

[issue25778] Error on import matplotlib.pyplot and seaborn (Python3 - Windows 10 64-bit issue)

2015-12-02 Thread SilentGhost
Changes by SilentGhost : -- components: +Library (Lib) nosy: +stutzbach stage: -> test needed ___ Python tracker ___ ___ Python-bugs-

[issue25778] Error on import matplotlib.pyplot and seaborn (Python3 - Windows 10 64-bit issue)

2015-12-02 Thread SilentGhost
Changes by SilentGhost : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___ Pyth

[issue25778] Error on import matplotlib.pyplot and seaborn (Python3 - Windows 10 64-bit issue)

2015-12-02 Thread R. David Murray
R. David Murray added the comment: The stackoverflow comment is this: "The issue is that winreg.EnumValue is not cutting string values at their length properly for some reason, and strings will include null characters which os.path.abspath is not able to process." The "one line patch" in the

[issue25778] winreg.EnumValue does not truncate strings correctly

2015-12-02 Thread R. David Murray
Changes by R. David Murray : -- title: Error on import matplotlib.pyplot and seaborn (Python3 - Windows 10 64-bit issue) -> winreg.EnumValue does not truncate strings correctly ___ Python tracker _

[issue25778] winreg.EnumValue does not truncate strings correctly

2015-12-02 Thread Anshul Agrawal
Anshul Agrawal added the comment: Before I got the "one line patch" on stackoverflow, I tried creating a new environment with Python 2.7.10 and did *not* get the error message I got with Python 3.5.0. Here's an outline of what I did: 1) Created a new environment to use Python 2.7.10: conda cr

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Jack O'Connor
New submission from Jack O'Connor: The following hangs at 100% CPU on Python 3.5, though not on Python 3.4: 1) Start an asyncio coroutine with run_until_complete(). 2) Inside the coroutine, enter an ExitStack using a with-statement. 3) Inside the with-statement, call ExitStack.enter_context() wi

[issue25778] winreg.EnumValue does not truncate strings correctly

2015-12-02 Thread Eryk Sun
Eryk Sun added the comment: Based on matplotlib's win32InstalledFonts function [1], I created a small test to check the data strings returned by winreg.EnumValue for the presence of null characters. I tested on Windows 7 and 10 but couldn't reproduce the problem. Please run nullcheck.py to che

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Guido van Rossum
Guido van Rossum added the comment: Interestingly, it doesn't hang when you raise a different error. There's some new code dealing with the RuntimeError coming out of a generator if it raises StopIteration (instead of returning) introduced by issue #22906. Yury, it looks like you introduced th

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: Trying to reproduce without contextstack. -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-

[issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine

2015-12-02 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- stage: -> needs patch versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list m

[issue25780] Add support for CAN_RAW_JOIN_FILTERS

2015-12-02 Thread Stefan Tatschner
New submission from Stefan Tatschner: Here is a patch, which adds support for CAN_RAW_JOIN_FILTERS which is available since linux 4.1 [1]. My patch fixes trailing whitespace issues as well. Since I have a newer version of autotools, running "autoreconf" generates a lot of changes, so I left th

[issue25780] Add support for CAN_RAW_JOIN_FILTERS

2015-12-02 Thread Stefan Tatschner
Stefan Tatschner added the comment: in case you don't like whitespace cleanups, here is the patch with "git diff --ignore-space-changes". -- Added file: http://bugs.python.org/file41211/can_raw_join_filters-no-whitespace.diff ___ Python tracker

[issue25770] expose name, args, and kwargs from methodcaller

2015-12-02 Thread Joe Jevnik
Joe Jevnik added the comment: partial's unique usage is why I feel like it would be so jarring for them do be named differently. I would be happiest having this feature at all so I will change the name to 'kwargs' if you would like. I just want to be sure that my reasons for choosing this name

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: Here's a minimal test to reproduce: import reprlib def main(): if 0: yield raise RuntimeError m = main() try: m.send(None) except RuntimeError as ex: ex.__context__ = ex reprlib.repr(ex)

[issue25781] infinite loop in reprlib

2015-12-02 Thread Yury Selivanov
New submission from Yury Selivanov: The below code blocks Python eval loop and makes it unresponsive to signals (like ^C). import reprlib try: raise RuntimeError except RuntimeError as ex: ex.__context__ = ex reprlib.repr(ex) -- components: Library

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: Created another issue for the reprlib bug: issue 25781. It appears we don't even need a generator: import reprlib try: raise RuntimeError except RuntimeError as ex: ex.__context__ = ex reprlib.repr(ex) Closing this one wit

[issue25781] infinite loop in reprlib

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: This isn't a bug of reprlib -- it's something in the core. Will create a separate issue for this. try: raise Exception except Exception as ex: ex.__context__ = ex hasattr(1, 'aa') -- resolution: -> not a bug status: ope

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: It's not even a reprlib bug: try: raise Exception except Exception as ex: ex.__context__ = ex hasattr(1, 'aa') -- ___ Python tracker __

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Yury Selivanov
Changes by Yury Selivanov : -- superseder: infinite loop in reprlib -> CPython hangs on error __context__ set to the error itself ___ Python tracker ___

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Yury Selivanov
New submission from Yury Selivanov: try: raise Exception except Exception as ex: ex.__context__ = ex hasattr(1, 'aa') -- components: Interpreter Core messages: 255731 nosy: gvanrossum, haypo, ncoghlan, yselivanov priority: normal severity: normal status: open title: CPython h

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Jack O'Connor
Jack O'Connor added the comment: Thanks for chasing this down. Yury, can you suggest a workaround? -- ___ Python tracker ___ ___ Pytho

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +georg.brandl, larry priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-l

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: > Thanks for chasing this down. Yury, can you suggest a workaround? I'm not sure how to workaround this :( Hopefully we can fix this in 3.5.1. -- ___ Python tracker _

[issue25715] Python 3.5.1 installer shows wrong upgrade path

2015-12-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8537ec50c254 by Steve Dower in branch '3.5': Issue #25715: Python 3.5.1 installer shows wrong upgrade path and incorrect logic for launcher detection. https://hg.python.org/cpython/rev/8537ec50c254 -- nosy: +python-dev

[issue25715] Python 3.5.1 installer shows wrong upgrade path

2015-12-02 Thread Steve Dower
Steve Dower added the comment: As you can see, I've now pushed to the main 3.5 branch, so feel free to cherry-pick from there or give me the word and I'll graft it into the releasing repo for you. I also forward merged all the 3.5.1 NEWS into default. Not sure how that normally happens, but i

[issue25781] infinite loop in reprlib

2015-12-02 Thread Jack O'Connor
Changes by Jack O'Connor : -- nosy: +oconnor663 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue25780] Add support for CAN_RAW_JOIN_FILTERS

2015-12-02 Thread SilentGhost
Changes by SilentGhost : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue25778] winreg.EnumValue does not truncate strings correctly

2015-12-02 Thread Anshul Agrawal
Anshul Agrawal added the comment: Please tell me where I can find nullcheck.py and how I should run it (I assume something like "python nullcheck.py" in the Windows Command Prompt?) I'm relatively new to Python, so explicit instructions would be appreciated. Thanks! --

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2015-12-02 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2015-12-02 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +matrixise ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2015-12-02 Thread STINNER Victor
New submission from STINNER Victor: Tested on Python 3.6 (default branch): haypo@smithers$ ./python -m test test_traceback [1/1] test_traceback 1 test OK. haypo@smithers$ ./python Lib/test/test_traceback.py ..F...

[issue25778] winreg.EnumValue does not truncate strings correctly

2015-12-02 Thread SilentGhost
SilentGhost added the comment: Anshul, it's attached to this issue, before messages start under Files heading. Here is the direct link https://bugs.python.org/file41208/nullcheck.py -- nosy: +SilentGhost ___ Python tracker

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: The bug is in "PyErr_SetObject": while ((context = PyException_GetContext(o))) { Py_DECREF(context); if (context == value) { PyException_SetContext(o, NULL); break;

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: Looks like this is the original code committed in CPython in 2ee09afee126. Patch by Antoine Pitrou. Antoine, how would you fix this? -- nosy: +pitrou ___ Python tracker

[issue25784] Please consider integrating performance fix for ipaddress.py

2015-12-02 Thread Alexander Finkel
New submission from Alexander Finkel: I encountered a performance problem using the ipaddr library to merge over 1 network addresses. I sent a patch upstream to fix it, and that patch has been merged: https://github.com/google/ipaddr-py/commit/6504b47a02739e853043f0a184f3c39462293e5c Since

[issue25778] winreg.EnumValue does not truncate strings correctly

2015-12-02 Thread Eryk Sun
Eryk Sun added the comment: You should be able to run nullcheck.py in the command prompt by changing to the directory where it's saved and entering nullcheck.py. For example, if you saved it in your Downloads folder: >cd /d C:\Users\Anshul\Downloads >nullcheck.py If that fails because

[issue25784] Please consider integrating performance fix for ipaddress.py

2015-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you provide a patch? -- components: +Library (Lib) nosy: +ncoghlan, pmoody, serhiy.storchaka type: -> performance versions: +Python 3.6 ___ Python tracker

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would change __context__ setter to check if it creates a loop. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue25778] winreg.EnumValue does not truncate strings correctly

2015-12-02 Thread Anshul Agrawal
Anshul Agrawal added the comment: Ok thanks. Here's what I got: C:\Users\Anshul\Downloads\Python>conda info --envs # conda environments: # python2.7.10 C:\Anaconda3\envs\python2.7.10 root * C:\Anaconda3 C:\Users\Anshul\Downloads\Python>python -V Python 3.5.0 :: A

[issue24934] django_v2 benchmark not working in Python 3.6

2015-12-02 Thread Brett Cannon
Brett Cannon added the comment: Django 1.9 is out, so when I have time I will create a django_v3 benchmark. -- ___ Python tracker ___

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: Serhiy, good idea, thanks! Please review the attached patch. Larry, I view this as a very serious bug. Can we ship 3.5.1 with it fixed? -- keywords: +patch Added file: http://bugs.python.org/file41212/Issue25782.patch

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: FWIW the bug was identified in issue 25782. I've drafted a patch to fix it, please review. -- ___ Python tracker ___ _

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: The question is whether we should raise an exception or not: ex.__context__ = ex -- ___ Python tracker ___ _

[issue25784] Please consider integrating performance fix for ipaddress.py

2015-12-02 Thread SilentGhost
SilentGhost added the comment: Perhaps I'm wrong, but a superficial inspection of the ipaddress.py seem to indicate that it's not affected by the same issue. _find_address_range is implemented as a generator, it doesn't restart comparison on every iteration. Alexander, did you experience any p

[issue25778] winreg.EnumValue does not truncate strings correctly

2015-12-02 Thread Eryk Sun
Eryk Sun added the comment: I only wrote it for Python 3, but it would be interesting to see what you get with Python 2. Please try nullcheck2.py. -- Added file: http://bugs.python.org/file41213/nullcheck2.py ___ Python tracker

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Jack O'Connor
Jack O'Connor added the comment: Yury, do we need to handle more complicated infinite loops, where "self" doesn't actually show up in the loop? Here's an example: try: raise Exception except Exception as ex: loop1 = Exception() loop2 = Exception() loop1._

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: > Yury, do we need to handle more complicated infinite loops, where "self" > doesn't actually show up in the loop? Here's an example: My patch works for your example too. Since it checks for loops in __context__ setter, you shouldn't be able to create complic

[issue25778] winreg.EnumValue does not truncate strings correctly

2015-12-02 Thread Anshul Agrawal
Anshul Agrawal added the comment: Here it is: [python2.7] C:\Users\Anshul\Downloads\Python>python -V Python 2.7.10 :: Continuum Analytics, Inc. [python2.7] C:\Users\Anshul\Downloads\Python>python nullcheck2.py Checking: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts (u'tahoma.ttf\x000\

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Should we do the same for __cause__? Is it possible to create __context__ or __cause__ loop without assigning these attributes directly? -- ___ Python tracker __

[issue6395] Infinite Recursion during Unpickling a codecs Object

2015-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > If the StreamWriter/Reader cannot pickle the underlying stream (which is probably always the case), why should the object itself be pickleable ? io.BytesIO() and io.StringIO() are pickleable. -- ___ Python tracke

[issue25785] TimedRotatingFileHandler missing rotations

2015-12-02 Thread Felipe Cruz
New submission from Felipe Cruz: I'm using TimedRotatingFileHandler to rotate a log file *every* minute. If I stop my program, in the middle of a minute, and start again, the next rotation will happen at (currentTime + 60). The result of this behavior is that I'll end up with files "log_01" an

[issue25785] TimedRotatingFileHandler missing rotations

2015-12-02 Thread SilentGhost
Changes by SilentGhost : -- components: +Library (Lib) nosy: +vinay.sajip type: behavior -> enhancement ___ Python tracker ___ ___ Pyt

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: > Should we do the same for __cause__? Is it possible to create __context__ or > __cause__ loop without assigning these attributes directly? Yes, let's mirror the __context__ behaviour for __cause__. New patch attached. Serhiy, Guido, The new patch raises a

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Guido van Rossum
Guido van Rossum added the comment: Ouch, it's unfortunate those APIs don't have an error return. :-( Setting it to NULL is one option -- silently ignoring the assignment (leaving whatever was there) might also be good? In 90% of the cases it would be the same thing right? (I'm not familiar with

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: > Setting it to NULL is one option -- silently ignoring the assignment (leaving whatever was there) might also be good? In 90% of the cases it would be the same thing right? But leaving the old __context__ there will completely mask the bug... And as for pure

[issue6395] Infinite Recursion during Unpickling a codecs Object

2015-12-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 02.12.2015 20:16, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > >> If the StreamWriter/Reader cannot pickle the underlying stream (which is >> probably always the case), why should the object itself be pickleable ? > > io.BytesIO() a

[issue25786] contextlib.ExitStack introduces a cycle in exception __context__

2015-12-02 Thread Yury Selivanov
New submission from Yury Selivanov: See http://bugs.python.org/issue25779 and http://bugs.python.org/issue25782 for details. -- components: Library (Lib) messages: 255762 nosy: gvanrossum, ncoghlan, serhiy.storchaka, yselivanov priority: release blocker severity: normal status: open tit

[issue6395] Infinite Recursion during Unpickling a codecs Object

2015-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Added tests for pickling and deepcopying. -- Added file: http://bugs.python.org/file41215/codecs_stream_delegating_2.patch ___ Python tracker _

[issue25786] contextlib.ExitStack introduces a cycle in exception __context__

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: Nick, could you please take a look at the attached patch? -- keywords: +patch Added file: http://bugs.python.org/file41216/Issue25786.patch ___ Python tracker _

[issue1927] raw_input behavior incorrect if readline not enabled

2015-12-02 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- nosy: +jason.coombs ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue1927] raw_input behavior incorrect if readline not enabled

2015-12-02 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- versions: +Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: Another issue for contextlib: http://bugs.python.org/issue25786 -- ___ Python tracker ___ ___ Python

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Guido van Rossum
Guido van Rossum added the comment: > But leaving the old __context__ there will completely mask the bug... OK, NULL is fine then. >we better raise a TypeError if a cycle is about to be introduced? Yes. -- ___ Python tracker

[issue25786] contextlib.ExitStack introduces a cycle in exception __context__

2015-12-02 Thread Jack O'Connor
Changes by Jack O'Connor : -- nosy: +oconnor663 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yet one option is the emersion of the exception. Affected exception is removed from the chain and added at it head. If there is a chain A -> B -> C -> D -> E, after assignment C.__context__ = A we will get a chain C -> A -> B -> D -> E. No exception is lost.

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread STINNER Victor
STINNER Victor added the comment: > Larry, I view this as a very serious bug. Can we ship 3.5.1 with it fixed? Don't do that, a few hours (!) is not enough to test a fix. It's too late after a RC1 for such critical change (exceptions). The bug was here since at least Python 3.3, there is no ur

[issue25156] shutil.copyfile should internally use os.sendfile when possible

2015-12-02 Thread desbma
desbma added the comment: Ping A small patch, but a good performance improvement :) -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: >Don't do that, a few hours (!) is not enough to test a fix. It's too late after a RC1 for such critical change (exceptions). Maybe we can add an RC2? -- ___ Python tracker __

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: > If there is a chain A -> B -> C -> D -> E, after assignment C.__context__ = A > we will get a chain C -> A -> B -> D -> E. No exception is lost. What to do when you try to chain "C -> C"? I'm not sure I like this reordering idea -- it might introduce some

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread STINNER Victor
STINNER Victor added the comment: > Maybe we can add an RC2? Seriously? I'm waiting Python 3.5.1 since 3.5.0 was released. I'm amazed how much time it takes to release a first bugfix version, 3.5.0 was full a bugs (see the changelog). It's very easy to workaround this issue in pure Python. Wh

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: > It's very easy to workaround this issue in pure Python. Why do you want the > fix *RIGHT NOW*? Please look at http://bugs.python.org/issue25779. I think we either should fix this issue, or fix http://bugs.python.org/issue25786 in 3.5.1, since I can't find

[issue6395] Infinite Recursion during Unpickling a codecs Object

2015-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I think all we need to do is add a .__reduce__() > method to StreamWriter and StreamReader, which then > raises a PickleError. Rather TypeError. Yes, it is the least that we should to do in maintained releases. If codecs_stream_delegating_2.patch is conside

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread STINNER Victor
STINNER Victor added the comment: Yury Selivanov added the comment: > Please look at http://bugs.python.org/issue25779. I think we either should > fix this issue, or fix http://bugs.python.org/issue25786 in 3.5.1, since I > can't find a workaround for it. The latter issue is probably easier t

[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > What to do when you try to chain "C -> C"? Nothing. Or may be raise an exception (because C.__context__ can't be set to what you try). > you expected one type of exception, then you used some external library, and > after that you have a completely differ

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Yury Selivanov
Yury Selivanov added the comment: > Yury, can you help me understand why `hasattr("foo", "bar")` triggers the > infinite loop there, but not `print("foo")`? hasattr uses getattr under the hood. getattr raises an AttributeError, and that triggers PyErr_SetError, which has an infinite "while" l

[issue25779] deadlock with asyncio+contextmanager+ExitStack

2015-12-02 Thread Jack O'Connor
Jack O'Connor added the comment: Yury, can you help me understand why `hasattr("foo", "bar")` triggers the infinite loop there, but not `print("foo")`? -- ___ Python tracker ___

[issue25783] test_traceback.test_walk_stack() fails when run directly (without regrtest)

2015-12-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rbcollins ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue1927] raw_input behavior incorrect if readline not enabled

2015-12-02 Thread Jason R. Coombs
Jason R. Coombs added the comment: +1 to applying this patch. After reviewing this and Issue 12869, I don't see any substantial objections or concerns. The status is "test needed". Is a test really needed? My instinct that simply aligning the implementation with the docs is sufficient. --

  1   2   >