[issue24864] errors writing to stdout during interpreter exit exit with status 0

2015-08-14 Thread Robert Collins
Robert Collins added the comment: Updating the title to reflect my deeper understanding: the only issue here is that we don't alter the exit code. -- title: errors writing to stdout are uncatchable and exit with status 0 - errors writing to stdout during interpreter exit exit with

[issue24859] ctypes.Structure bit order is reversed - counts from right

2015-08-14 Thread zeero
zeero added the comment: Sorry for the inconvenience. The format specification can be found in chapter 2.1 in http://vector.com/portal/medien/cmc/application_notes/AN-ION-1-3100_Introduction_to_J1939.pdf So I would write down the field contents in that order _fields_ =

[issue24864] errors writing to stdout during interpreter exit exit with status 0

2015-08-14 Thread Martin Panter
Martin Panter added the comment: I don’t know much about PDB, but if this is just about setting the exit code, it may be a dupe of Issue 5319. The fix proposed there is a new Py_FinalizeEx() API that returns an exit status, if I remember correctly. -- nosy: +martin.panter

[issue18383] test_warnings modifies warnings.filters when running with -W default

2015-08-14 Thread Alex Shkop
Alex Shkop added the comment: This is updated patch that doesn't alter warn_explicit behavior. So the following: simplefilter(ignore) simplefilter(error, append=True) simplefilter(ignore, append=True) will ignore all warnings with this patch and no duplicates are inserted to warnings.filters.

[issue24863] Incoherent bevavior with umlaut in regular expressions

2015-08-14 Thread Christian Klein
New submission from Christian Klein: The Python 2.7 re module seems not to agree what to consider a word character: import re s = u'f\xfc' print re.sub('\W', '*', s, re.UNICODE) print re.findall('\w', s, re.UNICODE) The application of re.sub removes the character u'ü' which implies it's

[issue24863] Incoherent bevavior with umlaut in regular expressions

2015-08-14 Thread eryksun
eryksun added the comment: You're passing re.UNICODE (32) as the value of the count parameter, i.e. the function signature is re.sub(pattern, repl, string, count=0, flags=0). -- nosy: +eryksun resolution: - not a bug status: open - closed ___

[issue24863] Incoherent bevavior with umlaut in regular expressions

2015-08-14 Thread Christian Klein
Christian Klein added the comment: Wow, that's very embarrassing. Thank you. (I tried to get further help before but nobody recognized that stupid mistake) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24863

[issue24865] IDLE crashes on entering diacritical mark (Alt-E) on Mac OS X

2015-08-14 Thread Ned Deily
Ned Deily added the comment: This is due to an old Tk bug (http://sourceforge.net/p/tktoolkit/bugs/2722/) still present in the Apple-supplied versions of Tcl/Tk 8.5 on OS X. See https://www.python.org/download/mac/tcltk/ and/or Issue22566. If you are using Python 3.4.x from a python.org

[issue24801] right-mouse click in IDLE on Mac doesn't work

2015-08-14 Thread Mark Roseman
Mark Roseman added the comment: There is no notion of middle button on Mac, hence right button is B2. It's documented. Current Tk 8.6 has even removed the PasteSelection binding from B2 on Aqua because of this (I've filed a Tk bug report to backport this to 8.5). 8.6 also defines a

[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2015-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You forgot to merge default with 3.5. -- nosy: +serhiy.storchaka status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21159 ___

[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2015-08-14 Thread Robert Collins
Robert Collins added the comment: anyhow fixed -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21159 ___ ___

[issue24865] IDLE crashes on entering diacritical mark (Alt-E) on Mac OS X

2015-08-14 Thread Vlad Gumerov
New submission from Vlad Gumerov: Mac OS X 10.10.3 IDLE 3.4.3, Python 3.4.3 Steps: 1)Open IDLE 2)Input diacritical mark ´ (Alt+E) Result: IDLE crashes -- components: IDLE messages: 248572 nosy: Vlad Gumerov priority: normal severity: normal status: open title: IDLE crashes on entering

