[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-11-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks Xiang. Ned, I ask your permission for committing this patch in 3.6. This is not critical neither new bug, it was introduced in 3.3 and is rarely reproducible. But 3.6b4 is the first version in which the changed behavior was documented, and this

[issue28334] netrc does not work if $HOME is not set

2016-11-27 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +xiang.zhang ___ Python tracker ___ ___ Python-bugs-list

[issue14844] netrc does not handle accentuated characters

2016-11-27 Thread Xiang Zhang
Xiang Zhang added the comment: I opened #28806 to improve netrc library. This could be solved if it's merged. -- dependencies: +Improve the netrc library nosy: +xiang.zhang ___ Python tracker

[issue28808] Make PyUnicode_CompareWithASCIIString() never failing

2016-11-27 Thread Xiang Zhang
Xiang Zhang added the comment: LGTM. Although at first I am not in favour of this change but searching Github it seems all usages of this API doesn't check the possible error. -- nosy: +xiang.zhang ___ Python tracker

[issue28779] set_forkserver_preload() can crash the forkserver if preloaded module instantiate multiprocessing classes

2016-11-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Slight mistake in my explanation: the method in the base class raises ValueError, not NotImplementedError. Still, the basic explanation stands. (that said, if you think this is out of scope for this issue, I can revert that part of the patch) --

[issue28779] set_forkserver_preload() can crash the forkserver if preloaded module instantiate multiprocessing classes

2016-11-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I noticed something by accident when trying your example script That's due to the way I wrote the script (the use of __file__ to deduce the module name to preload), not anything inherent in the bug described here. > looking at the file you attached, did

[issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured

2016-11-27 Thread Florian Höch
Florian Höch added the comment: > Thanks for your patch! As you can see, 2.7 is no longer touched as the codebases diverged. Thanks, although I have to say it's a little bit unfortunate that Python 2.7 will be left in a worse state than 2.6 where this bug did not exist. --

[issue28779] set_forkserver_preload() can crash the forkserver if preloaded module instantiate multiprocessing classes

2016-11-27 Thread Davin Potts
Davin Potts added the comment: Antoine: I'm still unclear on what's going on here but I noticed something by accident when trying your example script. Specifically, when I ran your script from the directory where it exists on disk, I could successfully reproduce what you described but if I

[issue28800] Add RETURN_NONE bytecode instruction

2016-11-27 Thread Tim Peters
Tim Peters added the comment: I also don't see a good reason to keep this open now - adds complication for no quantifiable payoff. -- ___ Python tracker

[issue12844] Support more than 255 arguments

2016-11-27 Thread Brett Cannon
Brett Cannon added the comment: Patch LGTM. -- assignee: -> serhiy.storchaka stage: patch review -> commit review ___ Python tracker ___

[issue28810] Document bytecode changes in 3.6

2016-11-27 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue28800] Add RETURN_NONE bytecode instruction

2016-11-27 Thread Brett Cannon
Brett Cannon added the comment: My vote is to close this issue since the performance isn't panning out. -- nosy: +brett.cannon ___ Python tracker ___

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: After some further thought, I am open to changing the C API to accept either hi=None or hi=-1 to reconcile the implementation details without breaking any existing code that relies on either. That would let the argument clinic expose a default value of

[issue19521] Parallel build race condition on AIX since python-2.7

2016-11-27 Thread Eric N. Vander Weele
Eric N. Vander Weele added the comment: I may be able to simplify the build on AIX by removing ld_so_aix and python.exp entirely. Would this be a preferred solution if I am able to get something working? If so, should I create a separate issue to track the change? --

[issue28754] Argument Clinic for bisect.bisect_left

2016-11-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I would suggest to use sys.maxsize for default value in Argument Clinic No thanks. I don't want to subtly change the API for this module or even suggest to users that it might be a good idea to set hi > len. Further, we don't want to slow the pure

[issue28800] Add RETURN_NONE bytecode instruction

2016-11-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: When we added LIST_APPEND (the first of the custom opcodes intended for optimization), it was done only because it was frequently used in inner loops where it provided real benefits to users. In contrast this opcode seems like a waste. Historically for

[issue28813] Remove unneeded folded consts after peephole

2016-11-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, we intentionally decided not to do this when constant folding was added. The idea was to keep the peephole optimizer simple and to have it do the minimum work necessary to get its job done (optimizing the constants table takes extra time to do but

[issue28728] test_host_resolution in test_socket fails

2016-11-27 Thread Xiang Zhang
Xiang Zhang added the comment: The three ipv6 addresses are all invalid addresses if we conform to spec. "::1q" non hex characteres "::1::2"two "::" but at most one is allowed "1:1:1:1:1:1:1:1:1" 144 bits > 128 bits > Perhaps this is similar to the problems encountered

[issue28815] test_socket fails if /proc/modules is existent but not readable

2016-11-27 Thread patrila
New submission from patrila: Dear Python developers The test_socket test fails if /proc/modules is existent but not readable by the user (this is for example the case with the grsecurity patchset of the kernel). The method reading /proc/modules is isTipcAvailable(), which is not a test but a

[issue19521] Parallel build race condition on AIX since python-2.7

2016-11-27 Thread Eric N. Vander Weele
Eric N. Vander Weele added the comment: I also have found this goes back since Python 2.7. I have refreshed the patched for the tip of CPython. What can I do to help push this forward? -- title: parallel build race condition on AIX since python-3.2 -> Parallel build race condition

[issue19521] parallel build race condition on AIX since python-3.2

2016-11-27 Thread Eric N. Vander Weele
Changes by Eric N. Vander Weele : -- nosy: +ericvw versions: +Python 2.7, Python 3.6, Python 3.7 ___ Python tracker ___

[issue27172] Undeprecate inspect.getfullargspec()

2016-11-27 Thread Nick Coghlan
Nick Coghlan added the comment: Initial patch attached. Key missing pieces: - needs a What's New note - needs to undeprecate inspect.getcallargs() as well (more on that below) As my last couple of comments indicate, I'd forgotten that only getargspec() was programmatically deprecated, which

[issue28813] Remove unneeded folded consts after peephole

2016-11-27 Thread Adrian Wielgosik
Adrian Wielgosik added the comment: Attached squashed patch. > But moving constant folding from the peephole optimizer to the AST level > (...) would totally eliminate the need in your patch. I'm aware of that and I'm okay with it. I chose an unfortunate moment for implementing this :)

[issue28814] Deprecation notice on inspect.getargvalues() is incorrect

2016-11-27 Thread Nick Coghlan
New submission from Nick Coghlan: inspect.getargvalues() and inspect.formatargvalues() were deprecated in Python 3.5 as part of implementing issue 20438 This is incorrect, as these are *frame* introspection related functions, not callable introspection ones. The documentation and

[issue28775] Option to set startup directory in IDLE

2016-11-27 Thread Nofar Schnider
Nofar Schnider added the comment: Thanks Terry. I am working on my Macbook Pro so my OS is macOS Sierra. Would love to test on it and also, I am able to test on several VMs with different Unix distributions. I am interested in anything that: 1) can help the Python community. 2) I could learn

