[issue27458] Allow subtypes of unicode/str to hit the optimized unicode_concatenate block

2016-07-05 Thread Ammar Askar
Ammar Askar added the comment: Thank you very much for the prompt feedback. I didn't even realize there was a __radd__ method, great catch. I've fixed this and added an appropriate test. Very good point about the interning. Seeing as its an implementation detail, I've changed the interned

[issue27458] Allow subtypes of unicode/str to hit the optimized unicode_concatenate block

2016-07-05 Thread Ammar Askar
Changes by Ammar Askar : Removed file: http://bugs.python.org/file43631/python.diff ___ Python tracker ___

[issue24557] Refactor LibreSSL / EGD detection

2016-07-05 Thread Larry Hastings
Larry Hastings added the comment: At this point you're not adding this to 3.5. -- versions: -Python 3.5 ___ Python tracker ___

[issue24557] Refactor LibreSSL / EGD detection

2016-07-05 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: -larry ___ Python tracker ___ ___ Python-bugs-list

[issue27459] unintended changes occur when dealing with list of list

2016-07-05 Thread Zhihan Chen
Zhihan Chen added the comment: Oh I am really sorry for my carelessness. Please accept my apology. and thank you Steven, I will pay special attention to that. -- ___ Python tracker

[issue27452] IDLE: Cleanup config code

2016-07-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ah, the invocation I did not test ;-). It does not matter in this case because "os.path.dirname('config.py')" is '' and the join leaves relative names for the config files that work fine for opening them.

[issue27452] IDLE: Cleanup config code

2016-07-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset adbeef96ae95 by Terry Jan Reedy in branch 'default': Issue #27452: make command line idle-test> python test_help.py work. https://hg.python.org/cpython/rev/adbeef96ae95 -- ___ Python tracker

[issue27454] PyUnicode_InternInPlace can use PyDict_SetDefault

2016-07-05 Thread INADA Naoki
INADA Naoki added the comment: Thank you for pointing it out. That comment seems useless when removing PyDict_GetItem(). So I removed it. -- Added file: http://bugs.python.org/file43634/intern-setdefault2.patch ___ Python tracker

[issue27458] Allow subtypes of unicode/str to hit the optimized unicode_concatenate block

