[issue12920] inspect.getsource only works for objects loaded from files, not interactive session

2015-10-12 Thread nikitakit
nikitakit added the comment: I just ran into this issue trying to introspect an IPython session, in which case the __main__ module doesn't have a file associated with it. But it turns out that methods defined in a class do have source code associated with them, so it's possible to add a

[issue25381] Use old description of raise in Python3

2015-10-12 Thread Xiang Zhang
New submission from Xiang Zhang: In the first paragraph of https://docs.python.org/3/extending/extending.html#intermezzo-errors-and-exceptions, it is wrong to use the sentence "the second argument to raise" since the raise syntax has been changed in Python3. -- assignee: docs@python

[issue25381] Doc: Use old description of raise in Python3

2015-10-12 Thread STINNER Victor
Changes by STINNER Victor : -- title: Use old description of raise in Python3 -> Doc: Use old description of raise in Python3 ___ Python tracker

[issue25380] Incorrect protocol for the STACK_GLOBAL opcode

2015-10-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Incorrect protocol (0 instead of 4) is specified for the STACK_GLOBAL opcode in pickletools.opcodes. -- assignee: serhiy.storchaka components: Library (Lib) files: pickletools_STACK_GLOBAL_proto.patch keywords: patch messages: 252847 nosy:

[issue25382] pickletools.dis(): output memo id for MEMOIZE

2015-10-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes pickletools.dis() to output implicit memo id for the MEMOIZE opcode. This makes the output more readable. -- components: Library (Lib) files: pickletools_dis_MEMOIZE_comment.patch keywords: patch messages: 252849 nosy:

[issue25380] Incorrect protocol for the STACK_GLOBAL opcode

2015-10-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +alexandre.vassalotti ___ Python tracker ___ ___

[issue25383] Docs: Broken link

2015-10-12 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report, but I think this should be reported to PyPA since even https://packaging.python.org doesn't work. Can you open an issue at https://github.com/pypa/python-packaging-user-guide/issues -- nosy: +berker.peksag resolution: -> third

[issue25383] Docs: Broken link

2015-10-12 Thread Ilhan Sanli
New submission from Ilhan Sanli: This page (3.4 to dev): https://docs.python.org/3.6/library/venv.html Contains link with text: See also: Python Packaging User Guide: Creating and using virtual environments URL: https://packaging.python.org/en/latest/installing.html#virtual-environments Results

[issue25381] Doc: Use of old description of raise in Python3

2015-10-12 Thread R. David Murray
Changes by R. David Murray : -- stage: commit review -> patch review ___ Python tracker ___

