[issue31795] Slicings documentation doesn't mention Ellipsis

2017-10-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: In regular Python, the ellipsis isn't used for slicing. It does have special meaning for numpy. So, I think the docs may be correct as is. -- nosy: +rhettinger ___ Python tracker

[issue31796] The mccabe complexity output in module flake8.

2017-10-15 Thread Ned Deily
Ned Deily added the comment: flake8 is not part of the Python Standard Library. You might start with its project page here: https://gitlab.com/pycqa/flake8 -- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed

[issue31796] The mccabe complexity output in module flake8.

2017-10-15 Thread fuqianz
New submission from fuqianz : Dear, I have found that if a function name appears more than one time in a file, the output of McCabe complexity for this function name only appear once. I think it should output all of them. So, I send this email for inquiring about this

[issue31795] Slicings documentation doesn't mention Ellipsis

2017-10-15 Thread Nitish
New submission from Nitish : Ellipsis object documentation[1] specifies that Ellipsis is mainly used by Slicings. But Slicing's documentation[2] doesn't mention anything about Ellipsis. Consequently - it is not immediately clear from Ellipsis documentation what

[issue31791] Ensure that all PyTypeObject fields are set to non-NULL defaults

2017-10-15 Thread Raymond Hettinger
Raymond Hettinger added the comment: For all the reasons Serhiy mentioned, I recommend rejecting this request. This was an intentional and long-standing design decision. A substantial part of the Python ecosystem depends on it. -- nosy: +rhettinger

[issue31788] Typo in comments Modules/_ssl.c