2016-07-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: I haven't studied your code in detail (I won't be qualified to judge it) but I notice this comment: /* Hit the faster unicode_concatenate method if and only if all the following conditions are true: 1. The left operand is a unicode type 2.

[issue27459] unintended changes occur when dealing with list of list

2016-07-05 Thread Steven D'Aprano
Steven D'Aprano added the comment: Hi Zhihan Chen, I see this issue is closed, but for future reference please don't post screenshots to report issues unless they are really needed. For text output, just copy the text from your terminal and paste it into your bug report. Making a screen shot

[issue27459] unintended changes occur when dealing with list of list

2016-07-05 Thread Eryk Sun
Eryk Sun added the comment: This is by design. Please read the answer for the frequently asked question "How do I create a multidimensional list?": https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list -- nosy: +eryksun resolution: -> not a bug stage:

[issue27452] IDLE: Cleanup config code

2016-07-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset da83e115afea by Terry Jan Reedy in branch '2.7': Issue #27452: add line counter and crc to IDLE configHandler test dump. https://hg.python.org/cpython/rev/da83e115afea New changeset 127569004538 by Terry Jan Reedy in branch '3.5': Issue #27452: add

[issue27459] unintended changes occurs when dealing with list of list

2016-07-05 Thread Zhihan Chen
New submission from Zhihan Chen: When creating list of list with multiplication, changing one element of a list will result in changing all lists. -- components: Demos and Tools files: Screenshot from 2016-07-05 16-44-14.png messages: 269858 nosy: Zhihan Chen priority: normal severity:

[issue27459] unintended changes occur when dealing with list of list

2016-07-05 Thread Zhihan Chen
Changes by Zhihan Chen : -- title: unintended changes occurs when dealing with list of list -> unintended changes occur when dealing with list of list ___ Python tracker

[issue27456] TCP_NODELAY

2016-07-05 Thread Yury Selivanov
Yury Selivanov added the comment: PR: https://github.com/python/asyncio/pull/373 -- ___ Python tracker ___

[issue27452] IDLE: Cleanup config code

2016-07-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: $ ./python -m file /home/serhiy/py/cpython/file.py $ ./python file.py file.py -- ___ Python tracker ___

[issue27452] IDLE: Cleanup config code

2016-07-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: How can you get a relative path in 3.6 (or other current Python)? To test, I wrote file.py containing "print(__file__)". Executing from IDLE, with "python path/to/file.py", "path/to/file.py", "file.py" in the path/to directory, and "python -m to.file" (where

[issue27458] Allow subtypes of unicode/str to hit the optimized unicode_concatenate block

2016-07-05 Thread Ammar Askar
Ammar Askar added the comment: Side note, I was using this script which uses gdb to trace the execution path when it concatenates strings. -- Added file: http://bugs.python.org/file43632/test.py ___ Python tracker

[issue27019] Reduce marshal stack depth for 2.7 on Windows debug build

2016-07-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue27019] Reduce marshal stack depth for 2.7 on Windows debug build

2016-07-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +benjamin.peterson ___ Python tracker ___

[issue24557] Refactor LibreSSL / EGD detection

2016-07-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue24557] Refactor LibreSSL / EGD detection

2016-07-05 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___

[issue24557] Refactor LibreSSL / EGD detection

2016-07-05 Thread Brett Cannon
Brett Cannon added the comment: You could try bringing this up on the security-sig to see if there is enough interest: https://mail.python.org/mailman/listinfo/security-sig -- ___ Python tracker

[issue27452] IDLE: Cleanup config code

2016-07-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If config.py is just executed, __file__ can be a relative path. RemoveFile() looks as a part of public API. If you are sure that nobody needs to remove a config file, you can remove this method. -- ___ Python

[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-07-05 Thread Bernard Spil
Bernard Spil added the comment: Can you please replace the HAVE_RAND_EGD bits with OPENSSL_NO_EGD as defined by both OpenSSL 1.1 and LibreSSL? EGD default disabled https://github.com/openssl/openssl/blob/master/Configure#L363 EGD methods not available

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-05 Thread John Hagen
John Hagen added the comment: @Terry The reason for changing the quotes was for consistency, since everywhere else on that page used double quotes. That being said, I don't have a strong preference and will happily revert it if that is the consensus. I'm +0 on the change. I personally use

[issue27458] Allow subtypes of unicode/str to hit the optimized unicode_concatenate block

2016-07-05 Thread Ammar Askar
New submission from Ammar Askar: So currently as far as string concatenation goes. ceval has this nice little branch it can take if both operators are unicode types. However, since this check is an Exact check, it means that subtypes of unicode end up going through the slow code path through:

[issue24557] Refactor LibreSSL / EGD detection

2016-07-05 Thread Bernard Spil
Bernard Spil added the comment: It's been a year since this was created. Can we move this forward? For the OpenSSL 1.1 changes, see https://github.com/openssl/openssl/blob/master/Configure#L363 (egd is disabled in the default configuration) and

[issue27448] Race condition in subprocess.Popen which causes a huge memory leak

2016-07-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: FWIW at this point i'm not willing to "fix" issues in Python 2.7's subprocess module for POSIX platforms as subprocess32 is a superior drop in alternative without the issues. inspecting the 2.7 code, if you are seeing a memory leak and the statements that

[issue24254] Make class definition namespace ordered by default

2016-07-05 Thread Eric Snow
Eric Snow added the comment: Here's an updated patch that matches the accepted PEP. Most notably I've added a tp_deforder slot. This was necessary because subclasses should not inherit their parent's __definition_order__ and the ability to delete cls.__definition_order__ makes this

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-05 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- components: +Tkinter ___ Python tracker ___ ___

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Except for replacing '' with ""*, I am strongly for this patch. To me, caMelcaSe is ugLy, and should not be encouraged. I disagree that camelCase is standard convention, at least not currently. Tkinter itself does not use it. It does not even use TitleCase

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-05 Thread John Hagen
John Hagen added the comment: @Berker, sorry for the incorrect diff format, still new to CPython (and Mercurial) workflow. I've attached the diff in a new format. @SilentGhost I see what you mean that camelCase is used often in tkinter (though many of the examples use lower_camel_case, so it

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-05 Thread John Hagen
Changes by John Hagen : Removed file: http://bugs.python.org/file43627/0001-Fix-tkinter-docs-PEP8.patch ___ Python tracker ___

[issue27457] shlex.quote incorrectly quotes ampersants, pipes

2016-07-05 Thread R. David Murray
R. David Murray added the comment: If you use shell=True you can do almost anything you can do in the shell, but making it safe is up to you. We provide shlex.quote to help you with that, but only you can know what parts of the expression need quoting and what don't. It sounds like you might

[issue27457] shlex.quote incorrectly quotes ampersants, pipes

2016-07-05 Thread klo uo
klo uo added the comment: So there is no reliable way for converting chained command line sequence to string on *nix, when I have to to use string as shell=True? -- ___ Python tracker

[issue27456] TCP_NODELAY

2016-07-05 Thread Yury Selivanov
Yury Selivanov added the comment: > Is there a similar update that can be made to uvloop? Yes. Once it's committed to asyncio, I'll add it to uvloop immediately. That's one benefit of using uvloop -- it gets updates faster ;) -- ___ Python

[issue27456] TCP_NODELAY

2016-07-05 Thread Jim Fulton
Jim Fulton added the comment: Yury, I'd be fine with you making a PR. :) Is there a similar update that can be made to uvloop? -- ___ Python tracker ___

[issue27456] TCP_NODELAY

2016-07-05 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue27456] TCP_NODELAY

2016-07-05 Thread Yury Selivanov
Yury Selivanov added the comment: Jim, I can make a PR, unless you want to do that. -- ___ Python tracker ___

[issue27456] TCP_NODELAY

2016-07-05 Thread Jim Fulton
Jim Fulton added the comment: I forgot to switch to the asyncio branch of ZEO when testing on the Amazon/RedHat linux. When I do, the tests run slow there too. Asyncio is dog slow on every linux I've tried. -- ___ Python tracker

[issue27456] TCP_NODELAY

2016-07-05 Thread Guido van Rossum
Guido van Rossum added the comment: Fine with me -- I have no idea what this flag does (nor the desire to learn :-). -- ___ Python tracker ___

[issue27456] TCP_NODELAY

2016-07-05 Thread Yury Selivanov
Yury Selivanov added the comment: See also https://github.com/python/asyncio/issues/286 I also wanted to raise this question. I think transports should set NODELAY by default (as Golang, for instance). I've been hit by this thing a few times already -- performance of protocols over TCP is

[issue27457] shlex.quote incorrectly quotes ampersants, pipes

2016-07-05 Thread R. David Murray
R. David Murray added the comment: Yes, the point of shlex.quote is to get something that is *not* special to the shell, and therefore safe to pass to the shell. If you *want* an & in your command, just pass it, don't quote it. quote is for *untrusted* data, like filenames received from a

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-05 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Yep adding Python to Android's build system is a rare case. Just to mention there's already an macro and avoiding possible redefined macros is always good. -- ___ Python tracker

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: Integrating Python into AOSP does not make sense. The patch can be changed with s/ANDROID_API/ANDROID_API_LEVEL. -- ___ Python tracker

[issue27457] shlex.quote incorrectly quotes ampersants, pipes

2016-07-05 Thread Xiang Zhang
Xiang Zhang added the comment: Doesn't this the expected behaviour of shlex.quote, return a shell-escaped version of the string s? If && is not quoted, how about "pwd && rm -rf ~"? I think in your case there is no need to use shlex.quote. -- nosy: +xiang.zhang

[issue27456] TCP_NODELAY

2016-07-05 Thread Jim Fulton
Jim Fulton added the comment: Gaaa, forgot to set meta data. -- components: +asyncio nosy: +gvanrossum, haypo, yselivanov type: -> performance versions: +Python 3.4, Python 3.5 ___ Python tracker

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-05 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Here's an issue - there's already a macro called ANDROID_API defined in libcutils [1] If someone is going to integrate Python into AOSP, redefining macros may cause a problem. [1]

[issue27457] shlex.quote incorrectly quotes ampersants, pipes

2016-07-05 Thread klo uo
New submission from klo uo: Example code: Python 3.4.3 (default, Oct 14 2015, 20:28:29) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import shlex >>> cmd = ["pwd", "&&", "ls"] >>> '

[issue27442] expose the Android API level in sysconfig.get_config_vars()

2016-07-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: According to issue 27453, do this minor change in the patch: s/$CC -E/$CPP $CPPFLAGS. -- ___ Python tracker ___

[issue27453] Fix cross-compilation with Android NDK and Clang

2016-07-05 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Several days ago I have once tried to set CC="clang -target $(TARGET) -gcc-toolchain $(GCC_TOOLCHAIN)", and it failed to build some dependency of Python (I can't remember). Just tried and everything is OK. Dunno what's changed. Anyway both approaches (-target

[issue27456] TCP_NODELAY

2016-07-05 Thread Jim Fulton
New submission from Jim Fulton: tl;dr TCP_NODELAY should be set by default and/or there should be a proper way to set it. I've ported ZEO, ZODB's client-server networking layer to asyncio. Things were going pretty well. I've been developing on a Mac. Yesterday, I ran some performance

[issue26826] Expose new copy_file_range() syscall in os module.

2016-07-05 Thread Facundo Batista
Facundo Batista added the comment: It looked ok to me (I couldn't try it, as I still have 4.4 kernel). One thing to the be done is to improve the test coverage (trying the usage of all the parameters, at least). -- nosy: +facundobatista ___ Python

[issue27453] Fix cross-compilation with Android NDK and Clang

2016-07-05 Thread Xavier de Gaye
Xavier de Gaye added the comment: With configure run as './configure CC="$(CC)" ...' and when CC is set to: CC = clang --sysroot=$(SYSROOT) -target $(TARGET) -gcc-toolchain $(GCC_TOOLCHAIN) and building for armv7 on android-21, then configure runs $CPP as: checking for CPP... clang

[issue27454] PyUnicode_InternInPlace can use PyDict_SetDefault

2016-07-05 Thread Berker Peksag
Berker Peksag added the comment: I think you also need to update the comment below: /* It might be that the GetItem call fails even though the key is present in the dictionary, namely when this happens during a stack overflow. */ -- nosy: +berker.peksag, haypo,

