[issue25395] SIGSEGV using json.tool: highly nested OrderedDict

2015-10-18 Thread Martin Panter
Martin Panter added the comment: Here is a patch that seems to fix the problem for me. Can someone who knows more about tp_dealloc() methods and the Py_TRASHCAN_SAFE stuff have a look? All I know is that the body of the trashcan stuff can be deferred until an outer nested body is finished, so

[issue7352] pythonx.y-config --ldflags out of /usr and missing -L

2015-10-18 Thread koobs
koobs added the comment: The attached patch courtesy of Jan Beich @ FreeBSD minimally mimics (in the python version), the --ldflags output of the shell version of python-config(.sh). The ideal scenario of course would be to use the shell script across all versions, as per revision c0370730b36

[issue7352] pythonx.y-config --ldflags out of /usr and missing -L

2015-10-18 Thread koobs
koobs added the comment: To clarify, the bug remains in all branches including default, but only 3.4+ use the .sh script, leaving 3.3, 3.2, 2.7 using the python implementation. -- versions: +Python 3.6 ___ Python tracker

[issue25395] SIGSEGV using json.tool: highly nested OrderedDict

2015-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think there is no need to run the test in a subprocess. You can trigger the crash by "del obj". from collections import OrderedDict obj = None for _ in range(1000): obj = OrderedDict([(None, obj)]) del obj support.gc_collect() Unfortunately this test

[issue25410] Clean up and fix OrderedDict

2015-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that makes both implementations to use type(self) instead of self.__class__ in __repr__(), __reduce__() and copy(). There is a difference between current implementations. Python implementation uses self.__class__ in copy(), C implementation u

[issue25395] SIGSEGV using json.tool: highly nested OrderedDict

2015-10-18 Thread Martin Panter
Martin Panter added the comment: Here is a new patch which uses Py_CLEAR() rather than Py_XDECREF(), which seems to cure the negative reference count problem. This change was only a guess based on looking at namespaceobject.c and the Py_CLEAR() documentation, so it would be good for someone el

[issue25395] SIGSEGV using json.tool: highly nested OrderedDict

2015-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Using Py_CLEAR() fixes symptoms in this test, but the real issue is that deallocating code is executed twice for some objects (for every 25th OrderedDict). PyDict_Type.tp_dealloc() can deposit an object in the _PyTrash_delete_later list if trash_delete_nest

[issue25433] whitespace in strip()/lstrip()/rstrip()

2015-10-18 Thread Dimitri Papadopoulos Orfanos
New submission from Dimitri Papadopoulos Orfanos: The documentation of strip() / lstrip() / rstrip() should define "whitespace" more precisely. The Python 3 documentation refers to "ASCII whitespace" for bytes.strip() / bytes.lstrip() / bytes.rstrip() and "whitespace" for str.strip() / str.lst

[issue25432] isinstance documentation doesn't explain what happens when type is tuple

2015-10-18 Thread Georg Brandl
Georg Brandl added the comment: But without using the word "disjunctive". -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bug

[issue15999] Using new 'bool' format character

2015-10-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file40810/accept_bool.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue15999] Using new 'bool' format character

2015-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, it is orthogonal to Argument Clinic. Usually converting to Argument Clinic didn't change semantic. However these changes conflicted with proposed patch. Rebased patch is splitted on two patches. bool_cleanup.patch. It almost doesn't change the behavior.

[issue25434] Fix typo in whatsnew/3.5

2015-10-18 Thread Louis Sautier
New submission from Louis Sautier: Hi, I noticed a typo in the doc for What’s New In Python 3.5, here's a patch. -- assignee: docs@python components: Documentation files: fixtypo.patch keywords: patch messages: 253155 nosy: docs@python, omelette priority: normal severity: normal status:

[issue25434] Fix typo in whatsnew/3.5

2015-10-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 04ce28b11467 by Berker Peksag in branch '3.5': Issue #25434: Fix typo in whatsnew/3.5rst https://hg.python.org/cpython/rev/04ce28b11467 New changeset 93a1b79d0b19 by Berker Peksag in branch 'default': Issue #25434: Fix typo in whatsnew/3.5rst https:

[issue25434] Fix typo in whatsnew/3.5

2015-10-18 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Louis. -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6 ___ Python tracker __

[issue25434] Fix typo in whatsnew/3.5

2015-10-18 Thread SilentGhost
SilentGhost added the comment: Shouldn't the line above read "now accepts" rather than "how accepts"? -- nosy: +SilentGhost ___ Python tracker ___ ___