[issue28813] Remove unneeded folded consts after peephole

2016-11-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your patch Adrian. I haven't close look, but at first glance your patch looks correct, and the idea looks great. But moving constant folding from the peephole optimizer to the AST level (issue1346238, issue11549) would totally eliminate the

[issue28800] Add RETURN_NONE bytecode instruction

2016-11-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The pair LOAD_CONST/RETURN_VALUE is on 19th place of the top of opcode pairs (see msg269391 in issue27255). Not all of these constants are None. And since the time of LOAD_CONST is much smaller then the time of RETURN_VALUE (the latter includes destroying a

[issue28813] Remove unneeded folded consts after peephole

2016-11-27 Thread Adrian Wielgosik
Changes by Adrian Wielgosik : Added file: http://bugs.python.org/file45662/clean_co_consts.patch ___ Python tracker ___

[issue28813] Remove unneeded folded consts after peephole

2016-11-27 Thread Adrian Wielgosik
Changes by Adrian Wielgosik : -- keywords: +patch Added file: http://bugs.python.org/file45661/indices_tweak.patch ___ Python tracker

[issue28813] Remove unneeded folded consts after peephole

2016-11-27 Thread Adrian Wielgosik
New submission from Adrian Wielgosik: The attached patch adds new logic to peephole compiler to remove constants that are no longer needed after the main peephole pass. For example: def f(): var = 'te' + 'xt' num = -12 num = -6 * 2 return (1, (3, 4), 6)

[issue28682] Bytes support in os.fwalk()

2016-11-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Bytes path support is os.walk() is not documented. Actual behavior of os.fwalk() doesn't contradict the documentation. -- ___ Python tracker

[issue28811] Make pathlib.PurePath.__str__ use shlex.quote

2016-11-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: open(str(path)) -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue28494] is_zipfile false positives

2016-11-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, checking the first bytes of the file is not appropriate option. zipfile should support the Python zip application format [1]. I see two options: 1. Make is_zipfile() more strict that the ZipFile constructor. The later supports ZIP files with a data

[issue28812] Deadlock between GIL and pystate head_mutex.

2016-11-27 Thread INADA Naoki
New submission from INADA Naoki: While investigating #28673, I found another deadlock relating to finalization and threading. deadlocked thread (holding gil / waiting head_mutex): #0 0x7f35dd400a07 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0,

[issue28811] Make pathlib.PurePath.__str__ use shlex.quote

2016-11-27 Thread Ram Rachum
Ram Rachum added the comment: "This will break any code that pass str(path) to API that doesn't support pathlib." I don't understand. Can you give a concrete example of code it would break? -- ___ Python tracker

[issue28811] Make pathlib.PurePath.__str__ use shlex.quote

2016-11-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This will break any code that pass str(path) to API that doesn't support pathlib. In your case you can introduce a short alias: q = shlex.quote ssh_client.run(f'/bin/rm {q(str(path))}') Or add more convenient helper: def q(path):

[issue27647] Update Windows build to Tcl/Tk 8.6.6

2016-11-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Larry, Benjamin, what do you think about updating the version of Tcl/Tk shipped with 3.5 and 2.7 on Windows? Tcl/Tk 8.6.6 Jul 27, 2016 Tcl/Tk 8.5.19 Feb 12, 2016 Currently used releases: In 3.5: 8.6.4.2 In 2.7: 8.5.15.0 -- nosy:

[issue28811] Make pathlib.PurePath.__str__ use shlex.quote

2016-11-27 Thread Ram Rachum
New submission from Ram Rachum: I have a a PurePath object like so: path = PurePath('/home/my awesome user/file.txt') I'm SSHing into a server and I want to remove the file. So I have to do this: ssh_client.run(f'/bin/rm {shlex.quote(str(path))}') Which is really long and ugly.