2017-10-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset cfc604722ff5ad64de96ddeb944661f1e94d8cd0 by Benjamin Peterson (Miss Islington (bot)) in branch '3.6': [3.6] completly -> completely (GH-3999) (closes bpo-31788) (#4008)

[issue31788] Typo in comments Modules/_ssl.c

2017-10-15 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +3982 ___ Python tracker ___

[issue31788] Typo in comments Modules/_ssl.c

2017-10-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 1295e11d397c6138427296d5f9653a9e7dd69062 by Benjamin Peterson (Semen Zhydenko) in branch 'master': completly -> completely (#3999) (closes bpo-31788)

[issue31786] In select.poll.poll() ms can be 0 if timeout < 0

2017-10-15 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I have updated both the test and the implementation to address your feedback. -- ___ Python tracker

[issue31788] Typo in comments Modules/_ssl.c

2017-10-15 Thread Aniket Vyas
Aniket Vyas added the comment: My bad, didn't notice the PR already existing. -- ___ Python tracker ___

[issue31788] Typo in comments Modules/_ssl.c

2017-10-15 Thread Aniket Vyas
Aniket Vyas added the comment: I can pick this up if it's okay. -- nosy: +vyas45 ___ Python tracker ___

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Stefan Krah
Stefan Krah added the comment: I'd push it so we don't have to worry about similar things in the future. The "warnings.catch_warnings()" thing is also a workaround for some past numpy release. -- ___ Python tracker

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The issue is fixed on NumPy side (will be included in the next release). Is the workaround on our side still needed? -- ___ Python tracker

[issue31786] In select.poll.poll() ms can be 0 if timeout < 0

2017-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Pablo. The initial test leaked a thread, now it is much better. Could you please make the test testing different timeout values: None, -1, -1.0, -0.1, -1e-100? -- ___

[issue31786] In select.poll.poll() ms can be 0 if timeout < 0

2017-10-15 Thread Pablo
Pablo added the comment: I have added a Pull Request fixing this issue. The current implementation is checking in the syscall if the value for ms before rounding was negative. To test for this, I call poll.poll in a thread and check that the thread is alive after a join

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Stefan Krah
Stefan Krah added the comment: I can't figure out how to make the damn button green on GitHub, so LGTM. :) -- ___ Python tracker

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +3981 stage: -> patch review ___ Python tracker ___

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Stefan Krah
Stefan Krah added the comment: That's fine. -- ___ Python tracker ___ ___

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread STINNER Victor
STINNER Victor added the comment: I suggest to always save/restore env vars on numpy import, since we don't control 3rd party code. -- ___ Python tracker

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Stefan Krah
Stefan Krah added the comment: Thanks. If it only occurs when mixing debug/non-debug I don't think we have to do anything about it. -- ___ Python tracker

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is particularly a NumPy issue (I have opened a bug https://github.com/numpy/numpy/issues/9861). It is exposed because I have installed NumPy with non-debug build of CPython and run the test with debug build of CPython. The

[issue31794] Issues with test.autotest

2017-10-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are issues with running tests by importing test.autotest. 1. test_builtin failed. 0:00:00 load avg: 0.70 [ 4/407] test_builtin test test_builtin failed -- Traceback (most recent call last): File

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Stefan Krah
Stefan Krah added the comment: So it is a numpy issue? Which numpy version is it? -- versions: +Python 3.8 -Python 3.6, Python 3.7 ___ Python tracker

[issue31786] In select.poll.poll() ms can be 0 if timeout < 0

2017-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This particular issue can be fixed by adding the condition (PyFloat_Check(timeout_obj) && PyFloat_AsDouble(timeout_obj) < 0). The problem is only with writing good test for infinity timeout. This test could be also used for

[issue31786] In select.poll.poll() ms can be 0 if timeout < 0

2017-10-15 Thread Berker Peksag
Change by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I just have installed NumPy. It temporary sets these two environment variables for importing the multiarray numpy extension module, but forgot to remove them if the import is failed. test_buffer imports numpy. try: with

[issue31793] Allow to specialize smart quotes in documentation translations

2017-10-15 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +3980 stage: -> patch review ___ Python tracker ___

[issue31793] Allow to specialize smart quotes in documentation translations

2017-10-15 Thread Julien Palard
New submission from Julien Palard : It would be great to allow each translation to specify their smart-quotes configuration, typically Japanese prefer no smart-quotes: - https://github.com/python/docsbuild-scripts/issues/32 It's easily done by adding a

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread STINNER Victor
STINNER Victor added the comment: Why the env changed wasn't noticed before? Is it a recent change? -- ___ Python tracker ___

[issue31786] In select.poll.poll() ms can be 0 if timeout < 0

2017-10-15 Thread STINNER Victor
STINNER Victor added the comment: I suggest to implement ROUND_UP in pytime and use it in all functions accepting a timeout, not only poll. Search for ROUND_CEILING in the code to find them. But functions accepting time like clock_settime() must continue to use

[issue31792] test_buffer altered the execution environment

2017-10-15 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : test_buffer adds two environment variables: 'OPENBLAS_MAIN_FREE': '1', 'GOTOBLAS_MAIN_FREE': '1'. $ ./python -m test -v test_buffer ... Warning -- os.environ was modified by test_buffer Before: (140174267697792,

[issue31788] Typo in comments Modules/_ssl.c

2017-10-15 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +3979 stage: needs patch -> patch review ___ Python tracker

[issue31788] Typo in comments Modules/_ssl.c

2017-10-15 Thread Berker Peksag
Change by Berker Peksag : -- versions: -Python 2.7 ___ Python tracker ___ ___

[issue31788] Typo in comments Modules/_ssl.c

2017-10-15 Thread Berker Peksag
Change by Berker Peksag : -- keywords: +easy stage: -> needs patch type: -> behavior versions: -Python 3.4, Python 3.5, Python 3.8 ___ Python tracker

[issue31754] Documented type of parameter 'itemsize' to PyBuffer_FillContiguousStrides is incorrect.

2017-10-15 Thread Berker Peksag
Change by Berker Peksag : -- stage: patch review -> backport needed ___ Python tracker ___

[issue31754] Documented type of parameter 'itemsize' to PyBuffer_FillContiguousStrides is incorrect.

2017-10-15 Thread Berker Peksag
Berker Peksag added the comment: New changeset e881302b70ab36bafcf37e3917be118bbec97763 by Berker Peksag (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31754: Fix type of 'itemsize' in PyBuffer_FillContiguousStrides (GH-3993)

[issue31754] Documented type of parameter 'itemsize' to PyBuffer_FillContiguousStrides is incorrect.

2017-10-15 Thread Berker Peksag
Change by Berker Peksag : -- type: -> behavior ___ Python tracker ___ ___

[issue31754] Documented type of parameter 'itemsize' to PyBuffer_FillContiguousStrides is incorrect.

2017-10-15 Thread Berker Peksag
Berker Peksag added the comment: New changeset 1b9e76ed3a055a53ca67397e928e1b408461900b by Berker Peksag (vyas45) in branch 'master': bpo-31754: Fix type of 'itemsize' in PyBuffer_FillContiguousStrides (GH-3993)

[issue31754] Documented type of parameter 'itemsize' to PyBuffer_FillContiguousStrides is incorrect.

2017-10-15 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +3978 ___ Python tracker ___

[issue31791] Ensure that all PyTypeObject fields are set to non-NULL defaults

2017-10-15 Thread pdox
pdox added the comment: serhiy.storchaka: 1) Where tp_as_number would normally be NULL, instead it would point to a fixed PyNumberMethods structure containing the default functions. This would make the memory increase negligible, as all non-number types would use the same

[issue31791] Ensure that all PyTypeObject fields are set to non-NULL defaults

2017-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1. This will increase the size of type object. Most types are not numbers, not collections and don't support the buffer protocol, thus save memory for tp_as_number, tp_as_sequence, tp_as_mapping and tp_as_buffer. This also can

[issue31791] Ensure that all PyTypeObject fields are set to non-NULL defaults

2017-10-15 Thread pdox
pdox added the comment: I believe it would also make sense to inline the 'as' structures (tp_as_async, tp_as_number, tp_as_sequence, tp_as_mapping, and tp_as_buffer), instead of having them be pointers. This would save one pointer dereference with each use. But this would

[issue31791] Ensure that all PyTypeObject fields are set to non-NULL defaults

2017-10-15 Thread pdox
New submission from pdox : Ensure that every function pointer in every PyTypeObject is set to a non-NULL default, to spare the cost of checking for NULL with every use. As a basic example, consider PyNumber_Negative: PyObject * PyNumber_Negative(PyObject *o) {

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-15 Thread Nick Coghlan
Nick Coghlan added the comment: Just confirming that the locals() vs frame.f_locals distinction also exists in the C API: the former is PyEval_GetLocals() (which implicitly ensures the snapshot is up to date), while the equivalent of the latter is direct access to

[issue31790] double free or corruption (while using smem)

2017-10-15 Thread Zoltan Krajcsovics
New submission from Zoltan Krajcsovics : Command executed when the crash happened: /usr/bin/python /usr/bin/smem -t -c command pss -P /usr/lib/chromium/chromium The attached error.log contains the backtrace and memory map printed. This is a sporadic error, the command is