[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: Maybe, we can skip Method object entirely using _PyObject_GetMethod(). Currently it is used only in LOAD_METHOD. But PyObject_CallMethod(), _PyObject_CallMethodId(), PyObject_CallMethodObjArgs(), _PyObject_CallMethodIdObjArgs() can use it too. --

[issue29510] gitignore settings files for Eclipse IDE

2017-02-09 Thread Jim DeLaHunt
New submission from Jim DeLaHunt: The Eclipse IDE, and its relatives pydev and LiClipse, store settings in the root of a repository. It would be nice for the master .gitignore file to ignore these files, so that individual developers don't have to do this. I am preparing a GitHub Pull Request

[issue29510] gitignore settings files for Eclipse IDE

2017-02-09 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: A fix is in GitHub cpython PR #75. -- pull_requests: +26 ___ Python tracker ___ ___ Python-bugs-list m

[issue29510] gitignore settings files for Eclipse IDE

2017-02-09 Thread Jim DeLaHunt
Changes by Jim DeLaHunt : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue29503] Make embedded-Python detectable

2017-02-09 Thread Andi Bergmeier
Andi Bergmeier added the comment: I am not the primary contributor to Bazel, so the decision to support embeddable Python is not mine to make. That said, it seems to me like embeddable Python is a perfect fit if you want to have a hermetic Python installation. And I AM actually the person advo

[issue29510] gitignore settings files for Eclipse IDE

2017-02-09 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: I'm now looking at cpython as retrieved from Mercurial by Eclipse. It appears to be concerned by the presence of .project which is also an Eclipse settings file. It might be reasonable to extend the scope of this issue to include telling Mercurial to ignore s

[issue29510] gitignore settings files for Eclipse IDE

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: We'll move to github soon. So no need for caring hgignore. While there is `.vscode` in gitignore already, I'm not fan of adding hundreds of IDE specific rule to gitignore. Why don't you use gitignore_global? -- nosy: +inada.naoki

[issue29510] gitignore settings files for Eclipse IDE

2017-02-09 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: gitignore_global is a great idea. I had not heard of it before. But here it is: https://help.github.com/articles/ignoring-files/ . This instruction also has a link to a gist with a lot of helpful global ignores. I understand your reluctance to add entries for

[issue29511] Add 'find' as build-in method for lists

2017-02-09 Thread George Shuklin
New submission from George Shuklin: I found that Python provides 'find()' and 'in' methods for strings, but lacking same functionality for lists. Because strings and lists are very similar, it's reasonable to expect same function available for both. Here long and rather ugly hack list on stac

[issue29510] gitignore settings files for Eclipse IDE

2017-02-09 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report and for the patch, Jim! I agree with Inada. global_gitignore is a better way to achieve this. > Maybe a better solution would be to add something to the devguide about > excluding IDE settings files, with a link to the Github instructions.

[issue29510] gitignore settings files for Eclipse IDE

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: I agree with Berker. But some git/github tips are very useful for CPython core developers while they aren't CPython specific. And some of them are not in beginner's guide. I think it's worth enough to add link to such tips. * Use gitignore_global to ignore IDE/E

[issue29511] Add 'find' as build-in method for lists

2017-02-09 Thread Steven D'Aprano
Steven D'Aprano added the comment: Only 3.7 can receive new functionality. Here is a pure Python implementation of a subsequence test: https://code.activestate.com/recipes/577850-search-sequences-for-sub-sequence/ It appears to be reasonably popular on Activestate: it has about 7000 views, bu

[issue29506] Incorrect documentation for the copy module

2017-02-09 Thread Marco Buttu
Marco Buttu added the comment: +1 for the Steven's suggestion -- nosy: +marco.buttu ___ Python tracker ___ ___ Python-bugs-list mailin

[issue29476] Simplify set_add_entry()

2017-02-09 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: > But PyObject_CallMethod(), _PyObject_CallMethodId(), > PyObject_CallMethodObjArgs(), _PyObject_CallMethodIdObjArgs() can use it too. CallMethod[Id]ObjArgs() can use it easily. But format support is not so easy. -- Added file: http://bugs.python.org/file

