[issue32314] Implement asyncio.run()

2017-12-13 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +4741 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32312] Create Py_AtExitRegister C API

2017-12-13 Thread Neil Schemenauer
Neil Schemenauer added the comment: Private is fine. We want to get the design correct before making it part of the official API. My thought is that providing a handy atexit hook would be a good thing in that it could be an alternative to 3rd party code using __del__ to do cleanup. One dow

[issue32314] Implement asyncio.run()

2017-12-13 Thread Andrew Svetlov
Andrew Svetlov added the comment: I like avoiding run_forever() -- the function always was too cumbersome. -- ___ Python tracker ___ ___

[issue32314] Implement asyncio.run()

2017-12-13 Thread Yury Selivanov
Yury Selivanov added the comment: I'll open a separate issue to improve Server's API. AFAIK it's the main reason for having run_forever(). -- ___ Python tracker ___ _

[issue32315] can't run any scripts with 2.7.x, 32 and 64-bit

2017-12-13 Thread Martin
New submission from Martin : When I try to run a really simple script like: def fun(a): print a return I get this error: Exception in Tkinter callback Traceback (most recent call last): File "C:\Python27\lib\lib-tk\Tkinter.py", line 1541, in __call__ return self.func(*args) File

[issue32296] Implement asyncio._get_running_loop() and get_event_loop() in C

2017-12-13 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset bfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1 by Yury Selivanov in branch 'master': bpo-32296: Unbreak tests on Windows (#4850) https://github.com/python/cpython/commit/bfbf04ef18c93ca8cab0453f76aeea1d8fc23fb1 -- ___

[issue32316] [3.6] make regen-all fails on Travis CI on "python3.6" command

2017-12-13 Thread STINNER Victor
New submission from STINNER Victor : The cpython job of Travis CI compiles Python with clang and then run "make regen-all" which fails. "make regen-all" fails for example on regen-typeslots which runs "$(PYTHON_FOR_REGEN) ...". On Travis CI, $(PYTHON_FOR_REGEN) is "python3.6", but running pyt

[issue32316] [3.6] make regen-all fails on Travis CI on "python3.6" command

2017-12-13 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +4742 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32143] os.statvfs lacks f_fsid

2017-12-13 Thread Fred L. Drake, Jr.
Change by Fred L. Drake, Jr. : -- nosy: +fdrake ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2017-12-13 Thread Yury Selivanov
Yury Selivanov added the comment: Matthias, Thanks a lot for such a detailed write-up! I now better understand how you want to use the proposed API in Trio, and why the weakref approach isn't going to work (at least not in a straightforward way). >> 2. What if another framework (say asyncio

[issue32317] sys.exc_clear() clears exception in other stack frames

2017-12-13 Thread Garrett Berg
Garrett Berg added the comment: I forgot to post this: python --version

[issue32317] sys.exc_clear() clears exception in other stack frames

2017-12-13 Thread Garrett Berg
New submission from Garrett Berg : # Summary In python (2 or 3) it should always be valid to have a bare *raise* statement in an exception block. try: do_something() except SomeException: do_cleanup() raise # always reraises SomeException with original stack trac

[issue32300] print(os.environ.keys()) should only print the keys

2017-12-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: shelve.Shelf is the example of such kind. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue32298] Email.quopriprime over-encodes characters

2017-12-13 Thread Geoff Kuenning
Geoff Kuenning added the comment: I should have read that part of RFC 2047 before I submitted. I'd love to claim that I'm going to write a patch that would do as you suggest. But the reality is that I'm unlikely to find the time, so I'm going to be wise for once and avoid promising what I ca

[issue32316] [3.6] make regen-all fails on Travis CI on "python3.6" command

2017-12-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1d2a387b9526ef5f4d694734d8022e739f7fd410 by Victor Stinner in branch '3.6': bpo-32316: Travis CI: use PYTHON_FOR_REGEN=python3 (#4853) https://github.com/python/cpython/commit/1d2a387b9526ef5f4d694734d8022e739f7fd410 -- ___

[issue32316] [3.6] make regen-all fails on Travis CI on "python3.6" command

2017-12-13 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32317] sys.exc_clear() clears exception in other stack frames