[issue17128] OS X system openssl deprecated - installer should build local libssl

2016-07-05 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: -brian.curtin ___ Python tracker ___ ___

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-05 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch. If you want to improve the examples in tkinter documentation, I'd suggest to update Class.__init__(self, ...) to super().__init__(...). There is no old-style classes in Python 3 anymore so those examples could be updated safely. Also,

[issue27441] redundant assignments to ob_size of new ints that _PyLong_New returned

2016-07-05 Thread SilentGhost
Changes by SilentGhost : -- nosy: +haypo, serhiy.storchaka stage: -> commit review versions: +Python 3.6 ___ Python tracker ___

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-05 Thread SilentGhost
SilentGhost added the comment: This patch is going to be rejected, camelCase is standard convention in tkinter and logging modules and that's why it is used in documentation as well. -- nosy: +SilentGhost ___ Python tracker

[issue27455] Fix tkinter examples to be PEP8 compliant

2016-07-05 Thread John Hagen
New submission from John Hagen: Patch fixes tkinter examples to be PEP8 compliant. -- assignee: docs@python components: Documentation files: 0001-Fix-tkinter-docs-PEP8.patch keywords: patch messages: 269820 nosy: John Hagen, docs@python priority: normal severity: normal status: open

[issue27454] PyUnicode_InternInPlace can use PyDict_SetDefault

