[issue24488] ConfigParser.getboolean fails on boolean options

2015-06-22 Thread Andreas Hilboll
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,

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-22 Thread Roundup Robot
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

[issue24488] ConfigParser.getboolean fails on boolean options

2015-06-22 Thread R. David Murray
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

[issue24462] bytearray.find Buffer Over-read

2015-06-22 Thread DmitryJ
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

[issue24419] In argparse action append_const doesn't work for positional arguments

2015-06-22 Thread paul j3
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()

[issue24400] Awaitable ABC incompatible with functools.singledispatch

2015-06-22 Thread Yury Selivanov
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

[issue3905] subprocess failing in GUI applications on Windows

2015-06-22 Thread Boris
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

[issue24487] Change asyncio.async() → ensure_future()

2015-06-22 Thread Yury Selivanov
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

[issue24485] Function source inspection fails on closures

2015-06-22 Thread Yury Selivanov
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 ___

[issue24487] Change asyncio.async() → ensure_future()

2015-06-22 Thread Zachary Ware
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 ___

[issue24485] Function source inspection fails on closures

2015-06-22 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24485 ___ ___ Python-bugs-list

[issue24439] Feedback for awaitable coroutine documentation

2015-06-22 Thread Yury Selivanov
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

[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-22 Thread Larry Hastings
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

[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-22 Thread Serhiy Storchaka
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

[issue24478] asyncio: segfault in test_env_var_debug() on non-debug Windows buildbot

2015-06-22 Thread Zachary Ware
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

[issue15014] smtplib: add support for arbitrary auth methods

2015-06-22 Thread Barry A. Warsaw
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

[issue15014] smtplib: add support for arbitrary auth methods

2015-06-22 Thread Barry A. Warsaw
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

[issue15014] smtplib: add support for arbitrary auth methods

2015-06-22 Thread Barry A. Warsaw
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

[issue24478] asyncio: segfault in test_env_var_debug() on non-debug Windows buildbot

2015-06-22 Thread Yury Selivanov
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

[issue24419] In argparse action append_const doesn't work for positional arguments

2015-06-22 Thread py.user
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',

[issue21935] Implement AUTH command in smtpd.

2015-06-22 Thread Barry A. Warsaw
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

[issue12210] test_smtplib: intermittent failures on FreeBSD

2015-06-22 Thread koobs
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,

[issue24325] Speedup types.coroutine()

2015-06-22 Thread Yury Selivanov
Changes by Yury Selivanov yseliva...@gmail.com: -- nosy: +asvetlov, haypo, vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24325 ___ ___

[issue24412] setUpClass equivalent for addCleanup

2015-06-22 Thread Akshit Khurana
Changes by Akshit Khurana axitkhur...@gmail.com: -- nosy: +axitkhurana ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24412 ___ ___

[issue24379] operator.subscript

2015-06-22 Thread Joe Jevnik
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:

[issue24450] Add gi_yieldfrom calculated property to generator object

2015-06-22 Thread Yury Selivanov
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

[issue24450] Add cr_await calculated property to coroutine object

2015-06-22 Thread Yury Selivanov
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

[issue24420] Documentation regressions from adding subprocess.run()

2015-06-22 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24420 ___ ___

[issue23750] Clarify difference between os.system/subprocess.call in section Replacing os.system()

2015-06-22 Thread Martin Panter
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

[issue24481] hotshot pack_string Heap Buffer Overflow

2015-06-22 Thread DmitryJ
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

[issue24439] Feedback for awaitable coroutine documentation

2015-06-22 Thread Martin Panter
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

[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-22 Thread Larry Hastings
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? --

[issue24462] bytearray.find Buffer Over-read

2015-06-22 Thread DmitryJ
DmitryJ added the comment: I am preparing a patch for this issue, then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24462 ___ ___

[issue24485] Function source inspection fails on closures

2015-06-22 Thread Malthe Borch
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,

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2015-06-22 Thread Barry A. Warsaw
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

[issue24129] Incorrect (misleading) statement in the execution model documentation

2015-06-22 Thread Evgeny Kapun
Changes by Evgeny Kapun abacabadabac...@gmail.com: -- nosy: +abacabadabacaba ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24129 ___ ___

[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2015-06-22 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Fix: '%.32x' % uuid4().int -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19995 ___ ___ Python-bugs-list

[issue24487] Change asyncio.async() → ensure_future()

2015-06-22 Thread Martin Panter
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

[issue24379] operator.subscript

2015-06-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is C implementation needed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24379 ___ ___ Python-bugs-list

[issue24379] operator.subscript

2015-06-22 Thread Josh Rosenberg
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com: -- nosy: +josh.r ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24379 ___ ___

[issue24263] unittest cannot load module whose name starts with Unicode

2015-06-22 Thread sih4sing5hong5
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

[issue24450] Add cr_await calculated property to coroutine object

2015-06-22 Thread Nick Coghlan
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

[issue24263] unittest cannot load module whose name starts with Unicode

2015-06-22 Thread Robert Collins
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

[issue24379] operator.subscript

2015-06-22 Thread Joe Jevnik
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 ___

[issue24263] unittest cannot load module whose name starts with Unicode

2015-06-22 Thread sih4sing5hong5
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

[issue24263] unittest cannot load module whose name starts with Unicode

2015-06-22 Thread sih4sing5hong5
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 ___ ___

[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-06-22 Thread Raymond Hettinger
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 ___

[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-22 Thread Julien Palard
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

[issue23377] HTTPResponse may drop buffer holding next response

2015-06-22 Thread Martin Panter
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

[issue24465] Make tarfile have deterministic sorting

2015-06-22 Thread Sam Thursfield
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

[issue24485] Function source inspection fails on closures

2015-06-22 Thread bkcsfi sfi
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

[issue24484] multiprocessing cleanup occasionally throws exception

2015-06-22 Thread Jorge Herskovic
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

[issue10399] AST Optimization: inlining of function calls

2015-06-22 Thread Mark Lawrence
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

[issue24486] http/client.py block indefinitely on line 308 in _read_status

2015-06-22 Thread Martin Panter
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:

[issue24487] Change asyncio.async() → ensure_future()

2015-06-22 Thread Martin Panter
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