[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 ___ _

[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 ___ __

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

2014-11-17 Thread Ned Deily
Changes by Ned Deily : -- components: -Macintosh nosy: +ezio.melotti, michael.foord, rbcollins -ned.deily, ronaldoussoren ___ Python tracker ___

[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 r

[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 intera

[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:

[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 : -- stage: -> needs patch versions: +Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[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 patc

[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

[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 ___ ___ Python-bugs-list mailing list Unsubscri

[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 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

[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 strerr

[issue18688] Document undocumented Unicode object API

2014-11-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: +Python 3.5 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[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

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

2014-11-17 Thread Larry Hastings
Larry Hastings added the comment: LGTM -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[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 _

[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 `

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

2014-11-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file37216/issue11145_3_simpler.patch ___ Python tracker ___ ___ Python-bugs-l

[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 >

[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 lo

[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). -- _

[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 w

[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 ___

[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.?? -- ___ Python

[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 ___

[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: +r.d

[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 component

[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 compatibil

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

2014-11-17 Thread Berker Peksag
Changes by Berker Peksag : -- 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 ___ P

[issue22067] time_test fails after strptime()

2014-11-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +belopolsky, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[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 ___

[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

[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 ___ ___

[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? --

[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 :///?# 160 Return a 5-tuple: (scheme, netloc, path,

[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 ___

[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 be

[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 d

[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. --

[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

[issue19883] Integer overflow in zipimport.c

2014-11-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue19687] Fixes for elementtree integer overflow

2014-11-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: -serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[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 ___

[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 ___ ___ Python-bugs-list mailing list