[issue29476] Simplify set_add_entry()

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: I vote -1 on set_no_dummy_reuse.diff since it doesn't show any significant speedup (3 ns on 130 ns with a std dev of 8 ns is not something significant), and makes the set type 2x slower on some corner cases. -- ___

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: callmethod.patch: + ../python.default -m perf compare_to default.json patched2.json -G --min-speed=1 Slower (5): - logging_silent: 717 ns +- 9 ns -> 737 ns +- 8 ns: 1.03x slower (+3%) - fannkuch: 1.04 sec +- 0.01 sec -> 1.06 sec +- 0.02 sec: 1.02x slower (+2%) - c

[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: Output of attached profiler_c_code.py example: --- haypo@selma$ ./python profiler_c_code.py (, 'call', None) (, 'return', 'h') (, 'call', None) (, 'return', 'e') (, 'call', None) (, 'return', 'l') (, 'call', None) (, 'return', 'l') (, 'call', None) (, 'return',

[issue29400] Add instruction level tracing via sys.settrace

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: See aslo issue #29502: "Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?" -- ___ Python tracker ___ __

[issue29306] Check usage of Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() in new FASTCALL functions

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: enter_recursive_call_36.patch: Patch for Python 3.6. * Add Py_EnterRecursiveCall() into C functions * Don't call C functions inside a Py_EnterRecursiveCall() block in PyObject_Call() -- Added file: http://bugs.python.org/file46605/enter_recursive_call_

[issue29512] regrtest refleak: implement bisection feature

2017-02-09 Thread STINNER Victor
New submission from STINNER Victor: It would be great to be able to list which methods cause a reference leak. Example right now on the 3.6 branch: $ ./python -m test -R 3:3 test_os Run tests sequentially 0:00:00 [1/1] test_os beginning 6 repetitions 123456 .. test_os leaked [124, 124,

[issue1025395] email.Utils.parseaddr fails to parse valid addresses

2017-02-09 Thread Sascha Silbe
Changes by Sascha Silbe : -- nosy: +sascha_silbe ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue29504] blake2: compile error with -march=bdver2

2017-02-09 Thread Christian Heimes
Christian Heimes added the comment: It's a bug in Blake2's reference implementation with nested C++ comments (/* /* */ */). https://github.com/BLAKE2/BLAKE2/commit/259e61dedee5383eac1a90db6ef88f9ccdcf6002#diff-ac1a341ec0ed38dc5d219572f4282287 fixed the bug. For Python 3.6.1 I'm going to update

[issue29504] blake2: compile error with -march=bdver2

2017-02-09 Thread Christian Heimes
Christian Heimes added the comment: I don't have time to fix the issue right away. Python's copy of blake2 needs some manual massaging and tweaking. -- assignee: -> christian.heimes nosy: +ned.deily priority: normal -> release blocker stage: -> needs patch type: -> compile error vers

[issue29480] Mac OSX Installer SSL Roots

2017-02-09 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue11726] clarify that linecache only works on files that can be decoded successfully

2017-02-09 Thread Antti Haapala
Antti Haapala added the comment: Every now and then there are new questions and answers regarding the use of `linecache` module on Stack Overflow for doing random access to text files, even though the documentation states that it is meant for Python source code files. One problem is that the

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread STINNER Victor
New submission from STINNER Victor: The following code leaks one reference on Python 3.6: def test_attributes(self): d = dict((entry.name, entry) for entry in os.scandir('.')) Or try the command: ./python -m test -R 3:3 test_os -v -m test_attributes -- components: Libra

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: I'm sorry, callmethod.patch is tuned other place, and causing SEGV. method_fastcall2.patch is tuning same function (call_method() in typeobject.c), and uses trick to bypass temporary method object (same to _PyObject_GetMethod()). $ ./python -m perf timeit --comp

[issue29306] Check usage of Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() in new FASTCALL functions

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: check_recursion_depth.py: script using Python functions and C function (functools.partial) to check the recursion depth. Example with Python 3.6: haypo@selma$ ./python check_recursion_depth.py # unpatched got: 148, expected: 100 haypo@selma$ ./python check_

[issue29306] Check usage of Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() in new FASTCALL functions

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: I tested check_recursion_depth.py: Python 2.7, 3.5 and 3.6 have the bug. Python 3.7 is already fixed. -- versions: +Python 2.7, Python 3.5 ___ Python tracker _

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: > method_fastcall2.patch is tuning same function (call_method() in > typeobject.c), and uses trick to bypass temporary method object (same to > _PyObject_GetMethod()). Oh, great idea! That's why I put you in the nosy list ;-) You know better than me this area

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue29506] Incorrect documentation for the copy module