[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2015-08-14 Thread Robert Collins
Robert Collins added the comment: Huh? I definitely did. I can see there's a extra head now, but I did the merge up per protocol locally. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21159

[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2015-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7191910aeb45 by Robert Collins in branch 'default': Issue #21159: Improve message in configparser.InterpolationMissingOptionError. https://hg.python.org/cpython/rev/7191910aeb45 -- ___ Python tracker

[issue24750] IDLE: Cosmetic improvements for main window

2015-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I were wrong. 8.4 still is supported in 3.5. The support of 8.3 was dropped. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24750 ___

[issue24851] infinite loop in faulthandler._stack_overflow

2015-08-14 Thread Ronald Oussoren
Ronald Oussoren added the comment: GCC has a pragma and function attributes for changing the optimisation flags, that could be used to disable the tail call optimazation here. Something like the following (using a pragma): #pragma GCC push_options #pragma GCC optimize

[issue24801] right-mouse click in IDLE on Mac doesn't work

2015-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Looks as right button on Mac corresponds to middle button on X Window (paste selection and scroll if moved). This behavior is standard for all Tk applications. I don't think we should break this. -- nosy: +serhiy.storchaka

[issue24864] errors writing to stdout are uncatchable and exit with status 0

2015-08-14 Thread Robert Collins
New submission from Robert Collins: I was trying to demonstrate how testing some code is hard, and I stumbled upon this. The following code should be debuggable when run with a bad stdout - e.g. python foo.py /dev/full --- import sys import traceback import

[issue24865] IDLE crashes on entering diacritical mark (Alt-E) on Mac OS X

2015-08-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +ned.deily, ronaldoussoren, terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24865 ___

[issue24864] errors writing to stdout are uncatchable and exit with status 0

2015-08-14 Thread Robert Collins
Robert Collins added the comment: Oh, and for added joy sys.last_value is not set here, so I've yet to manage to poke at what is being executed - clearly pdb is still managing to single-step, ish. -- ___ Python tracker rep...@bugs.python.org

[issue24864] errors writing to stdout are uncatchable and exit with status 0

2015-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue11380. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24864 ___ ___

[issue24801] right-mouse click in IDLE on Mac doesn't work

2015-08-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24801 ___ ___

[issue24801] right-mouse click in IDLE on Mac doesn't work

2015-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, so this is a workaround of 8.5- bug. Then looks reasonable to me. Added comments on Rietveld. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24801

[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-08-14 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24844 ___ ___

[issue24867] Asyncio get_frame fails with native coroutines

2015-08-14 Thread David Griffin
New submission from David Griffin: I've been playing around with native coroutines and asyncio, and came across an issue with retrieving exceptions from tasks: The get_frame method on a Task in asyncio fails with an AttibuteError because it assumes that gi_frame as the attribute containing

[issue24862] subprocess.Popen behaves incorrect when moved in process tree

2015-08-14 Thread Andre Merzky
Andre Merzky added the comment: As mentioned in the PS, I understand that the approach might be questionable. But (a) the attached test shows the problem also for watcher *processes*, not threads, and (b) an error should be raised in unsupported uses, not a silent, unexpected behavior which

[issue24867] Asyncio Task.get_stack fails with native coroutines

2015-08-14 Thread David Griffin
David Griffin added the comment: It should be noted that when I said get_frame in the original comment, I actually meant get_stack -- title: Asyncio get_frame fails with native coroutines - Asyncio Task.get_stack fails with native coroutines ___

[issue24851] infinite loop in faulthandler._stack_overflow

2015-08-14 Thread Paul Murphy
Paul Murphy added the comment: ... #pragma GCC optimize (no-optimize-sibling-calls) ... Does preserve the desired behavior under -O2 and -O3, probably a bit nicer than using O0. -- ___ Python tracker rep...@bugs.python.org

[issue24866] Boolean representation of Q/queue objects does not fit behaviour of lists etc.

2015-08-14 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24866 ___

[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-14 Thread Zachary Ware
Zachary Ware added the comment: I'll try to get a proper review done before Wednesday. From a cursory glance, this looks fine, but unpalatable. The solution I'd really like would be to create proper .vcxprojs for Tcl/Tk/Tix (partly because that would also fix an issue with building with

[issue24766] Subclass of property doesn't preserve instance __doc__ when using doc= argument

2015-08-14 Thread Erik Bray
Erik Bray added the comment: Sorry for the hold up. Attached is another diff providing a test. I think this is all that's really needed (since this is just a special case of the issue already tested for in this particular test class. -- Added file:

[issue24867] Asyncio Task.get_stack fails with native coroutines

2015-08-14 Thread Yury Selivanov
Yury Selivanov added the comment: Looks like we didn't have unittests for Task.get_stack()/Task.print_stack(). Anyways, it's now fixed, I'll make a PR for Larry to get this in 3.5.0rc2. -- assignee: - yselivanov nosy: +larry priority: normal - release blocker resolution: - fixed

[issue24849] Add __len__ to map, everything in itertools

2015-08-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: [flying sheep] that’s probably the end of this :( Yes, I think so. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24849

[issue17570] Improve devguide Windows instructions

2015-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 49be7fba3568 by Zachary Ware in branch 'default': Closes #17570: Improve instructions for Windows. https://hg.python.org/devguide/rev/49be7fba3568 -- nosy: +python-dev resolution: - fixed stage: commit review - resolved status: open -

[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-14 Thread Brett Cannon
Brett Cannon added the comment: Will that be thread-safe? Plus storing that value in a way that _warnings and warnings can read will require something like a single-item list that can be mutated in-place. The other option is to teach warnings to skip anything coming from

[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Frames can be skipped only for warnings issued by imported module code, not for warnings issued by import machinery itself. I propose following algorithm: Before executing module code push the current frame and the number of frames to skip in global stack

[issue24766] Subclass of property doesn't preserve instance __doc__ when using doc= argument

2015-08-14 Thread Ethan Furman
Ethan Furman added the comment: Larry, can we get this into 3.5? I'll create a pull-request in a couple days. -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24766 ___

[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-14 Thread Nathaniel Smith
Nathaniel Smith added the comment: For 3.4/3.5 purposes, I propose a simpler algorithm: first, define a function which takes a module name and returns true if it is part of the internal warning machinery and false otherwise. This is easy because we know what import machinery we ship. Then,

[issue24852] Python 3.5.0rc1 HOWTO Use Python in the web needs fix

2015-08-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: It's probably better to remove the document for now I concur. Although, this topic sees lot of change regularly, so it is probably not a good one for the standard documentation after all. This makes sense. We typically use wiki pages for this kind of

[issue24867] Asyncio Task.get_stack fails with native coroutines

2015-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 53d2a7c023bc by Yury Selivanov in branch '3.4': Issue #24867: Fix Task.get_stack() for 'async def' coroutines https://hg.python.org/cpython/rev/53d2a7c023bc New changeset d25022765186 by Yury Selivanov in branch '3.5': Merge 3.4 (Issue #24867)

[issue17570] Improve devguide Windows instructions

2015-08-14 Thread Zachary Ware
Zachary Ware added the comment: Made a couple of other fixes while fixing the point I'd already raised: - Changed all instances of `...` to *...* - Changed from PCbuild\python.exe to python.bat - Wrapped a couple long lines Thanks for the patch! --

[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-14 Thread Zachary Ware
Zachary Ware added the comment: To expand on 'unpalatable': I'd rather we not have to carry any patches against the Tcl/Tk sources (Tix I care less about, since we seem to be the de facto maintainers of it). -- ___ Python tracker

[issue24863] Incoherent bevavior with umlaut in regular expressions

2015-08-14 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24863 ___ ___ Python-bugs-list

[issue23810] Suboptimal stacklevel of deprecation warnings for formatter and imp modules

2015-08-14 Thread Brett Cannon
Brett Cannon added the comment: Merging with the other issue so there is a single place to track this -- superseder: - Suboptimal stacklevel of deprecation warnings for formatter and imp modules ___ Python tracker rep...@bugs.python.org

[issue23810] Suboptimal stacklevel of deprecation warnings for formatter and imp modules

2015-08-14 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23810 ___

[issue17570] Improve devguide Windows instructions

2015-08-14 Thread Carol Willing
Carol Willing added the comment: Zach, Steve, Ezio: The latest patch is ready to be committed. Thanks. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17570

[issue17570] Improve devguide Windows instructions

2015-08-14 Thread Zachary Ware
Zachary Ware added the comment: The part of the patch that I pointed out in my previous message hasn't changed, and is wrong. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17570 ___

[issue17570] Improve devguide Windows instructions

2015-08-14 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- stage: commit review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17570 ___ ___

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-14 Thread Brett Cannon
Brett Cannon added the comment: I have merged my 3.5.0 patch into 3.5 and default, so that should fix the issue Armin and CFFI was having. -- assignee: larry - brett.cannon resolution: - fixed stage: commit review - resolved status: open - closed

[issue23810] Suboptimal stacklevel of deprecation warnings for formatter and imp modules

2015-08-14 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- superseder: Suboptimal stacklevel of deprecation warnings for formatter and imp modules - The new import system makes it impossible to correctly issue a deprecation warning for a module ___ Python

[issue17570] Improve devguide Windows instructions

2015-08-14 Thread Zachary Ware
Zachary Ware added the comment: Sorry, I don't think we're on the same page yet :). My issue was with a different hunk further down. Looking at it again, the fix I want is simple enough I'll just do it at commit; I'll get it later today. -- assignee: willingc - zach.ware stage:

[issue17570] Improve devguide Windows instructions

2015-08-14 Thread Carol Willing
Carol Willing added the comment: Zach, Sorry for not comprehending your comment re: latest patch correctly. Since Rietveld isn't available on devguide, which makes comparison of patches difficult (at least for me), here's some proposed wording to see if I am understanding your comment

[issue24869] shlex lineno inaccurate with certain inputs

2015-08-14 Thread Robert Escriva
New submission from Robert Escriva: The newlines calculated by the shlex module are inaccurate for certain inputs with comments inline. I've attached a simple script that illustrates the problem. My assumption here is that the lineno is supposed to match a line related to the current token.

[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf3a62a8d786 by Brett Cannon in branch '3.5': Issue #24492: make sure that ``from ... import ...` raises an https://hg.python.org/cpython/rev/cf3a62a8d786 New changeset bbe6b215df5d by Brett Cannon in branch '3.5': Merge from 3.5.0 for issue #24492

[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-14 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- assignee: - larry nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24305 ___ ___

[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-14 Thread Brett Cannon
Brett Cannon added the comment: I have merged over issue #23810 because they are aiming to solve the same problem and the conversation is split too much. Just thinking out loud, this situation is compounded by the fact that importlib itself has some warnings and so automatically stripping out

[issue24833] IDLE tabnanny check fails

2015-08-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 724d9b589cfc by Terry Jan Reedy in branch '2.7': Issue #24833: Add attribute reference needed for 3.x, but optional for 2.7, https://hg.python.org/cpython/rev/724d9b589cfc New changeset cce226356477 by Terry Jan Reedy in branch '3.4': Issue #24833:

[issue24833] IDLE tabnanny check fails

2015-08-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: I fixed the Idle part but would really like to see the cause of the tokenize error. -- type: - behavior versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org

[issue23749] asyncio missing wrap_socket (starttls)

2015-08-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: -pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23749 ___ ___ Python-bugs-list mailing

[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-14 Thread Brett Cannon
Brett Cannon added the comment: Nathaniel's solution is basically what I came up with in issue #23810 except I simply skipped subtracting from the stack level if it was found to be an internal import frame instead of swapping in and out a callable. --

[issue24833] IDLE tabnanny check fails

2015-08-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think there are two issues here. 1. tabnanny is run on the editor file every time Check Module Alt-X or Run Module F5 is used. However, Tabnanny is only rum after the file has been compiled as syntactically correct. I don't think that the tokenize module

[issue24769] Interpreter doesn't start when dynamic loading is disabled

2015-08-14 Thread Mikhail Terekhov
Changes by Mikhail Terekhov ter...@gmail.com: -- nosy: +termim ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24769 ___ ___ Python-bugs-list

[issue17570] Improve devguide Windows instructions

2015-08-14 Thread Carol Willing
Carol Willing added the comment: Thanks Zach :D Makes more sense now ;) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17570 ___ ___

[issue24798] _msvccompiler.py doesn't properly support manifests

2015-08-14 Thread Christoph Gohlke
Christoph Gohlke added the comment: It seems the switch to '/MT' was consciously intended as Python 3.5 itself is now compiled with '/MT'. For now I have patched _msvccompiler.py to use '/MD' and continue to link libraries built with '/MD'. -- ___

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2015-08-14 Thread Robert Collins
Robert Collins added the comment: Oh, just saw your comment Martin; yes, this does look like a dupe. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11380 ___

[issue24864] errors writing to stdout during interpreter exit exit with status 0

2015-08-14 Thread Robert Collins
Robert Collins added the comment: This patch is a minimal stab at the issue. We should do this change because as it stands genuine user affecting errors can be masked both in pipelines and non-pipeline cases. A more comprehensive patch would also change e.g. Py_Exit, and the various other

[issue24864] errors writing to stdout during interpreter exit exit with status 0

2015-08-14 Thread Robert Collins
Robert Collins added the comment: Oh, just saw your comment Martin; yes, this does look like a dupe. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24864 ___

[issue24798] _msvccompiler.py doesn't properly support manifests

2015-08-14 Thread Steve Dower
Steve Dower added the comment: Those libraries will depend on vcruntime140.dll which is not installed with CPython right now. In order for packages built with future compilers to work we need to statically link that dependency but not ucrt, which there are linker options for. I'm thinking

[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-14 Thread Steve Dower
Steve Dower added the comment: I'll submit them upstream if we decide they're what we want, as I've done with other patches for them. Or if we want to figure out reliable builds with avcxproj I'm okay with that too. The fix that needs testing now is already checked in for 3.5.1. We just need

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2015-08-14 Thread Robert Collins
Robert Collins added the comment: Bah, wrong issue. Sorry. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11380 ___ ___ Python-bugs-list mailing

[issue5319] stdout error at interpreter shutdown fails to return OS error status

2015-08-14 Thread Robert Collins
Robert Collins added the comment: I think you need to make the following changes: - Py_Exit with a non-zero status code should probably preserve the code rather than replacing it with 1. - Ditto in Py_Main. - Add a defs entry for Py_FinalizeEx - should be a copy of the Py_Finalize entry

[issue24868] Python start

2015-08-14 Thread Terry J. Reedy
Terry J. Reedy added the comment: For 3.4.3, run 'python -m idlelib' in the command window and you should see some error message. But first run 'python' and at the prompt, 'import tkinter' to see if tkinter is working properly. -- nosy: +terry.reedy

[issue24864] errors writing to stdout during interpreter exit exit with status 0

2015-08-14 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24864 ___

[issue24870] surrogateescape is too slow

2015-08-14 Thread INADA Naoki
New submission from INADA Naoki: surrogateescape is recommended way to mix binary data in string protocol. But surrogateescape is too slow and it cause usability problem. One actual problem is: https://github.com/PyMySQL/PyMySQL/issues/366 surrogateescape is slow because errorhandler is called

[issue24871] freeze.py doesn't work on x86_64 Linux out of the box

2015-08-14 Thread Mikhail Terekhov
New submission from Mikhail Terekhov: On 64-bit Linux freeze.py uses lib instead of lib64 when constructing path to Makefile etc. Using sysconfig fixes this issue. Without encodings.ascii resulting program fails with the following error: Fatal Python error: Py_Initialize: Unable to get the

[issue13224] Change str(x) to return only the qualname for some types

2015-08-14 Thread Robert Collins
Robert Collins added the comment: Ok, so needs more work. Moving back to patch review. -- stage: commit review - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13224 ___

[issue24870] surrogateescape is too slow

2015-08-14 Thread INADA Naoki
INADA Naoki added the comment: On MacBook Pro (Core i5 2.6GHz), surrogateescape 1MB data takes 250ms. In [1]: bs = bytes(range(256)) * (4 * 1024) In [2]: len(bs) Out[2]: 1048576 In [3]: %timeit x = bs.decode('ascii', 'surrogateescape') 1 loops, best of 3: 249 ms per loop --

[issue24866] Boolean representation of Q/queue objects does not fit behaviour of lists etc.

2015-08-14 Thread Raymond Hettinger
Raymond Hettinger added the comment: RDM is correct. Queues having qsize() instead of __len__() was an intentional part of the design. Code relying on the boolean value would be fragile. FWIW, this code is very old (originally designed by Guido when dinosaurs roamed the earth) and it is

[issue24868] Python start

2015-08-14 Thread jack
New submission from jack: I just installed Python 3.4.3 on a 32-bit machine, 2 GB memory, Win XP SP3. When I try to start IDLE, pythonw.exe appears briefly in the Windows Task Manager, then disappears, and nothing else happens. If I run just python.exe in a command window, that runs OK. The

[issue24864] errors writing to stdout are uncatchable and exit with status 0

2015-08-14 Thread Robert Collins
Robert Collins added the comment: Oh, one nuance - the reason my except isn't triggering is that the write is happening in interpreter shutdown - in flush_std_files. Adding a a flush there allows that to work, but its fugly: --- import sys try: print(What... is your quest?) #

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2015-08-14 Thread Robert Collins
Robert Collins added the comment: @zzeeek For Python 3 pipeline tools you need something like this: try: all your stuff finally: try: sys.stdout.flush() finally: try: sys.stdout.close() finally: try: sys.stderr.flush()

[issue24862] subprocess.Popen behaves incorrect when moved in process tree

2015-08-14 Thread R. David Murray
R. David Murray added the comment: I'll let someone else analyze this in detail if they want to, but I'll just note that mixing multiprocessing and threads is not a good idea and will lead to all sorts of strangeness. Especially if you are using the unix default of fork for multiprocessing.

[issue24866] Boolean representation of Q/queue objects does not fit behaviour of lists etc.

2015-08-14 Thread R. David Murray
R. David Murray added the comment: I believe this is intentional; see the documentation of the empty' method for the motivation. The reason for not just reflecting the result of an empty call in __bool__ is that not doing so forces you to use empty, which gives you an opportunity to learn

[issue24863] Incoherent bevavior with umlaut in regular expressions

2015-08-14 Thread R. David Murray
R. David Murray added the comment: Don't be embarrassed; a report like this turns up on this tracker about every three or four months. Unfortunately there's nothing we can do to make the situation better because of backward compatibility concerns. -- nosy: +r.david.murray

[issue24864] errors writing to stdout are uncatchable and exit with status 0

2015-08-14 Thread Robert Collins
Robert Collins added the comment: FWIW Python 2.7.8 behaves the same way (different message, same behaviour). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24864 ___

[issue24838] tarfile.py: fix GNU and USTAR formats to properly handle paths with special characters that are encoded with more than one byte each

2015-08-14 Thread Lars Gustäbel
Lars Gustäbel added the comment: Thanks for the detailed report and the patch. I haven't checked yet, but I suppose that the entire 3.x branch is affected. The first thing I have to do now is to come up with a comprehensive testcase. -- assignee: - lars.gustaebel components: +Library

[issue24866] Boolean representation of Q/queue objects does not fit behaviour of lists etc.

2015-08-14 Thread Frunit
New submission from Frunit: Usually, list-like objects return False when they are empty and True when at least one element is in the list. However, Queue (Python 2) resp. queue (Python 3) objects always return True. I am aware of that objects should always return True unless otherwise stated,

[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2015-08-14 Thread Robert Collins
Robert Collins added the comment: See also issue24864 which is not *quite* a dupe, I also found that it exits 0, unreasonably so. The reporting thing is interesting, but the main thing I care about is that we can catch it and do something reasonable with it... and that if not caught it