2016-07-05 Thread INADA Naoki
New submission from INADA Naoki: PyDict_SetDefault() was added Python 3.4 Currently, PyUnicode_InternInPlace() uses PyDict_GetItem, and PyDict_SetItem if no item found. It can be replaced PyDict_SetDefault() easily. -- components: Interpreter Core files: intern-setdefault.patch

[issue27450] bz2: BZ2File should expose compression level as an attribute

2016-07-05 Thread R. David Murray
R. David Murray added the comment: New features can only be added in a new feature release, which means 3.6 at the moment (the window for that is shrinking fast, though, we hit beta in September). -- nosy: +r.david.murray stage: -> needs patch versions: -Python 2.7, Python 3.5

[issue27422] Deadlock when mixing threading and multiprocessing

2016-07-05 Thread R. David Murray
R. David Murray added the comment: Heh, yeah. What I was really trying to do by that comment was clarify for any *other* readers that stumble on this issue later it is just the python code that *has* to be constrained by the GIL. I have no idea how much of the scipy stack drops the gil at

[issue27453] Fix cross-compilation with Android NDK and Clang

2016-07-05 Thread Chi Hsuan Yen
New submission from Chi Hsuan Yen: Motivation: Android NDK is deprecating GCC and moving ot Clang/LLVM. From [1]: We strongly recommend switching to Clang. GCC in the NDK is now deprecated in favor of Clang. This patch fixes the only one problem when migrating GCC to Clang. In my build

[issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines

2016-07-05 Thread Mark Dickinson
Mark Dickinson added the comment: [David] > maybe Mark will be interested, but he probably doesn't have time either. > Also, he's been known to say he'd like to drop support for non-IEEE > architectures ;) Exactly correct on all counts. :-) I'm *very* interested: I've been looking for a

[issue27254] UAF in Tkinter module

2016-07-05 Thread Emin Ghuliev
Changes by Emin Ghuliev : -- status: open -> closed ___ Python tracker ___ ___

[issue27254] UAF in Tkinter module

2016-07-05 Thread Emin Ghuliev
Changes by Emin Ghuliev : -- resolution: -> third party ___ Python tracker ___ ___