[issue20434] Fix error handler of _PyString_Resize() on allocation failure

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is there anything left for this issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20434 ___ ___

[issue11145] '%o' % user-defined instance

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could anyone please make a review of the patch? -- keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11145 ___

[issue19687] Fixes for elementtree integer overflow

2014-11-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: -serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19687 ___ ___

[issue19883] Integer overflow in zipimport.c

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19883 ___ ___ Python-bugs-list mailing list

[issue22889] set a timeout for DNS lookups

2014-11-17 Thread R. David Murray
R. David Murray added the comment: As far as I know, the libc dns timeout is controlled by /etc/resolv.conf (or whatever the Windows equivalent is), and libc doesn't provide any way for an application to override this. There is no mention of timeout on the resolver(3) man page. Do you know

[issue18697] Unify arguments names in Unicode object C API documentation

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The same issue exists for other types. E.g. PyLong_* functions have Python long argument named as p, obj and pylong, PyFloat_* -- p and pyfloat, PyList_* -- p and list, PyDict_* -- p, a and mapping, PyBytes_* -- o, obj, string and bytes. --

[issue11145] '%o' % user-defined instance

2014-11-17 Thread Armin Rigo
Armin Rigo added the comment: It's seriously obscure to call a user-defined __oct__ method and then mangle the resulting string in ways that only make sense if the __oct__ method returned something reasonable. The patch is probably a little more complicated than it could be. For example, I

[issue22870] urlopen timeout failed with SSL socket

2014-11-17 Thread Dave Tian
Dave Tian added the comment: Alright. The issued URL of my case is here: www.5giay.vn Nor am I a ssl dev...Here is what happens after further debugging: PySSL_SSLread() returns 1/2 bytes without any error/timeout per call. readline() in socket.py keeps looping. Occasionally, it may break out

[issue22079] Ensure in PyType_Ready() that base class of static type is static

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. -- keywords: +needs review, patch stage: needs patch - patch review Added file: http://bugs.python.org/file37211/issue22079.patch ___ Python tracker rep...@bugs.python.org

[issue22891] [patch]: code removal from urllib.parse.urlsplit()

2014-11-17 Thread Alexander Todorov
New submission from Alexander Todorov: In the urllib.parse (or urlparse on Python 2.X) module there is this function: 157 def urlsplit(url, scheme='', allow_fragments=True): 158 Parse a URL into 5 components: 159 scheme://netloc/path?query#fragment 160 Return a

[issue11145] '%o' % user-defined instance

2014-11-17 Thread Francis MB
Francis MB added the comment: I'm not sure if it's relevant but in the patch you changed previous 'assert(check)' with 'if (not check) goto error'. But the new patch code adds 'assert(len == 0 || Py_REFCNT(r1) == 1);' Just curious, is there a reason why couldn't be in the same way? --

[issue20434] Fix error handler of _PyString_Resize() on allocation failure

2014-11-17 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Nope, closing as fixed :) -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20434 ___

[issue11145] '%o' % user-defined instance

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your review Arigo. Here is updated patch. Note that the patch also fixes a reference leak if llen INT_MAX. -- Added file: http://bugs.python.org/file37213/issue11145_2.patch ___ Python tracker

[issue11145] '%o' % user-defined instance

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Just curious, is there a reason why couldn't be in the same way? Old asserts depend on user code, new asserts check internal consistency. -- ___ Python tracker rep...@bugs.python.org

[issue22067] time_test fails after strptime()

2014-11-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +belopolsky, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22067 ___ ___

[issue22891] code removal from urllib.parse.urlsplit()

2014-11-17 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +orsenthil stage: - patch review title: [patch]: code removal from urllib.parse.urlsplit() - code removal from urllib.parse.urlsplit() versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.6

[issue22891] code removal from urllib.parse.urlsplit()

2014-11-17 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for filing this. Does test cases pass after removal of those lines? (I will be surprised) and if the tests fail, then after analyzing it, this could only be considered a new change (thus change to made in latest python) in order not to break

[issue22892] Typo in Library's 'threading' module section

2014-11-17 Thread Martin Gignac
New submission from Martin Gignac: There is an extraenous asterisk in the constructor description for class 'threading.Thread' in section 17.1.2. Thread Objects of the 'threading' module in the Python Standard Library documenation. (patch attached) -- assignee: docs@python

[issue22892] Typo in Library's 'threading' module section

2014-11-17 Thread R. David Murray
R. David Murray added the comment: Thanks for taking the time to make a report, but that is not a typo. That asterisk indicates that daemon is a keyword only argument, and is standard python3 syntax. You can see it if you follow the source link to the threading module. -- nosy:

[issue22892] Typo in Library's 'threading' module section

2014-11-17 Thread Martin Gignac
Martin Gignac added the comment: Sorry for that. I've read up PEP 3102 and now understand what you meant. Sorry for the noise. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22892 ___

[issue11145] '%o' % user-defined instance

2014-11-17 Thread Armin Rigo
Armin Rigo added the comment: +if (Py_REFCNT(result) == 1) +buf[len] = '\0'; ...and if the refcount is not equal to 1, then too bad, we won't null-terminate the string and hope that nobody crashes because of this.?? -- ___

[issue11145] '%o' % user-defined instance

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If the refcount is not equal to 1, we will copy the content to new null- terminated string. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11145 ___

[issue11145] '%o' % user-defined instance

2014-11-17 Thread Armin Rigo
Armin Rigo added the comment: Ah, sorry. Ok. Now a different issue: the user-defined function can return an interned string. If it has a refcount of 1, _PyString_FormatLong() will mutate it. Then when we DECREF it, string_dealloc() will not find it any more in the interned dict and crash