[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2015-10-12 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Reopening because we're starting to see regressions caused by the fix for this bug, e.g.: https://bugs.launchpad.net/configglue/+bug/1504288 -- keywords: +3.4regression, 3.5regression -patch status: closed -> open

[issue25359] io.open() fails to open ascii file if LANG env not set

2015-10-12 Thread L
L added the comment: Mac OSX 10.8.5 Python 2.7.10 installed via macports $ python2.7 io.openBugEx.py Local pref: UTF-8 LANG env: en_US.UTF-8 Local pref: LANG env has key: False Traceback (most recent call last): File "io.openBugEx.py", line 21,

[issue25001] Make --nowindows argument to regrtest propagate when running with -j

2015-10-12 Thread Steve Dower
Steve Dower added the comment: Between Victor's fix and #23919, is there anything left to do for this? -- ___ Python tracker ___

[issue25381] Doc: Use of old description of raise in Python3

2015-10-12 Thread Xiang Zhang
Xiang Zhang added the comment: With this sentence A second global variable stores the “associated value” of the exception (the second argument to raise). I think the phrase inside the parentheses is to explain the "associated value", which is usually a string passed to the exception object,

[issue25359] io.open() fails to open ascii file if LANG env not set

2015-10-12 Thread R. David Murray
R. David Murray added the comment: I cannot reproduce this on 10.10.3: rdmurray@intel-vm-buildbot:~>sw_vers ProductName:Mac OS X ProductVersion: 10.10.3 BuildVersion: 14D136 rdmurray@intel-vm-buildbot:~>LANG=en_us.UTF-8 python temp Local pref: UTF-8 LANG env: en_us.UTF-8

[issue25359] io.open() fails to open ascii file if LANG env not set

2015-10-12 Thread R. David Murray
Changes by R. David Murray : -- type: crash -> behavior ___ Python tracker ___ ___

[issue25381] Doc: Use of old description of raise in Python3

2015-10-12 Thread R. David Murray
R. David Murray added the comment: Yes. The second element of the sys.exc_info result is the exception instance, not the argument to the exception constructor. The old raise syntax allowed you to specify the exception instance as the second argument to raise, but if you specified a string

[issue24931] _asdict breaks when inheriting from a namedtuple

2015-10-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: > it seems odd that it has disappeared. It disappeared because it was fundamentally broken in Python 3, so it had to be removed. Providing __dict__ broke subclassing and produced odd behaviors. -- keywords: -3.5regression priority: high -> normal

[issue25254] Idle: debugger source line highlighting fails again

2015-10-12 Thread Mark Roseman
Mark Roseman added the comment: FYI, the new debugger UI has an option to only show highlights in already open files (i.e. don't open new ones) -- ___ Python tracker

[issue25381] Doc: Use of old description of raise in Python3

2015-10-12 Thread R. David Murray
R. David Murray added the comment: Actually, I take that back. Shouldn't it be "the object passed *as* the exception object to raise? -- ___ Python tracker

[issue18156] Add an 'attr' attribute to AttributeError

2015-10-12 Thread Shubham Dash
Changes by Shubham Dash : Added file: http://bugs.python.org/file40757/client.py ___ Python tracker ___

[issue25381] Doc: Use of old description of raise in Python3

2015-10-12 Thread Xiang Zhang
Xiang Zhang added the comment: Oops, I misunderstand sys.exc_info all the time, sad :( Now, both versions of doc are not correct. Please make them fixed. -- ___ Python tracker

[issue25381] Doc: Use of old description of raise in Python3

2015-10-12 Thread R. David Murray
R. David Murray added the comment: Looks good to me. -- nosy: +r.david.murray stage: -> commit review title: Doc: Use old description of raise in Python3 -> Doc: Use of old description of raise in Python3 versions: +Python 3.4, Python 3.5, Python 3.6

[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2015-10-12 Thread R. David Murray
R. David Murray added the comment: The linked bug doesn't include any information as to what the observed failure mode(s) are. Can you provide details, please? -- ___ Python tracker

[issue24575] timemodule build fail - missing definitions for _Py_BEGIN_SUPPRESS_IPH and _Py_END_SUPPRESS_IPH

2015-10-12 Thread Steve Dower
Steve Dower added the comment: If they are compiled independently, they should have Py_BUILD_CORE set. That flag is meant for the headers, which serve dual purposes, not the module itself. *Any* C file that is part of core should expect that option to be set for when it includes its headers.

[issue25359] io.open() fails to open ascii file if LANG env not set

2015-10-12 Thread L
L added the comment: The difference, and I believe the crux of the issue is that locale.getprefferedencoding() is still returning and encoding for you, mine returns and emtpy str. Do you have any other envs set that getprefferedencoding my be using: 'LANGUAGE', 'LC_ALL', 'LC_CTYPE', and

[issue25001] Make --nowindows argument to regrtest propagate when running with -j

2015-10-12 Thread STINNER Victor
STINNER Victor added the comment: We are good, I close the issue. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue24164] Support pickling objects with __new__ with keyword arguments with protocol 2+

2015-10-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 288953a787ce by Victor Stinner in branch 'default': Issue #24164: Fix test_pyclbr https://hg.python.org/cpython/rev/288953a787ce -- ___ Python tracker

[issue25170] 3.5.0 documentation archives missing

2015-10-12 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- priority: normal -> high resolution: not a bug -> stage: resolved -> ___ Python tracker

[issue25384] Use _PyBytesWriter in the binascii module

2015-10-12 Thread STINNER Victor
New submission from STINNER Victor: Attached patch modifies the binascii module to use the new _PyBytesWriter API. IMHO the patch makes the code more readable. The code may be faster because it avoids a call to _PyBytes_Resize() in some cases. The change on binascii_rledecode_hqx_impl()

[issue24164] Support pickling objects with __new__ with keyword arguments with protocol 2+

2015-10-12 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 288953a787ce by Victor Stinner in branch 'default': > Issue #24164: Fix test_pyclbr Another fix would be to accept functools.partial type, but it looks like the test wants to exclude symbols which comes from other modules. --

[issue25285] regrtest: run tests in subprocesses with -j1 on buildbots

2015-10-12 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___

[issue25384] Use _PyBytesWriter in the binascii module

2015-10-12 Thread STINNER Victor
STINNER Victor added the comment: I implemented the "use empty string singleton" optimization in _PyBytesWriter_Finish(): see changeset f33433d9c163. -- ___ Python tracker

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-12 Thread Christian Tanzer
Christian Tanzer added the comment: > The code works when using encoding='bytes'. Thanks Tim for the suggestion. > So this is not a bug, but is there any sense in having encoding='ASCII' by > default in pickle ? It is most definitely a bug. And it adds another road block to moving python

[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2015-10-12 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue25385] Spurious warning when compiling extension module

2015-10-12 Thread Antoine Pitrou
New submission from Antoine Pitrou: I'm under Linux, but get the following warning when compiling an extension module. This only happens with 3.5+. $ python setup.py build_ext --inplace running build_ext building 'numba._helperlib' extension C compiler: gcc -pthread -Wsign-compare

[issue25359] io.open() fails to open ascii file if LANG env not set

2015-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please don't change the type of the issue to "crash". This is different type of issues. See classification in https://docs.python.org/devguide/triaging.html#type. -- type: crash -> behavior ___ Python tracker

[issue25359] io.open() fails to open ascii file if LANG env not set

2015-10-12 Thread Ned Deily
Ned Deily added the comment: I can reproduce the problem using the MacPorts python2.7 but not the Apple-supplied Python 2.7 or the python.org one. The difference seems to be that the MacPorts Python is built with the MacPorts-supplied GNU gettext and its libintl, whereas the others aren't

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are two issues here. 1. datetime.datetime accepts only bytes, not str. 2. Unpickling non-ASCII str pickled in Python 2 raises an error by default. The second issue usually hides the first one. The demonstration of the first issue: >>>

[issue25359] io.open() fails to open ascii file if LANG env not set

2015-10-12 Thread L
L added the comment: Should I submit elsewhere? -- type: behavior -> crash ___ Python tracker ___ ___

[issue25359] io.open() fails to open ascii file if LANG env not set

2015-10-12 Thread R. David Murray
R. David Murray added the comment: Well, it might be a bug in libintl, but it would be a good idea to investigate further before reporting it upstream to them. And we may want to deal with the possibility of a blank return regardless. -- ___

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-10-12 Thread Mark Roseman
Mark Roseman added the comment: No, I don't, sorry. If it will be quick for you to do, no problem, otherwise I'd be happy to put it together. -- ___ Python tracker

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I wonder if this can be fixed using a fix_imports hook. I agree, it would be nice to fix this issue by modifying 3.x versions only. -- ___ Python tracker

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > The first issue can be solved by accepting str argument and encoding it to > bytes. A strong -1 from me. Accepting bytes objects for year in 3.x (and str in 2.x) is a gross hack. In the long run, I would like to see a public named constructor, e.g.

[issue25359] io.open() fails to open ascii file if LANG env not set

2015-10-12 Thread L
L added the comment: Type changed from cash to behavior. -- ___ Python tracker ___ ___ Python-bugs-list

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem is that you can't unpickle a data that contains both datetime classes (datetime, date, time) instances and strings (including attribute names, so actually this affects instances of any Python classes). Yes, it only affects pickles transferred

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-12 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > .. pickling and unpickling will be slower If we are concerned about performance, we should definitely avoid the decode-encode roundtrip. -- ___ Python tracker

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-10-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Go ahead then. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8e27f8398a4f by Victor Stinner in branch 'default': Issue #25353: Optimize unicode escape and raw unicode escape encoders to use https://hg.python.org/cpython/rev/8e27f8398a4f -- nosy: +python-dev ___

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is alternative patch for 2.7. It makes datetime pickling produce the same data as in 3.x. The side effect of this approach: it makes datetime pickling incompatible with Unicode disabled builds of 2.x. -- stage: -> patch review versions:

[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-12 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue22005] datetime.__setstate__ fails decoding python2 pickle

2015-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch against 2.7 that makes datetime pickling portable. It doesn't solve problem with existing pickled data, but at least it allows to convert existing pickled data with 2.7 to portable format. -- Added file:

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-10-12 Thread Mark Roseman
Mark Roseman added the comment: Patch against head to change extensions dialog to a pane of main config dialog. -- Added file: http://bugs.python.org/file40761/mergeext.patch ___ Python tracker

[issue24782] Merge 'configure extensions' into main IDLE config dialog

2015-10-12 Thread Mark Roseman
Mark Roseman added the comment: Same patch against 2.7 -- Added file: http://bugs.python.org/file40762/mergeext27.cfg ___ Python tracker ___

[issue25274] sys.setrecursionlimit() must fail if the current recursion depth is higher than the new low-water mark

2015-10-12 Thread STINNER Victor
STINNER Victor added the comment: I pushed sys_setrecursionlimit-4.patch. Thanks a lot Serhiy for your review and your help on this issue! -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-12 Thread Alexander Riccio
Alexander Riccio added the comment: For your convenience, the MSDN docs for the _putch/_putwch functions: https://msdn.microsoft.com/en-us/library/azb6c04e.aspx -- ___ Python tracker

[issue25210] Special-case NoneType() in do_richcompare()

2015-10-12 Thread Martin Panter
Martin Panter added the comment: I like the patch. It looks like some of the example sessions in the documentation will become out of date. Not sure if that is a problem. -- nosy: +martin.panter stage: needs patch -> patch review ___ Python tracker

[issue25277] test_sigwaitinfo() of test_eintr hangs on randomly on FreeBSD buildbots

2015-10-12 Thread STINNER Victor
STINNER Victor added the comment: I hope that 2 seconds should be enough to workaround the lack of real synchronization between the parent and the child process. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue25274] sys.setrecursionlimit() must fail if the current recursion depth is higher than the new low-water mark

2015-10-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset eb0c76442cee by Victor Stinner in branch '3.5': sys.setrecursionlimit() now raises RecursionError https://hg.python.org/cpython/rev/eb0c76442cee -- ___ Python tracker

[issue25210] Special-case NoneType() in do_richcompare()

2015-10-12 Thread STINNER Victor
STINNER Victor added the comment: > TypeError: '<' not supported between instances of 'int' and 'NoneType' Here is a patch for Python 3.6. -- keywords: +patch Added file: http://bugs.python.org/file40763/richcompare.patch ___ Python tracker

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-12 Thread Alexander Riccio
New submission from Alexander Riccio: A minor issue (probably qualifies for the "easy" keyword): All functions in msvcrtmodule.c (I'm looking at http://svn.python.org/projects/python/trunk/PC/msvcrtmodule.c) except msvcrt_putch and msvcrt_putwch properly check return values against error

[issue25230] asyncio/Windows: Unix datagram sockets not supported

2015-10-12 Thread STINNER Victor
Changes by STINNER Victor : -- title: Unix datagram sockets not supported -> asyncio/Windows: Unix datagram sockets not supported ___ Python tracker

[issue18769] argparse remove subparser

2015-10-12 Thread paul j3
paul j3 added the comment: There's a partial overlap with this issue http://bugs.python.org/issue22848 which seeks to hide a subparser - both in the help lines and the choices lists. -- ___ Python tracker

[issue25207] ICC compiler warnings

2015-10-12 Thread STINNER Victor
STINNER Victor added the comment: I fixed some warnings. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue25387] sound_msgbeep doesn't check the return value of MessageBeep

2015-10-12 Thread Alexander Riccio
New submission from Alexander Riccio: A really minor issue (probably qualifies for the "easy" keyword): sound_msgbeep (in http://svn.python.org/projects/python/trunk/PC/winsound.c) doesn't check the return value of MessageBeep

[issue25277] test_sigwaitinfo() of test_eintr hangs on randomly on FreeBSD buildbots

2015-10-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 605eda657884 by Victor Stinner in branch '3.5': Issue #25277: Use a longer sleep in test_eintr to reduce the risk of race https://hg.python.org/cpython/rev/605eda657884 -- ___ Python tracker

[issue24164] Support pickling objects with __new__ with keyword arguments with protocol 2+

2015-10-12 Thread STINNER Victor
STINNER Victor added the comment: At least, test_pyclbr was fixed by my change. Most 3.x buildbots are green again. -- ___ Python tracker ___

[issue25381] Doc: Use of old description of raise in Python3

2015-10-12 Thread Xiang Zhang
Xiang Zhang added the comment: I fix my patch with David's comment. -- Added file: http://bugs.python.org/file40766/doc_extending2.patch ___ Python tracker

[issue16151] Deferred KeyboardInterrupt in interactive mode

2015-10-12 Thread Martin Panter
Martin Panter added the comment: I can’t reproduce this on 2.7.10 nor 3.4.3, on Arch Linux with Gnu Readline 6.3.008-1. Instead, when I press , I see the y or n query printed, but it is immediately followed by all the possibilities (as if I said Y) without any chance to actually enter Y or N

[issue13673] PyTraceBack_Print() fails if signal received but PyErr_CheckSignals() not called

2015-10-12 Thread Martin Panter
Changes by Martin Panter : -- Removed message: http://bugs.python.org/msg185910 ___ Python tracker ___

[issue25387] sound_msgbeep doesn't check the return value of MessageBeep

2015-10-12 Thread Alexander Riccio
Changes by Alexander Riccio : -- components: Windows nosy: Alexander Riccio, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: sound_msgbeep doesn't check the return value of MessageBeep type: behavior versions:

[issue25388] tokenizer crash/misbehavior -- heap use-after-free

2015-10-12 Thread Brian Cain
Changes by Brian Cain : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list

[issue25210] Special-case NoneType() in do_richcompare()

2015-10-12 Thread Ezio Melotti
Ezio Melotti added the comment: LGTM. Updating examples is low-priority but I think it should be done. I think it would be good to also add a couple of tests to make sure that the correct operator and types are included in the message. Both make good bite-sized tasks for new contributors.

[issue24164] Support pickling objects with __new__ with keyword arguments with protocol 2+

2015-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Victor for fixing test_pyclbr. test_pyclbr looks fragile and may be there are bugs in pyclbr itself. But this is different issue. Could you please look at proposed documentation changes? -- ___ Python

[issue25386] msvcrt_putch/msvcrt_putwch don't check the return value of _putch/_putwch

2015-10-12 Thread Zachary Ware
Zachary Ware added the comment: Feel free to create a patch yourself, we'll be happy to review it. Note though that the python project on svn.python.org is old and abandoned; we moved to Mercurial several years ago (see https://hg.python.org/cpython/). I haven't checked to see whether the

[issue25388] tokenizer crash/misbehavior

2015-10-12 Thread Brian Cain
New submission from Brian Cain: This issue is similar to (but I believe distinct from) the one reported earlier as http://bugs.python.org/issue24022. Tokenizer failures strike me as difficult to exploit, but risky nonetheless. Attached is a test case that illustrates the problem and the

[issue25388] tokenizer crash/misbehavior -- heap use-after-free

2015-10-12 Thread Brian Cain
Changes by Brian Cain : -- title: tokenizer crash/misbehavior -> tokenizer crash/misbehavior -- heap use-after-free ___ Python tracker

[issue25388] tokenizer crash/misbehavior

2015-10-12 Thread Brian Cain
Brian Cain added the comment: asan output -- Added file: http://bugs.python.org/file40765/asan.txt ___ Python tracker ___

[issue16151] Deferred KeyboardInterrupt in interactive mode

2015-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I can't reproduce original behavior anymore. In 3.4+ at the begin of the line inserts the tabulation character. In 2.7 and 3.3- double causes the behavior described by Martin. Yes, please open new issue about the “Display all possibilities” prompt Martin.

[issue16151] Deferred KeyboardInterrupt in interactive mode

2015-10-12 Thread Martin Panter
Martin Panter added the comment: FWIW the “Display all possibilities” prompt works properly in Bash, so maybe I have a separate bug somewhere which is masking Serhiy’s bug. -- ___ Python tracker

[issue25381] Doc: Use of old description of raise in Python3

2015-10-12 Thread Xiang Zhang
Xiang Zhang added the comment: Yes, you are right martin. It seems the whole chapter needs more updates, not only the bits I mentioned. I won't provide a new patch since I am not an English native and I am not sure I can provide an accurate and right description. Hope someone else may help.