2017-02-09 Thread Pedro
Pedro added the comment: "Because deepcopy copies everything it may copy too much, such as data which is intended to be shared (instead of duplicated) between copies." A bit more explicit? -- ___ Python tracker _

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The owning of references in the path_t structure was changed in issue29034, but some code still directly manipulates reference counters of path_t fields. Proposed patch should fix the leak. -- keywords: +patch nosy: +xiang.zhang stage: -> patch revi

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 3.7 doesn't leak, but contains outdated comment and code. -- versions: +Python 3.7 Added file: http://bugs.python.org/file46609/scandir-refleak-3.7.patch ___ Python tracker _

[issue29212] Python 3.6 logging thread name regression with concurrent.future threads

2017-02-09 Thread desbma
desbma added the comment: Ping, so that this has a chance for the 3.6.1 release. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: method_fastcall3.patch implement the trick in more general way. (I haven't ran test yet since it's midnight. I'll post result later.) -- Added file: http://bugs.python.org/file46610/method_fastcall3.patch ___ Python tra

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: docs@python -> ncoghlan stage: patch review -> commit review ___ Python tracker ___ ___ Python-

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Nick Coghlan
Nick Coghlan added the comment: Looks good to me, so I'll apply these right now :) -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Xiang Zhang
Xiang Zhang added the comment: 3.6 LGTM. 3.7 is technically right to me. But it looks to me AC shouldn't call path_cleanup in .c.h. It always do nothing. -- ___ Python tracker _

[issue29506] Incorrect documentation for the copy module

2017-02-09 Thread R. David Murray
R. David Murray added the comment: I prefer Steven's formulation. The parenthetical is more distracting than clarifying, I think. I agree that 'administrative' is confusing and unnecessary. -- nosy: +r.david.murray ___ Python tracker

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If PyObject_New(ScandirIterator, &ScandirIteratorType) fails the path should be cleaned up by Argument Clinic. -- assignee: -> serhiy.storchaka ___ Python tracker _

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: scandir-refleak-3.6.patch LGTM. The following removed Py_CLEAR() is just redundant, so it's ok to remove it. -Py_CLEAR(iterator->path.object); -- ___ Python tracker _

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Xiang Zhang
Xiang Zhang added the comment: > If PyObject_New(ScandirIterator, &ScandirIteratorType) fails the path should > be cleaned up by Argument Clinic. Ohh yes. My stupid. Then both LGTM. -- stage: patch review -> commit review ___ Python tracker

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset c63b09833141 by Nick Coghlan in branch '3.5': Issue #26355: Specify canonical URLs in docs pages https://hg.python.org/cpython/rev/c63b09833141 New changeset 80970cf56048 by Nick Coghlan in branch '3.6': Merge issue #26355 fix from Python 3.5 https:

[issue29506] Incorrect documentation for the copy module

2017-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Current documentation looks correct to me. What is the problem with it? Steven's formulation says about "deepcopy", but current documentation says about common issues of "deep copy" and describes how copy.deepcopy() solves them. -- nosy: +serhiy.sto

[issue29506] Incorrect documentation for the copy module

2017-02-09 Thread Marco Buttu
Marco Buttu added the comment: Serhiy is right about "deep copy" instead of "deepcopy", but IMO the Steven's proposal (with the "deep copy" correction) is much clearer than the current doc. -- ___ Python tracker _

[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-09 Thread Nick Coghlan
New submission from Nick Coghlan: The magic number change in 3.5.3 broke the world when Fedora attempted to rebase from 3.5.2, but upstream CPython developers don't currently get an automated notification that it isn't permitted to change the magic number in a maintenance release - instead, th

[issue29514] Add a test case that prevents magic number changes in minor releases

2017-02-09 Thread Petr Viktorin
Petr Viktorin added the comment: For the record, the magic number was changed in issue27286 -- ___ Python tracker ___ ___ Python-bugs-

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset a47e20b636d2a5559e5831c6805df3cba1ddb2a1 by Nick Coghlan in branch 'master': Issue #26355: Specify canonical URLs in docs pages https://github.com/python/cpython/commit/a47e20b636d2a5559e5831c6805df3cba1ddb2a1 New changeset 37150972faf660571a3ae70

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset b07d454e45a2 by Nick Coghlan in branch '2.7': Issue #26355: Specify canonical URLs in docs pages https://hg.python.org/cpython/rev/b07d454e45a2 -- ___ Python tracker _

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset a47e20b636d2a5559e5831c6805df3cba1ddb2a1 by Nick Coghlan in branch '3.5': Issue #26355: Specify canonical URLs in docs pages https://github.com/python/cpython/commit/a47e20b636d2a5559e5831c6805df3cba1ddb2a1 -- ___

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Nick Coghlan
Nick Coghlan added the comment: OK, I'm marking this as closed, since it's as resolved as we can make it through a *CPython* change. Since the old branches aren't autobuilt anymore, adding a canonical URL reference to them would presumably be a matter of running a script over the built docs.

[issue29476] Simplify set_add_entry()

2017-02-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: The problem with posting an idea here on the tracker while it is still in the research phase is that it will be prematurely downvoted without have fully thought it through. What I'm working on now is that opposite question. Was it ever worthwhile to add t

[issue29449] clear() should return prior state in threading.Event

2017-02-09 Thread Jyotirmoy Bhattacharya
Jyotirmoy Bhattacharya added the comment: Thanks for the comments above. I'm going to rethink my design. Closing this bug. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: method_fastcall4.patch: Based on method_fastcall3.patch, I just added call_unbound() and call_unbound_noarg() helper functions to factorize code. I also modified mro_invoke() to be able to remove lookup_method(). I confirm the speedup with attached bench.py:

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file46612/bench.py ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset e8455e7137b9bd63d4c0183558161dba6ea00d32 by Nick Coghlan in branch '2.7': Issue #26355: Specify canonical URLs in docs pages https://github.com/python/cpython/commit/e8455e7137b9bd63d4c0183558161dba6ea00d32 -- ___

[issue29503] Make embedded-Python detectable

2017-02-09 Thread Steve Dower
Steve Dower added the comment: You can also use the nuget packages (search on nuget.org for Python). These are intended to be used is scripted standalone setups, such as CI systems. I've been using them as part of most of my build systems recently. They support distutils and pip (not venv in t

[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2017-02-09 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon, christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: method_fastcall4.patch looks clean enough, and performance benefit seems nice. I don't know current test suite covers unusual special methods. Maybe, we can extend test_class to cover !unbound (e.g. @classmethod) case. -- _

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: method_fastcall4.patch benchmark results. It's not the first time that I notice that fannkuch and nbody benchmarks become slower. I guess that it's effect of changing code placement because of unrelated change in the C code. Results don't seem significant on s

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > OK, I'm marking this as closed, since it's as resolved as we can make it > through a *CPython* change. Thanks you Nick, I appreciate the time you took to do that. ANd thank you Berker for the review. -- ___

[issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4

2017-02-09 Thread Maximilian Hils
Maximilian Hils added the comment: This still seems to be an issue with the offical Python 3.6 builds on Windows 10: Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] on win32 >>> import socket >>> socket.IPPROTO_IPV6 Traceback (most recent call last): Fil

[issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4

2017-02-09 Thread Christian Heimes
Christian Heimes added the comment: The constants are defined on Linux. That means Windows does not define the constants and therefore the socket module can't export them. This ticket is closed. If you still think it's a bug, please open a new ticket and reference this ticket. -- nosy

[issue1353344] python.desktop

2017-02-09 Thread Nick Coghlan
Nick Coghlan added the comment: >From a downstream redistributor point of view, the key pieces it would be >handy to consolidate upstream are the desktop file itself (with all the >translations) and the preferred icon. It wouldn't really help much to have it >integrated into "make install" sin

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Nick Coghlan
Nick Coghlan added the comment: Matthias - thanks for figuring out how to turn my "we should do this" idea into a change we've actually made :) -- ___ Python tracker ___ ___

[issue29034] Fix memory leak and use-after-free in path_converter

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4e3a16bdadae by Serhiy Storchaka in branch '3.6': Issue #29513: Fixed a reference leak in os.scandir() added in issue #29034. https://hg.python.org/cpython/rev/4e3a16bdadae -- ___ Python tracker

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4e3a16bdadae by Serhiy Storchaka in branch '3.6': Issue #29513: Fixed a reference leak in os.scandir() added in issue #29034. https://hg.python.org/cpython/rev/4e3a16bdadae New changeset a3f8c5d172b4 by Serhiy Storchaka in branch 'default': Issue #2

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue26355] Emit major version based canonical URLs for docs

2017-02-09 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: > turn my "we should do this" idea into a change we've actually made :) Looking forward to being able to do this more on GitHub as I am more familiar with git. Good luck for the transition, I'm pretty sure there will be some hard time in the next few wee

[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2017-02-09 Thread Maximilian Hils
New submission from Maximilian Hils: The latest Windows builds for Python 3.5.3/3.6.0 do not export socket.IPPROTO_IPV6, even though e.g. socket.IPV6_V6ONLY is exported. This seems to be wrong to me as IPV6_V6ONLY requires the corresponding socket option level IPPROTO_IPV6 to be actually usefu

[issue29070] Integration tests for pty.spawn on Linux and all other platforms

2017-02-09 Thread Cornelius Diekmann
Cornelius Diekmann added the comment: Uploaded a new version of the patch. Changelog of this patch (compared to v3): * Fixed reliability issue of existing pty tests. * pty.fork() should now also work on systems without os.forkpty(). Added code to test this backup path of pty.fork(). * Revert

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset be85fd4ef41979dbe68262938da12328fb6cfb8c by Serhiy Storchaka in branch '3.6': Issue #29513: Fixed a reference leak in os.scandir() added in issue #29034. https://github.com/python/cpython/commit/be85fd4ef41979dbe68262938da12328fb6cfb8c --

[issue29034] Fix memory leak and use-after-free in path_converter

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset be85fd4ef41979dbe68262938da12328fb6cfb8c by Serhiy Storchaka in branch '3.6': Issue #29513: Fixed a reference leak in os.scandir() added in issue #29034. https://github.com/python/cpython/commit/be85fd4ef41979dbe68262938da12328fb6cfb8c --

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 Though this is a rather large and impactful patch, I think it is a great idea. It will be one of the highest payoff applications of FASTCALL, broadly benefitting a lot of code. Let's be sure to be extra careful with this one because it is touching centr

[issue29510] gitignore settings files for Eclipse IDE

2017-02-09 Thread Jim DeLaHunt
Jim DeLaHunt added the comment: I have set up a global gitignore, and it works for me. % git config --global core.excludesfile ~/.gitignore_global (Amusingly, I had _already- set a global gitignore, but I had forgotten it existed, and it didn't ignore these IDE files.) I agree that we should n

[issue29516] shutil.copytree(symlinks=True) fails when copying symlinks cross-device and there is no alternative

2017-02-09 Thread Darko Poljak
New submission from Darko Poljak: shutil.copytree() always calls copystat() for symlinks. Copying symlink to another volume fails if some attributes cannot be set. And there is no alternative to bypass this as it can be done for files and directories using copy_function. By default copy_functi

[issue29513] os.scandir(str) reference leak (test_os refleak)

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the quick fix Serhiy! I was working on patch and I like to check for refleaks. Sadly, it wasn't noticed before. At least my test was pass :-) -- ___ Python tracker _

[issue29034] Fix memory leak and use-after-free in path_converter

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: Does the latest commit fixes a regression introduced by the first fix? Too bad that we missed the refleak in an issue fixing a memory leak :-/ -- ___ Python tracker ___

[issue29476] Simplify set_add_entry()

2017-02-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't downvote, no. I am just unsure. I don't have enough information to say that the net benefit is positive neither that it is negative. In the face of hesitance the status quo wins. But it looks to me that in dominant cases set_add_entry() is used with

[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-02-09 Thread DAVID ALEJANDRO Pineda
New submission from DAVID ALEJANDRO Pineda: Hello. I'm working in a real time data collector project. I'm using asyncio and multiprocessing (run_in_executor). In python 3.5 worked fine but in python 3.6 not, gave to me this error: "Traceback (most recent call last): File "/usr/local/lib/pyth

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7b8df4a5d81d by Victor Stinner in branch 'default': Optimize slots: avoid temporary PyMethodObject https://hg.python.org/cpython/rev/7b8df4a5d81d -- nosy: +python-dev ___ Python tracker

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: Raymond Hettinger: "+1 Though this is a rather large and impactful patch, I think it is a great idea. It will be one of the highest payoff applications of FASTCALL, broadly benefitting a lot of code." In my experience, avoiding temporary tuple to pass positio

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: Naoki: "method_fastcall4.patch looks clean enough, and performance benefit seems nice." Ok, I pushed the patch with minor changes: * replace "variants:" with "Variants:" * rename lookup_maybe_unbound() to lookup_maybe_method() * rename lookup_method_unbound()

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread Yury Selivanov
Yury Selivanov added the comment: patch looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset be663c9a9e24 by Victor Stinner in branch 'default': Issue #29507: Update test_exceptions https://hg.python.org/cpython/rev/be663c9a9e24 -- ___ Python tracker _

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: Oh, I was too lazy to run the full test suite, I only ran a subset and I was bitten by buildbots :-) test_unraisable() of test_exceptions fails. IHMO the BrokenRepr subtest on this test function is really implementation specific. To fix buildbots, I removed th

[issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4

2017-02-09 Thread Maximilian Hils
Maximilian Hils added the comment: Thanks for the insanely quick feedback. I still think this is a bug, so I filed https://bugs.python.org/issue29515 with additional details. Let's continue there. -- ___ Python tracker

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: I checked typeobject.c: there is a single case where we use the result of lookup_maybe_method()/lookup_method() for something else than calling the unbound method: slot_tp_finalize() calls PyErr_WriteUnraisable(del), the case discussed in my previous message w

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: Thanks for finishing my draft patch, Victor. callmetohd2.patch is same trick for PyObject_CallMethod* APIs in abstract.c. It fixes segv in callmethod.patch. And APIs receiving format string can do same trick when format is empty too. As I grepping "PyObject_CallMe

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset e5cd74868dfc by Victor Stinner in branch 'default': Issue #29507: Fix _PyObject_CallFunctionVa() https://hg.python.org/cpython/rev/e5cd74868dfc -- ___ Python tracker _

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread STINNER Victor
STINNER Victor added the comment: callmethod2.patch: I like that change on object_vacall(), I'm not sure about the change on PyObject_CallMethod*() only for empty format string. I suggest to split your patch into two parts, and first focus on object_vacall(). Do you have a benchmark for this o

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset b1dc6b6d5fa20f63f9651df2e7986a066c88ff7d by Victor Stinner in branch 'master': Issue #29507: Fix _PyObject_CallFunctionVa() https://github.com/python/cpython/commit/b1dc6b6d5fa20f63f9651df2e7986a066c88ff7d --

[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-02-09 Thread R. David Murray
Changes by R. David Murray : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows

2017-02-09 Thread Eryk Sun
Eryk Sun added the comment: The macro is defined but not defined. If I insert the following line before the #ifdef check: #define IPPROTO_IPV6 IPPROTO_IPV6 then the constant gets added: >>> import _socket >>> _socket.IPPROTO_IPV6 41 The same applies to IPPROTO_IPV4 and probab

[issue29518] 'for' loop not automatically breaking (index error on line of loop header)

2017-02-09 Thread Justin McNiel
New submission from Justin McNiel: All for loops are refusing to break (Python 2.7.13) on win32 - only on execution of '.py' file an example would be:" for x in range(5): #Line 1 of main.py print x#Line 2 of main.py " and the resulting error would be:" File "pathToFile\main.

[issue29518] 'for' loop not automatically breaking (index error on line of loop header)

2017-02-09 Thread Josh Rosenberg
Josh Rosenberg added the comment: You're going to need to actually provide the source file here. This makes no sense as is. -- nosy: +josh.r ___ Python tracker ___ _

[issue29519] weakref spewing exceptions during finalization when combined with multiprocessing

2017-02-09 Thread Łukasz Langa
New submission from Łukasz Langa: Antoine, #28427 introduces a regression. When used with multiprocessing, the WeakValueDictionary in `multiprocessing.util._afterfork_registry` causes the `remove()` to be invoked during `atexit` and then `sys.meta_path` is None, lots of things is None, includi

[issue29507] Use FASTCALL in call_method() to avoid temporary tuple

2017-02-09 Thread INADA Naoki
INADA Naoki added the comment: > I'm not sure about the change on PyObject_CallMethod*() only for empty format > string. There are many place using _PyObject_CallMethodId() to call method without args. Maybe, we should recommend to use _PyObject_CallMethodIdObjArgs() when no arguments, and rep

  1   2   >