[issue24488] ConfigParser.getboolean fails on boolean options
New submission from Andreas Hilboll: Not sure if this is by design (or if I'm doing something utterly stupid), but I often create a ConfigParser object for my application and then pass this around (or make it global). So when I do something like cfg.set(input_filter, include_filtered, True) and then cfg.getboolean(input_filter, include_filtered) I receive an error (AttributeError: 'bool' object has no attribute 'lower'). Wouldn't it be more sensible if getboolean would return the raw value in case the raw value is already a boolean? If not, which would be the best way forward for me? -- components: Library (Lib) messages: 245638 nosy: andreas-h priority: normal severity: normal status: open title: ConfigParser.getboolean fails on boolean options versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24488 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24400] Awaitable ABC incompatible with functools.singledispatch
Roundup Robot added the comment: New changeset 7a0a1a4ac639 by Yury Selivanov in branch '3.5': Issue #24400: Introduce a distinct type for 'async def' coroutines. https://hg.python.org/cpython/rev/7a0a1a4ac639 New changeset 44253ce374fc by Yury Selivanov in branch 'default': Issue #24400: Merge 3.5 https://hg.python.org/cpython/rev/44253ce374fc -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24488] ConfigParser.getboolean fails on boolean options
R. David Murray added the comment: In python3 you will get an error: TypeError: option values must be strings. So, this is an infelicity in the configparser API. Or, rather, I presume it is a design decision (ie: python shouldn't guess what string format you want the value to have in the file). I'll leave it up to Lukaz to decide if this should be closed, or if there is an acceptable feature request here. But your solution is to call str on your boolean values when you store them. -- assignee: - lukasz.langa nosy: +lukasz.langa, r.david.murray versions: +Python 3.6 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24488 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24462] bytearray.find Buffer Over-read
DmitryJ added the comment: Attached please find a patch against the 2.7 branch. CPython built with the patch passes the tests from the test suite. Unfortunately, as there is not much control over memory allocation, there is no 100% reliable test case that would allow for reproducing the reported issue. Some notes on the patch. I have studied possible ways of fixing the issue narrowing them to two options; the approaches considered were: a. Patch bytearray methods so they use stringlib's functions with respect to the corner case of out-of-bounds access on m = n. b. Patch fastsearch() avoiding the out-of-bounds access on m = n completely. Of these two, approach a is less invasive as changes, in theory, would be contained in bytearray() code only and should not affect any other code. Approach b fixes all possible cases, but affects other code not related to bytearray. Upon closer studying of both bytearray and stringlib code, I discovered that it might be impossible to patch bytearray code only as stringlib contains a few methods that make use of the affected fastsearch() function, see e.g. stringlib_partition() as used in bytearray_partition(). If the approach of fixing bytearray specific code only would be chosen, I have to incorporate at least some of code following the fastsearch() call in stringlib_partition(). Similar considerations apply to other bytearray methods that make use of stringlib; the amount of code duplication varies. The end result is, I chose to patch fastsearch() instead. Performance wise, the change incurs a small penalty due to one extra branch when m != n and brings considerable gain in (potentially rare) case when m = n. I would appreciate if someone could test and review the patch. NB. I stand corrected for the comment in msg245457 -- there is a note I missed in the C code. My sincere apologies to the author. -- keywords: +patch Added file: http://bugs.python.org/file39772/issue24462-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24462 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24419] In argparse action append_const doesn't work for positional arguments
paul j3 added the comment: To wrap this up, the correct way to specify that 2 or more positionals share a 'dest' is to supply that dest as the first parameter. If the help should have something else, use the `metavar`. import argparse parser = argparse.ArgumentParser() parser.add_argument('x', action='append_const', const=42, metavar='foo') parser.add_argument('x', action='append_const', const=43, metavar='bar') parser.print_help() args=parser.parse_args([]) print(args) produces usage: issue24419.py [-h] positional arguments: foo bar optional arguments: -h, --help show this help message and exit Namespace(x=[42, 43]) (I think this issue can be closed). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24419 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24400] Awaitable ABC incompatible with functools.singledispatch
Yury Selivanov added the comment: Nick, Martin, Stefan, thanks to all of you for the code review! -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24400 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3905] subprocess failing in GUI applications on Windows
Boris added the comment: Probably the same issue: everything works when called from command line, but when called via a desktop shortcut I get ... _winapi.DUPLICATE_SAME_ACCESS) OSError: [WinError 6] The handle is invalid Changing pythonw to python solved the problem. ...this could be expected behavior. If anyone is interested I can attach my test files. -- nosy: +borisompol versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3905 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24487] Change asyncio.async() → ensure_future()
Yury Selivanov added the comment: Martin, I believe this was done as part of issue24180, see this commit https://hg.python.org/cpython/rev/9d9e445d25dc -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24487 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24485] Function source inspection fails on closures
Yury Selivanov added the comment: Looks like this is a regression in 3.5. -- priority: normal - release blocker stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24487] Change asyncio.async() → ensure_future()
Changes by Zachary Ware zachary.w...@gmail.com: -- resolution: not a bug - out of date stage: patch review - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24487 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24485] Function source inspection fails on closures
Changes by Yury Selivanov yseliva...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24439] Feedback for awaitable coroutine documentation
Yury Selivanov added the comment: Hi Martin, I've left you some feedback in the code review. * “async def” routines are allowed in addition to generators in asyncio (e.g. in Task constructor) Right. I think we need to add some code samples too. * Other awaitables are also accepted as asyncio coroutines Depending on where, I guess. asyncio.Task should only accept when asyncio.iscoroutine is true -- abc.Coroutine, types.GeneratorType. * List of “yield from” actions could be augmented with “await”, “async for”, etc Not sure what you mean here. * The coroutines provided by asyncio are both iterable and awaitable, so they may be used with both “yield from” and “await” Right. We also need to make sure that it's documented that in order to have yield from native_coro(), you have to decorate the gen function with 'asyncio.coroutine'. And we should mention that if you're targeting Python 3.5+ you should use the new syntax. * Change references of asyncio.async() to ensure_future() This is already done ;) Thanks! -- nosy: +asvetlov, gvanrossum, haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24439 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()
Larry Hastings added the comment: Patch doesn't build for me against current trunk: gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes-Werror=declaration-after-statement -I. -IInclude -I./Include-DPy_BUILD_CORE -c ./Modules/_functoolsmodule.c -o Modules/_functoolsmodule.o ./Modules/_functoolsmodule.c: In function ‘infinite_lru_cache_wrapper’: ./Modules/_functoolsmodule.c:769:14: error: too few arguments to function ‘_PyDict_GetItem_KnownHash’ result = _PyDict_GetItem_KnownHash(self-cache, key); ^ In file included from Include/Python.h:87:0, from ./Modules/_functoolsmodule.c:2: Include/dictobject.h:59:24: note: declared here PyAPI_FUNC(PyObject *) _PyDict_GetItem_KnownHash(PyObject *mp, PyObject *key, ^ ./Modules/_functoolsmodule.c:785:9: error: too few arguments to function ‘_PyDict_SetItem_KnownHash’ if (_PyDict_SetItem_KnownHash(self-cache, key, result) 0) { ^ In file included from Include/Python.h:87:0, from ./Modules/_functoolsmodule.c:2: Include/dictobject.h:71:17: note: declared here PyAPI_FUNC(int) _PyDict_SetItem_KnownHash(PyObject *mp, PyObject *key, ^ Makefile:1695: recipe for target 'Modules/_functoolsmodule.o' failed make: *** [Modules/_functoolsmodule.o] Error 1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24483 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()
Serhiy Storchaka added the comment: My bad. I submitted the last patch without checking (rebuilding Python takes too much time on my slow netbook). Here is fixed and tested patch. -- Added file: http://bugs.python.org/file39773/clru_cache_known_hash_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24483 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24478] asyncio: segfault in test_env_var_debug() on non-debug Windows buildbot
Zachary Ware added the comment: Actually, it looks like it's due to PEP 492: C:\Users\Zachary\code\hg.python.org\3.5hg bisect -b The first bad revision is: changeset: 96411:d1959cafc68c branch: 3.5 parent: 96407:e59966bb6de5 parent: 96410:b7b73029c825 user:Yury Selivanov yseliva...@sprymix.com date:Sat May 30 21:02:34 2015 -0400 summary: Issue 24004: Support Awaitables (pep 492) in @asyncio.coroutine decorator Not all ancestors of this changeset have been checked. Use bisect --extend to continue the bisection from the common ancestor, 943fa0e8b6a4. -- stage: - needs patch type: - behavior versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24478 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15014] smtplib: add support for arbitrary auth methods
Barry A. Warsaw added the comment: I believe this change broke RFC 4954's AUTH command when the optional initial-response is expected. $4 The AUTH Command says: AUTH mechanism [initial-response] ... initial-response: An optional initial client response. If present, this response MUST be encoded as described in Section 4 of [BASE64] or contain a single character = It's possible that some SMTP servers only look for a string like AUTH PLAIN base64-gobbledygook and won't issue a challenge if it's missing. Such an example is found in the lazr.smtptest and used by the testing SMTPd in GNU Mailman. It's possible that the servers are not standards compliant (I haven't completely groked RFC 4422), but still, since this is a backward incompatible change and breaks existing code, there should be some way of making smtplib.login() provide the initial-response, and it probably ought to be the default for backward compatibility. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15014 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15014] smtplib: add support for arbitrary auth methods
Barry A. Warsaw added the comment: Here's a rough thought for a fix. Some auth_*() methods require a challenge, but some don't, e.g. auth_plain(). Let's allow authobject() to be called with challenge=None. If they allow an initial-response, then they can just return the response bytes. If they return None, then they don't allow an initial-response and so must wait for the challenge (i.e. 334 response code). I think that would at least restore backward compatibility for AUTH PLAIN. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15014 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15014] smtplib: add support for arbitrary auth methods
Barry A. Warsaw added the comment: Also, smtpd is not compatible with auth challenges because found_terminator() doesn't know that the response its getting isn't a command but instead a challenge response. So really we need another bug to track fixes to smtpd.py to handle challenge responses. It makes no sense for smtpd and smtplib not to be compatible. (Who wants to reimplement smtpd in asyncio? :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15014 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24478] asyncio: segfault in test_env_var_debug() on non-debug Windows buildbot
Yury Selivanov added the comment: Hi Zachary, This is extremely strange. The test doesn't even start the loop, it only creates it, and prints out what 'get_debug' says. It can't be 'sys.set_coroutine_wrapper' either, as it's only called when a loop is running, or when it's about to start/stop running. The change in 96411:d1959cafc68c can only affect running coroutines, but I don't think the tests invokes any. asyncio itself does not even have any 'async def' functions (only in test_pep492.py)... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24478 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24419] In argparse action append_const doesn't work for positional arguments
py.user added the comment: Tested on argdest.py: #!/usr/bin/env python3 import argparse parser = argparse.ArgumentParser() parser.add_argument('x', action='append') parser.add_argument('x', action='append_const', const=42, metavar='foo') parser.add_argument('x', action='append_const', const=43, metavar='bar') parser.add_argument('-x', action='append_const', const=44) args = parser.parse_args() print(args) Run: [guest@localhost debug]$ ./argdest.py -h usage: argdest.py [-h] [-x] x positional arguments: x foo bar optional arguments: -h, --help show this help message and exit -x [guest@localhost debug]$ ./argdest.py -x 1 -x Namespace(x=[44, '1', 42, 43, 44]) [guest@localhost debug]$ LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24419 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21935] Implement AUTH command in smtpd.
Barry A. Warsaw added the comment: Martin says: I cannot see any particular circumstances where unencrypted passwords for smtpd would be acceptable, given that there are perfectly established technologies. So I remain -1 on this patch. Here's a use case: a testing SMTP server, such as lazr.smtptest which is built on top of smtpd. In some testing scenarios, you really don't care about STARTTLS complications, and everything's connecting over localhost anyway. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21935 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12210] test_smtplib: intermittent failures on FreeBSD
koobs added the comment: Observed the following test_smtplib failure on koobs-freebsd10, noting that the timeout parameter is still 3 test test_smtplib failed -- Traceback (most recent call last): File /usr/home/buildbot/python/2.7.koobs-freebsd10/build/Lib/test/test_smtplib.py, line 222, in testHELP smtp = smtplib.SMTP(HOST, self.port, local_hostname='localhost', timeout=3) File /usr/home/buildbot/python/2.7.koobs-freebsd10/build/Lib/smtplib.py, line 256, in __init__ (code, msg) = self.connect(host, port) File /usr/home/buildbot/python/2.7.koobs-freebsd10/build/Lib/smtplib.py, line 317, in connect (code, msg) = self.getreply() File /usr/home/buildbot/python/2.7.koobs-freebsd10/build/Lib/smtplib.py, line 365, in getreply + str(e)) SMTPServerDisconnected: Connection unexpectedly closed: timed out[283/401] test_abstract_numbers Complete log attached. -- nosy: +koobs resolution: wont fix - stage: resolved - needs patch status: closed - open Added file: http://bugs.python.org/file39777/koobs-freebsd10.python.27.build978.log ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12210 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24325] Speedup types.coroutine()
Changes by Yury Selivanov yseliva...@gmail.com: -- nosy: +asvetlov, haypo, vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24325 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24412] setUpClass equivalent for addCleanup
Changes by Akshit Khurana axitkhur...@gmail.com: -- nosy: +axitkhurana ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24412 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24379] operator.subscript
Joe Jevnik added the comment: Based on some discussion on python-ideas, this is being renamed to operator.subscript. Here is the patch that makes the correct the changes to move this object into the operator module. -- components: +Extension Modules -Interpreter Core title: slice.literal notation - operator.subscript Added file: http://bugs.python.org/file39775/operator_subscript.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24379 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24450] Add gi_yieldfrom calculated property to generator object
Yury Selivanov added the comment: Please find attached a new patch that exposes 'cr_await' attribute on coroutine objects. I don't think we can merge 'gi_yieldfrom' in 3.5, but 'cr_await' should probably be fine. -- Added file: http://bugs.python.org/file39776/cr_await.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24450 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24450] Add cr_await calculated property to coroutine object
Changes by Yury Selivanov yseliva...@gmail.com: -- title: Add gi_yieldfrom calculated property to generator object - Add cr_await calculated property to coroutine object ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24450 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24420] Documentation regressions from adding subprocess.run()
Changes by Martin Panter vadmium...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24420 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23750] Clarify difference between os.system/subprocess.call in section Replacing os.system()
Martin Panter added the comment: Here is a patch: * Use different return value variable names and point out that they are encoded differently * Add another bullet point about signal handling * Fix os.system() documentation of the return value. My understanding is it is the C standard that does not define the return value, and Posix essentially means Unix. -- keywords: +patch stage: - patch review versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file39767/system-subprocess.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23750 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24481] hotshot pack_string Heap Buffer Overflow
Changes by DmitryJ ga...@tut.by: -- nosy: +dev_zzo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24481 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24439] Feedback for awaitable coroutine documentation
Martin Panter added the comment: When I update my patch I can try updating the asyncio section. However I have only had limited experience with asyncio, so feel free to suggest things to add. Here is a list of things I think may need changing: * “async def” routines are allowed in addition to generators in asyncio (e.g. in Task constructor) * Other awaitables are also accepted as asyncio coroutines * List of “yield from” actions could be augmented with “await”, “async for”, etc * The coroutines provided by asyncio are both iterable and awaitable, so they may be used with both “yield from” and “await” * Change references of asyncio.async() to ensure_future() -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24439 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()
Larry Hastings added the comment: I can accept this change, but I don't like that code. Is it really considered acceptable to have that much copy-and-paste code in the dict implementation for KnownHash calls? Could the common code be split off into a Py_LOCAL_INLINE function? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24483 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24462] bytearray.find Buffer Over-read
DmitryJ added the comment: I am preparing a patch for this issue, then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24462 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24485] Function source inspection fails on closures
New submission from Malthe Borch: Very simple to reproduce (see attachment). -- components: Library (Lib) files: test.py messages: 245621 nosy: malthe priority: normal severity: normal status: open title: Function source inspection fails on closures type: behavior versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file39768/test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception
Barry A. Warsaw added the comment: Found my first 3.5 breakage which I think is due to this. from uuid import uuid4 '%.32x' % uuid4() -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19995 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24129] Incorrect (misleading) statement in the execution model documentation
Changes by Evgeny Kapun abacabadabac...@gmail.com: -- nosy: +abacabadabacaba ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24129 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception
Barry A. Warsaw added the comment: Fix: '%.32x' % uuid4().int -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19995 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24487] Change asyncio.async() → ensure_future()
Martin Panter added the comment: There are a few references left in that revision. For instance https://docs.python.org/3.5/library/asyncio-task.html#coroutines still suggests scheduling a coroutine by calling async(). But depending on the context this may cause a syntax error in 3.5, so I think it should suggest calling ensure_future() instead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24487 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24379] operator.subscript
Serhiy Storchaka added the comment: Is C implementation needed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24379 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24379] operator.subscript
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com: -- nosy: +josh.r ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24379 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24263] unittest cannot load module whose name starts with Unicode
New submission from sih4sing5hong5: Because VALID_MODULE_NAME is r'[_a-z]\w*\.py$' in unittest/loader.py. Using r'[^\W\d]\w*\.py$' insteaded. -- keywords: +patch title: Why VALID_MODULE_NAME in unittest/loader.py is r'[_a-z]\w*\.py$' not r'\w+\.py$' ? - unittest cannot load module whose name starts with Unicode Added file: http://bugs.python.org/file39778/VALID_MODULE_NAME.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24263 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24450] Add cr_await calculated property to coroutine object
Nick Coghlan added the comment: Guido indicated on python-dev that he considered it reasonable to view adding gi_yieldfrom as part of the PEP 492 implementation: https://mail.python.org/pipermail/python-dev/2015-June/140498.html That perspective makes sense to me as well, since it preserves the functional equivalence of native coroutines (cr_await) and generator based coroutines (gi_yieldfrom) from a state introspection perspective. I've added Larry to the nosy list here to give him the option of veto'ing as release manager, but I think we want both in order to get full debuggability benefits. -- nosy: +larry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24450 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24263] unittest cannot load module whose name starts with Unicode
Robert Collins added the comment: Are the module names valid in import statements? it would help if you could perhaps attach a little tar/zip file with an example failure. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24263 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24379] operator.subscript
Joe Jevnik added the comment: I just moved it over since I implemented it for slice originally, I can drop the C implementation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24379 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24263] unittest cannot load module whose name starts with Unicode
sih4sing5hong5 added the comment: There is an attached file for examples. I ran {{{ cd test_dir python -m unittest -v }}} and got Ran 1 test in 0.000s -- Added file: http://bugs.python.org/file39779/test_dir.tar.gz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24263 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24263] unittest cannot load module whose name starts with Unicode
sih4sing5hong5 added the comment: By the way, I ran with Python 3.4.0. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24263 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()
Raymond Hettinger added the comment: Serhiy's code looks like the cleanest way to do it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24483 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24486] http/client.py block indefinitely on line 308 in _read_status
New submission from Julien Palard: Requesting HTTP using `requests`, which uses `http.client` which use `socket`, sometimes, my program get stuck like this: ``` File /usr/lib/python3.2/socket.py, line 287 in readinto File /usr/lib/python3.2/http/client.py, line 308 in _read_status File /usr/lib/python3.2/http/client.py, line 346 in begin File /usr/lib/python3.2/http/client.py, line 1052 in getresponse ... in python requests ... ``` The line is the first of _read_status:: ``` line = str(self.fp.readline(_MAXLINE + 1), iso-8859-1) ``` At a lower level, the program is stuck in a `recvfrom()` syscall. So obviously, an error at the network level caused the server to not reply, but the client recvfrom() the network in a blocking socket without checking first if data is available, so it get stuck indefinitely :-( -- components: Library (Lib) messages: 245626 nosy: Julien.Palard priority: normal severity: normal status: open title: http/client.py block indefinitely on line 308 in _read_status versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24486 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23377] HTTPResponse may drop buffer holding next response
Martin Panter added the comment: Minor update based on Demian’s review -- Added file: http://bugs.python.org/file39769/http-buffer.v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23377 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24465] Make tarfile have deterministic sorting
Sam Thursfield added the comment: Here's a patch which does the same thing but only for shutil.make_archive(). Note that the final output will still be non-deterministic if you use format=gztar because time.time() and the base_name argument get added to the gzip header. Might be nice to add an option to make that deterministic too, as a separate thing. This patch is useful to me as-is though. -- Added file: http://bugs.python.org/file39770/make_archive-stable-ordering.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24465 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24485] Function source inspection fails on closures
Changes by bkcsfi sfi bkc...@gmail.com: -- nosy: +bkcsfi sfi ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24484] multiprocessing cleanup occasionally throws exception
Jorge Herskovic added the comment: This happens reliably between 1-5% of the time on my home Mac (a 4.0 GHz i7). My work Mac Pro, a lot slower, doesn't exhibit this behavior on the same 3.4.3 interpreter. Could it be related to a concurrency issue in the interpreter? We're attempting to replicate on other systems. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24484 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10399] AST Optimization: inlining of function calls
Mark Lawrence added the comment: I get the impression that there's a lot to be gained here, especially when compared to some of the micro-optimizations that are committed. Can we resurrect this, perhaps by taking it up on python-dev? Also msg121082 refers to a Globals cache patch posted on issue10401. -- nosy: +BreamoreBoy versions: +Python 3.6 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10399 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24486] http/client.py block indefinitely on line 308 in _read_status
Martin Panter added the comment: You did not mention if the HTTP connection has a timeout set. If no timeout is set, it will block until the server sends or closes the connection. The timeout sets how long the socket spends “checking if data is available” before giving up. -- nosy: +vadmium type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24486 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24487] Change asyncio.async() → ensure_future()
New submission from Martin Panter: The async() function is marked as deprecated in 3.4.4. This patch replaces most references to it with references to ensure_future(). The exception is https://docs.python.org/3.4/library/asyncio-eventloop.html#asyncio.BaseEventLoop.create_task, which suggests using it in Python 3.4.2. -- assignee: docs@python components: Documentation, asyncio files: ensure_future.patch keywords: patch messages: 245631 nosy: docs@python, gvanrossum, haypo, vadmium, yselivanov priority: normal severity: normal stage: patch review status: open title: Change asyncio.async() → ensure_future() versions: Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file39771/ensure_future.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24487 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com