2017-12-13 Thread Garrett Berg
Garrett Berg added the comment: I found a workaround, and probably the reason this has not been detected before: import sys def doclear2() try: 1/0 except ZeroDivisionError: sys.exc_clear() try: 1/0 except ZeroDivisionError:

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4743 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30241] Add contextlib.AbstractAsyncContextManager

2017-12-13 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 176baa326be4ec2dc70ca0c054b7e2ab7ca6a9cf by Yury Selivanov (Jelle Zijlstra) in branch 'master': bpo-30241: implement contextlib.AbstractAsyncContextManager (#1412) https://github.com/python/cpython/commit/176baa326be4ec2dc70ca0c054b7e2ab7ca6a9cf

[issue30241] Add contextlib.AbstractAsyncContextManager

2017-12-13 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-13 Thread STINNER Victor
STINNER Victor added the comment: New changeset b5fd9ad05e0f15f8272b8f1b829af22077230584 by Victor Stinner in branch 'master': bpo-32030: Rewrite _PyMainInterpreterConfig (#4854) https://github.com/python/cpython/commit/b5fd9ad05e0f15f8272b8f1b829af22077230584 -- ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-13 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4744 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue29877] compileall hangs when accessing urandom even if number of workers is 1

2017-12-13 Thread Dustin Spicuzza
Change by Dustin Spicuzza : -- keywords: +patch pull_requests: +4745 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-l

[issue32318] Remove "globals()" call from "socket.accept()"

2017-12-13 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: yselivanov priority: normal severity: normal status: open title: Remove "globals()" call from "socket.accept()" ___ Python tracker ___ __

[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2017-12-13 Thread Nathaniel Smith
Nathaniel Smith added the comment: > 1. How will trio handle situations like: > > c = coro() > await ... > nursery.start_soon(c) > > ? [...] > Maybe creating a coroutine and not immediately passing it to 'start_soon' or > similar API is an anti-pattern in Trio, but it is an OK thi

[issue32318] Remove "globals()" call from "socket.accept()"

2017-12-13 Thread Yury Selivanov
New submission from Yury Selivanov : socket.accept currently has this code: type = self.type & ~globals().get("SOCK_NONBLOCK", 0) which I believe is (a) bad Python style; (b) slows things down. -- components: +Library (Lib) nosy: +asvetlov, vstinner type: -> enhancement versions:

[issue32318] Remove "globals()" call from "socket.accept()"

2017-12-13 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +4746 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2017-12-13 Thread Yury Selivanov
Yury Selivanov added the comment: > So first... that's not how nursery.start_soon works :-). It actually takes an > async function, not a coroutine object. [..] Interesting, and I think I like it. I definitely understand the motivation to not tell users the difference between coroutine funct

[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2017-12-13 Thread Nathaniel Smith
Nathaniel Smith added the comment: > In any case, in my opinion, it doesn't matter. `sys.set_coroutine_wrapper` > controls a single thread-local setting, > `sys.set_unawaited_coroutine_tracking` *also* controls a single thread-local > setting. Both of them have the exact same problem when t

[issue32228] truncate() changes current stream position

2017-12-13 Thread Nitish
Change by Nitish : -- keywords: +patch pull_requests: +4747 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list maili

[issue32318] Remove "globals()" call from "socket.accept()"

2017-12-13 Thread STINNER Victor
STINNER Victor added the comment: IMHO we should add a private mask constant, see: https://github.com/python/cpython/pull/4231#issuecomment-351622381 -- ___ Python tracker ___

[issue29469] AST-level Constant folding

2017-12-13 Thread INADA Naoki
INADA Naoki added the comment: New changeset 7ea143ae795a9fd57eaccf490d316bdc13ee9065 by INADA Naoki in branch 'master': bpo-29469: Move constant folding to AST optimizer (GH-2858) https://github.com/python/cpython/commit/7ea143ae795a9fd57eaccf490d316bdc13ee9065 -- _

[issue29469] AST-level Constant folding

2017-12-13 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue32319] re fullmatch error with non greedy modifier

2017-12-13 Thread Daniel Hrisca
New submission from Daniel Hrisca : Consider this code snippet: from re import match, fullmatch pattern = '".+?"' string = '"hello" "again"' print(match(pattern, string)) print(fullmatch(pattern, string)) Which prints: <_sre.SRE_Match object; span=(0, 7), match='"hello"'> <_sre.SRE_Match ob

<    1   2