[issue22889] set a timeout for DNS lookups

2014-11-17 Thread Kevin Burke
Kevin Burke added the comment: Hi, You are correct, there's no way to set it in the C API. Go works around this by resolving addresses in a goroutine. I was wondering if something similar would be possible in Python (for people who set a timeout in the interface). --

[issue22889] set a timeout for DNS lookups

2014-11-17 Thread R. David Murray
R. David Murray added the comment: Oh, my apologies. I totally missed your link to the go example when I first read your message. Yes, Python supports the equivalent. In the asyncio module, which is our closest equivalent to goroutines, the functionality exists implicitly: the base event

[issue11145] '%o' % user-defined instance

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! Here is a patch which fixes this issue too. (1) stop calling the user-defined functions and behave similarly to most other built-in types; This is done in 3.x. (2) stop trying to mutate that poor string in-place and always just create a

[issue11145] '%o' % user-defined instance

2014-11-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file37216/issue11145_3_simpler.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11145 ___

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-17 Thread Akira Li
Akira Li added the comment: I can confirm that without the patch the filename attribute is None despite being mentioned in strerror. Travis, you should use `orig_executable` instead of `args[0]` to cover: subprocess.call(exit 0, shell=True, executable='/nonexistent bash') case. And use

[issue20662] Pydoc doesn't escape parameter defaults in html

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which fixes this issue. Html formatting was broken by issue19674. -- keywords: +patch nosy: +larry stage: - patch review versions: +Python 3.5 Added file: http://bugs.python.org/file37217/pydoc_escape_argspec.patch

[issue20662] Pydoc doesn't escape parameter defaults in html

2014-11-17 Thread Larry Hastings
Larry Hastings added the comment: LGTM -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20662 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20450] hg touch fails on System Z Linux buildbot

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems it was misconfiguration issue and it is fixed now. -- resolution: - out of date stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20450

[issue18688] Document undocumented Unicode object API

2014-11-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18688 ___ ___

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-11-17 Thread Akira Li
Akira Li added the comment: If the_oserror.filename is not None then str(the_oserror) appends the filename twice: [Errno 2] No such file or directory: 'nonexistent': 'nonexistent' You could remove `err_msg += ':' ...` statements to avoid the repeatition. It may break the code that uses

[issue1038591] Python 2.3+ socket._fileobject handles EAGAIN with data loss

2014-11-17 Thread Craig
Craig added the comment: Surely if there is data loss this *has* to be fixed in 2.x? I'm seeing this a *lot* using Twisted which, I believe isn't fully 3.x ported yet, so we have to support 2.x for now. -- nosy: +craigemery ___ Python tracker

[issue1038591] Python 2.3+ socket._fileobject handles EAGAIN with data loss

2014-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: The simple fact of the matter is that socket.makefile() has never worked for non-blocking sockets on 2.x. I doubt Twisted would be so broken as to use it in that context, but if that's the case, you should report a bug to them. If it's your own code, just use

[issue1038591] Python 2.3+ socket._fileobject handles EAGAIN with data loss

2014-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: (closed as won't fix, sorry) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1038591 ___ ___ Python-bugs-list

[issue20662] Pydoc doesn't escape parameter defaults in html

2014-11-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf2e424e0413 by Serhiy Storchaka in branch '3.4': Issue #20662: Argspec now is escaped in html output of pydoc. https://hg.python.org/cpython/rev/cf2e424e0413 New changeset 1855b5c3da61 by Serhiy Storchaka in branch 'default': Issue #20662: Argspec

[issue22888] ensurepip and distutils' build_scripts fails on Windows when path to Python contains accented characters

2014-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: On Windows, shouldn't copy_scripts use UTF-8 instead of os.fsencode (MBCS)? The Python launcher executes the shebang line on Windows, and it defaults to UTF-8 if a script doesn't have a BOM. Good catch! It seems you're right. Do you want to provide a patch

[issue22888] ensurepip and distutils' build_scripts fails on Windows when path to Python contains accented characters

2014-11-17 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: - needs patch versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22888 ___

[issue20662] Pydoc doesn't escape parameter defaults in html

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks for the review Larry. There is related minor issue. The formatvalue method is no longer used in HTMLDoc. This can break user code which inherits HTMLDoc and overrides formatvalue. -- assignee: - serhiy.storchaka resolution: - fixed stage:

[issue22893] Idle: __future__ does not work in startup code.

2014-11-17 Thread Terry J. Reedy
New submission from Terry J. Reedy: https://stackoverflow.com/questions/26977236/how-can-i-use-future-division-in-the-idle-startup-file report what seems like possibly fixable perhaps buggy behavior with respect to __future__ imports. More investigation is needed. Any change here might

[issue22894] unittest.TestCase.subTest causes all subsequent tests to be skipped in failfast mode

2014-11-17 Thread Trey Cucco
New submission from Trey Cucco: When running a test suite with the -f flag (--failfast), unittest seems to stop running tests once it exits a with self.subTest block. In the attached script, run it without -f and test_b will run and fail. Run it with the -f flag and only the test_a test will

[issue22894] unittest.TestCase.subTest causes all subsequent tests to be skipped in failfast mode

2014-11-17 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- components: -Macintosh nosy: +ezio.melotti, michael.foord, rbcollins -ned.deily, ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22894 ___

[issue19895] Cryptic error when subclassing multiprocessing classes

2014-11-17 Thread Dan O'Reilly
Dan O'Reilly added the comment: This is basically the same thing that issue21367 is reporting. -- nosy: +dan.oreilly ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19895 ___

[issue22140] python-config --includes returns a wrong path (double prefix)

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you want to provide a patch? -- components: +Build -Demos and Tools nosy: +serhiy.storchaka stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22140