[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2015-10-18 Thread David Becher
New submission from David Becher: Since Python 3 removed unbound methods, I found some references using the old terminology in this HowTo about descriptors (https://docs.python.org/3/howto/descriptor.html). Also, since unbound methods have been removed, the function call types.MethodType now o

[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2015-10-18 Thread SilentGhost
Changes by SilentGhost : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue25436] argparse.ArgumentError missing error message in __repr__

2015-10-18 Thread Daniel Fortunov
New submission from Daniel Fortunov: ArgumentError's __init__() fails to call super(), meaning that the base exception doesn’t get a message, and thus repr() always returns “argparse.ArgumentError()” with no message. Not very helpful if that repr gets logged, or included in another error message

[issue25437] Issue with ftplib.FTP_TLS and server forcing SSL connection reuse

2015-10-18 Thread Daniel Waites
New submission from Daniel Waites: There is an issue with the python FTPS module in the standard library which appears to be related to SSL session reuse. I noticed when I updated to a recent version of Pure-FTPd (1.0.42), python's FTPS library client stopped working and generated an error in

[issue25437] Issue with ftplib.FTP_TLS and server forcing SSL connection reuse

2015-10-18 Thread Daniel Waites
Daniel Waites added the comment: Incidentally, there appears to be an old bug report with a similar error message, although the error is encountered in a different context. http://bugs.python.org/issue10808 . Evidently, errors encountered in libssl aren't necessarily being propagated up to pyt

[issue25436] argparse.ArgumentError missing error message in __repr__

2015-10-18 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: -> patch review type: -> behavior versions: +Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___ ___

[issue25420] "import random" blocks on entropy collection on Linux with low entropy

2015-10-18 Thread STINNER Victor
STINNER Victor added the comment: "The RNG is seeded from os.urandom, which as of python 3.5 uses the potentially blocking getrandom() call." Hum ok, so your issue is specific to Linux. "This causes problems e.g. on our build VMs that don't have true entropy, so getrandom() blocks forever" H

[issue25434] Fix typo in whatsnew/3.5

2015-10-18 Thread Berker Peksag
Berker Peksag added the comment: Good catch, fixed in 530846c3ebb4 and f020a27b5391. Thanks SilentGhost. -- ___ Python tracker ___ ___

[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2015-10-18 Thread Martin Panter
Martin Panter added the comment: Thanks for the patch. I left a few comments on the code review. I think the class is meant to represent a real function object, not a wrapper. And it would be good to update the following paragraphs about unbound methods. Also, it looks like the rest of that pa

[issue13195] subprocess: args with shell=True is not documented on Windows

2015-10-18 Thread Martin Panter
Martin Panter added the comment: I think the documentation changes made for Issue 16115 should address your first question (shell=False). For shell=True, see the discussion at Issue 20344. Perhaps you can review my patch. -- dependencies: +test the executable arg to Popen() and improve

[issue23702] docs.python.org/3/howto/descriptor.html still refers to "unbound methods"

2015-10-18 Thread Martin Panter
Martin Panter added the comment: Current patch for Issue 25435 addresses the code example. Changes to the text are also needed though. -- dependencies: +Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation) nosy: +martin.panter

[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2015-10-18 Thread Martin Panter
Martin Panter added the comment: Also further up the page, “unbound methods . . . are . . . based on the descriptor protocol” is probably not really correct or useful. Issue 23702 is already open about mentioning unbound methods. -- ___ Python track

[issue16785] Document the fact that constructing OSError with erron returns subclass if possible

2015-10-18 Thread Martin Panter
Martin Panter added the comment: My proposed patch at Issue 23391 addresses this -- dependencies: +Documentation of EnvironmentError (OSError) arguments disappeared nosy: +martin.panter ___ Python tracker _

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps you missed my comments to previous patch on Rietveld. Besides this the patch LGTM. May be we should change weird behavior for 6+ arguments. But this is different issue. -- ___ Python tracker

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- Removed message: http://bugs.python.org/msg253170 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch LGTM. We should handle the problem with extra arguments in separate issue. -- ___ Python tracker ___ __

[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-10-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: docs@python -> martin.panter stage: patch review -> commit review ___ Python tracker ___ __

[issue25438] document what codec PyMemberDef T_STRING decodes the char * as

2015-10-18 Thread Gregory P. Smith
New submission from Gregory P. Smith: https://docs.python.org/3/c-api/structures.html#c.PyMemberDef T_STRING members are turned into str objects in Python. The documentation needs updating to mention which codec the char * bytes are treated as. Solving this issue involves code inspection and