[issue29354] Python 2.7.12: pydoc.help(lambda (a, ): lambda x: a) raises IndexError

2017-02-01 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/issue29354> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29344] sock_recv not detected a coroutine

2017-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: The word coroutine has a more specific meaning though (and we have iscoroutine*() inspection functions to check for it). Maybe we should switch all these to "awaitable"? Also note that in proactor_events.py, sock_connect() is *not* a coroutine. In

[issue29344] sock_recv not detected a coroutine

2017-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: A new Sphinx declaration sounds great to me, but you might want to check with some Sphinx or Python-docs expert. I somehow misread the code of IocpProactor.connect(), so ignore that part -- the point is that it's not always a coro

[issue29441] Update examples to use async and await keywords in asyncio-task.rst

2017-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: LGTM. Thanks! -- ___ Python tracker <http://bugs.python.org/issue29441> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-02-15 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue29517> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29566] binhex() creates files with mixed line endings

2017-02-15 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue29566> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25612] nested try..excepts don't work correctly for generators

2017-02-17 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue25612> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28637] Python startup performance regression

2017-02-17 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue28637> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26789] Please do not log during shutdown

2017-02-21 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue26789> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9285] Add a profile decorator to profile and cProfile

2017-02-24 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue9285> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29647] Python 3.6.0

2017-02-25 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue29647> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29302] add contextlib.AsyncExitStack

2017-03-01 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue29302> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29679] Add @contextlib.asynccontextmanager

2017-03-01 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue29679> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29689] Asyncio-namespace helpers for async_generators

2017-03-01 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue29689> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29695] Weird keyword parameter names in builtins

2017-03-02 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue29695> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29704] Can't read data from Transport after asyncio.SubprocessStreamProtocol closes

2017-03-02 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue29704> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29703] Fix asyncio to support instantiation of new event loops in subprocesses

2017-03-02 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue29703> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28963] Use-after-free in _asyncio_Future_remove_done_callback() of _asynciomodule.c

2017-03-02 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue28963> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-27 Thread Guido van Rossum
Guido van Rossum added the comment: I cannot run your test program. Can you explain what it does and what you expected? Also, watch your language. -- ___ Python tracker <http://bugs.python.org/issue27

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-27 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe the form requirements for Bluetooth addresses are different than for IP or ipv6? I guess the validation should be protocol-specific. -- ___ Python tracker <http://bugs.python.org/issue27

[issue27136] sock_connect fails for bluetooth (and probably others)

2016-05-28 Thread Guido van Rossum
Guido van Rossum added the comment: > Why validate at all? Because (at least for the IP 4/6 protocols) when you give a host name Python's socket code will do a synchronous DNS lookup which would hold up the entire event loop until it's done. This would be a major problem in some

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-29 Thread Guido van Rossum
Guido van Rossum added the comment: I don't recall writing that any more, but that fix looks right. (Though why write `metatype == &PyType_Type` rather than `PyType_CheckExact(metatype)`?) -- ___ Python tracker <http://bugs.python.or

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Guido van Rossum
Guido van Rossum added the comment: OK, the patch looks fine. Please treat this as a new feature (just in case) and only apply it to 3.6. -- ___ Python tracker <http://bugs.python.org/issue27

[issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass

2016-05-30 Thread Guido van Rossum
Guido van Rossum added the comment: No, just an entry in Misc/NEWS. --Guido (mobile) -- ___ Python tracker <http://bugs.python.org/issue27157> ___ ___ Python-bug

[issue25566] asyncio reference cycles after ConnectionResetError

2016-05-30 Thread Guido van Rossum
Guido van Rossum added the comment: Please submit a patch to the upstream asyncio repo, github.com/Python/asyncio. --Guido (mobile) On May 30, 2016 3:46 AM, "Sean Hunt" wrote: > > Sean Hunt added the comment: > > I am 1 of those people who want to handle the error with

[issue22558] Missing doc links to source code

2016-05-30 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue22558> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23401] Add pickle support of Mapping views

2016-06-04 Thread Guido van Rossum
Guido van Rossum added the comment: Raymond, what is your opinion? -- ___ Python tracker <http://bugs.python.org/issue23401> ___ ___ Python-bugs-list mailin

[issue23401] Add pickle support of Mapping views

2016-06-04 Thread Guido van Rossum
Guido van Rossum added the comment: Serhiy, why would you want to separately pickle such a view? It's a trivial wrapper around a dict/mapping. What's the use case? -- ___ Python tracker <http://bugs.python.o

[issue23264] Add pickle support of dict views

2016-06-04 Thread Guido van Rossum
Guido van Rossum added the comment: Why no docs? -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/issue23264> ___ ___ Python-bugs-list mailin

[issue23401] Add pickle support of Mapping views

2016-06-04 Thread Guido van Rossum
Guido van Rossum added the comment: I think it's fine to do this for concrete classes, I just don't think it should be added to ABCs. --Guido (mobile) -- ___ Python tracker <http://bugs.python.o

[issue23264] Add pickle support of dict views

2016-06-04 Thread Guido van Rossum
Guido van Rossum added the comment: On general I think we should always document whether a class is picklable. And we should document how a subclass can hook into pickling. --Guido (mobile) -- ___ Python tracker <http://bugs.python.org/issue23

[issue23401] Add pickle support of Mapping views

2016-06-04 Thread Guido van Rossum
Guido van Rossum added the comment: I find it extremely suspicious that if you pickle the keys of a large object it also pickles that object. These are views, not copied data, for a reason. I also take back that this is okay for concrete dict. As for your reason (http://bugs.python.org

[issue23264] Add pickle support of dict views

2016-06-04 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, I no longer think this is a good idea. See http://bugs.python.org/issue23401#msg267383 . -- ___ Python tracker <http://bugs.python.org/issue23

[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Guido van Rossum
Guido van Rossum added the comment: Would it be easier to handle for everyone if this did not vary between 3.5.0/1 and 3.5.2, and instead was an incompatibility in 3.6? (That would still be allowed given 492's provisional status.) -- nosy: +ned.

[issue27243] __aiter__ should return async iterator instead of awaitable

2016-06-06 Thread Guido van Rossum
Guido van Rossum added the comment: Unless Nick disagrees (or unless we can't figure out how to implement it) I think Yury's proposal makes sense. So if Larry is asking for my fiat, this is it. -- ___ Python tracker <http://bu

[issue27242] Clarify the use cases of NotImplemented in the docs

2016-06-06 Thread Guido van Rossum
Guido van Rossum added the comment: LGTM -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/issue27242> ___ ___ Python-bugs-list mailing list Unsub

[issue23401] Add pickle support of Mapping views

2016-06-07 Thread Guido van Rossum
Guido van Rossum added the comment: No, it should just be up to the implementation. Though you might add a note to the docs explaining that it's probably a misguided idea. On Tue, Jun 7, 2016 at 2:23 AM, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > >

[issue27252] Make dict views copyable

2016-06-07 Thread Guido van Rossum
Guido van Rossum added the comment: I'm still not clear about the use case -- have you heard from people who had to work around the current situation? Use of the copy module is often a code smell in my experience, so I don't want to en

[issue27271] asyncio lost udp packets

2016-06-08 Thread Guido van Rossum
Guido van Rossum added the comment: How do you know the OS kernel isn't dropping them? -- ___ Python tracker <http://bugs.python.org/issue27271> ___ ___ Pytho

[issue27271] asyncio lost udp packets

2016-06-08 Thread Guido van Rossum
Guido van Rossum added the comment: You have not convinced anyone that this is asyncio's fault. I'm closing the issue. If you need help debugging this please use the python-tulip Google Group; if in the end it is found to be an asyncio issue we'll help you file a useful bu

[issue27271] asyncio lost udp packets

2016-06-09 Thread Guido van Rossum
Guido van Rossum added the comment: You're welcome Valdemar. It's a wonderful world, there's so much to learn! Sounds like you're on the right path. Good luck! -- ___ Python tracker <http://bug

[issue23693] timeit accuracy could be better

2016-06-10 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue23693> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26923] asyncio.gather drops cancellation

2016-06-14 Thread Guido van Rossum
Guido van Rossum added the comment: I think I agree with Johannes. If all children refuse to be cancelled because they are already done, the outer _GatheringFuture might as well refuse to be cancelled as well. However I'm not sure I actually understand the mechanism whereby the calling

[issue26923] asyncio.gather drops cancellation

2016-06-17 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! I had eventually pieced together the same explanation. So yes, I think your fix is right, though I would write it like this: ret = False for child in self._children: ret |= child.cancel() return ret # True if at

[issue26923] asyncio.gather drops cancellation

2016-06-20 Thread Guido van Rossum
Guido van Rossum added the comment: @Yury, any comments? The fix looks fine to me. -- ___ Python tracker <http://bugs.python.org/issue26923> ___ ___ Python-bug

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-26 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, I'd like to see a more minimal repro to understand what's going in. -- ___ Python tracker <http://bugs.python.o

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-26 Thread Guido van Rossum
Guido van Rossum added the comment: I'm confused. create_connection() is meant for creating client connection, so I don't think a server_side flag makes sense. (There are lower-level internal APIs that do take a server_side flag, but create_connection() is just one caller for t

[issue23401] Add pickle support of Mapping views

2016-06-26 Thread Guido van Rossum
Guido van Rossum added the comment: Please close. -- ___ Python tracker <http://bugs.python.org/issue23401> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27364] Deprecate invalid unicode escape sequences

2016-06-26 Thread Guido van Rossum
Guido van Rossum added the comment: I am okay with making it a silent warning. Can we do it in two stages though? It doesn't have to be two releases, I just mean two separate commits: (1) fix all places in the stdlib that violate this principle; (2) separately commit the code that cause

[issue27364] Deprecate invalid unicode escape sequences

2016-06-26 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, if you manage to trigger an assert() in the C code by writing some evil Python code, the C code is considered broken (unless it was using ctypes or one or two other explicit "void-the-warranty" exceptions). Maybe someone who has worked more

[issue27364] Deprecate invalid unicode escape sequences

2016-06-27 Thread Guido van Rossum
Guido van Rossum added the comment: I think ultimately it has to become an error (otherwise I wouldn't have agreed to the warning, silent or not). But because there's so much 3rd party code that depends on it we indeed need to take "several" releases before we go there.

[issue27402] Sequence example in typing module documentation does not typecheck

2016-06-28 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! -- nosy: +gvanrossum resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-29 Thread Guido van Rossum
Guido van Rossum added the comment: I can't personally run that code and get the results you are getting; could you please walk us through what happens (as far as you can tell)? Reading the code I find myself quite confused about which parts of the code might be active or not. E.

[issue27386] Asyncio server hang when clients connect and immediately disconnect

2016-06-29 Thread Guido van Rossum
Guido van Rossum added the comment: No, I just don't have a computer right now, only a phone. --Guido (mobile) -- ___ Python tracker <http://bugs.python.org/is

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Guido van Rossum
Changes by Guido van Rossum : -- Removed message: http://bugs.python.org/msg269525 ___ Python tracker <http://bugs.python.org/issue27392> ___ ___ Python-bug

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Guido van Rossum
Changes by Guido van Rossum : -- Removed message: http://bugs.python.org/msg269529 ___ Python tracker <http://bugs.python.org/issue27392> ___ ___ Python-bug

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Guido van Rossum
Guido van Rossum added the comment: Hm. The docs in PEP 3156 do mention that create_connection() is for clients (though it weakens this with "typically"): https://www.python.org/dev/peps/pep-3156/#internet-connections I always think of TCP connections (which is what create_conne

[issue27392] Add a server_side keyword parameter to create_connection

2016-06-29 Thread Guido van Rossum
Guido van Rossum added the comment: Rather tham monkey-patching, in general I recommend just copying some code from the asyncio library and calling that. In this case you'd be copying a tiny bit of code from create_connection(). You'd still be calling an internal API, _make_ssl_transp

[issue26081] Implement asyncio Future in C to improve performance

2016-07-03 Thread Guido van Rossum
Guido van Rossum added the comment: We should really try to get this into 3.6. --Guido (mobile) -- ___ Python tracker <http://bugs.python.org/issue26081> ___ ___

[issue27456] TCP_NODELAY

2016-07-05 Thread Guido van Rossum
Guido van Rossum added the comment: Fine with me -- I have no idea what this flag does (nor the desire to learn :-). -- ___ Python tracker <http://bugs.python.org/issue27

[issue27456] TCP_NODELAY

2016-07-05 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue27456> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27458] Allow subtypes of unicode/str to hit the optimized unicode_concatenate block

2016-07-06 Thread Guido van Rossum
Guido van Rossum added the comment: I'm not interested, sorry. -- ___ Python tracker <http://bugs.python.org/issue27458> ___ ___ Python-bugs-list m

[issue27458] Allow subtypes of unicode/str to hit the optimized unicode_concatenate block

2016-07-06 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue27458> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27392] Add a server_side keyword parameter to create_connection

2016-07-09 Thread Guido van Rossum
Guido van Rossum added the comment: I like the new method better. Submit away! --Guido (mobile) -- ___ Python tracker <http://bugs.python.org/issue27392> ___ ___

[issue27392] Add a server_side keyword parameter to create_connection

2016-07-09 Thread Guido van Rossum
Guido van Rossum added the comment: Hold on. It's weekend. I will review this when I am near a laptop again. --Guido (mobile) -- ___ Python tracker <http://bugs.python.org/is

[issue27392] Add a server_side keyword parameter to create_connection

2016-07-10 Thread Guido van Rossum
Guido van Rossum added the comment: How about we use connect_socket() or a variant on that name? That feels similar to connect_{read,write}_pipe(), which also take a protocol_factory and an already-opened I/O object. If it's only for server-side sockets I'd call it connect_server_s

[issue27392] Add a server_side keyword parameter to create_connection

2016-07-11 Thread Guido van Rossum
Guido van Rossum added the comment: Sounds Good To Me. -- ___ Python tracker <http://bugs.python.org/issue27392> ___ ___ Python-bugs-list mailing list Unsub

[issue27485] urllib.splitport -- is it official or not?

2016-07-11 Thread Guido van Rossum
New submission from Guido van Rossum: I've seen and written some code that uses urllib.splitport() [1], but it's not in the export list, nor in the docs. However I see no easy other way to perform the same function. Should we make it official, or get rid of it? It's used inter

[issue27485] urllib.splitport -- is it official or not?

2016-07-11 Thread Guido van Rossum
Guido van Rossum added the comment: Aha. I see you are referring to this note in the 2.7 docs for urllib: urllib also exposes certain utility functions like splittype, splithost and others parsing URL into various components. But it is recommended to use :mod:`urlparse` for parsing

[issue27498] Regression in repr() of class object

2016-07-12 Thread Guido van Rossum
New submission from Guido van Rossum: In Python 3.6, the repr() of a class includes its memory address. This is going to cause a lot of problems for tests in 3rd party code that expects the nice and clean instead of . I understand the desire to provide more clarity in case somehow two

[issue25548] Show the address in the repr for class objects

2016-07-12 Thread Guido van Rossum
Guido van Rossum added the comment: I'm also echoing this... It breaks too many tests. I filed issue27498. -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/is

[issue25548] Show the address in the repr for class objects

2016-07-13 Thread Guido van Rossum
Guido van Rossum added the comment: Doing it only for user-defined types would still break my tests. -- ___ Python tracker <http://bugs.python.org/issue25

[issue25548] Show the address in the repr for class objects

2016-07-13 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, let's roll it back. The reason it never was an issue for old-style classes is that they behaved like this from the start, so nobody wrote tests that depended on the predictability of repr(). But new-style classes have had this nice clean repr()

[issue27515] Dotted name re-import does not rebind after deletion

2016-07-14 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think this is a bug. You're paraphrasing step 2 incorrectly. The local name-binding behavior just creates a local named "email" -- it doesn't concern itself with ensuring that the email package has an attribute "charset

[issue27515] Dotted name re-import does not rebind after deletion

2016-07-14 Thread Guido van Rossum
Guido van Rossum added the comment: > On the second import, import finds email in sys.modules Actually, it only takes the shortcut because it also finds email.charset in sys.modules. -- ___ Python tracker <http://bugs.python.org/issu

[issue27515] Dotted name re-import does not rebind after deletion

2016-07-14 Thread Guido van Rossum
Guido van Rossum added the comment: Are you sure you realize that "import email.charset" doesn't create a local variable named "email.charset"? It creates a local variable named "email" which happens to have an attribute "charset". The prob

[issue23722] During metaclass.__init__, super() of the constructed class does not work

2016-07-17 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think this requires adding it to the PEP, and I think doing this is fine. (But I can't review the code.) -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.o

[issue27546] Integrate tkinter and asyncio (and async)

2016-07-17 Thread Guido van Rossum
Guido van Rossum added the comment: I expect it should eventually be added to tkinter. But I also think it might be worthwhile to first develop it as a 3rd party package on PyPI, to see if it can actually be done well enough to put it in the stdlib. I guess a demo app should be part of the

[issue1621] Do not assume signed integer overflow behavior

2016-07-20 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue1621> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27546] Integrate tkinter and asyncio (and async)

2016-07-21 Thread Guido van Rossum
Guido van Rossum added the comment: > Who actually wrote it [crawl.py], that would understand it? I wrote it, and I can probably still recover my understanding of it. Basically you say "python3 crawl.py xkcd.com -q" and it crawls the XKCD.com website -- that takes about 4

[issue27598] Add SizedIterable to collections.abc and typing

2016-07-23 Thread Guido van Rossum
Guido van Rossum added the comment: I'm thinking that it should be called Collection after all. --Guido (mobile) -- ___ Python tracker <http://bugs.python.org/is

[issue27598] Add SizedIterable to collections.abc and typing

2016-07-23 Thread Guido van Rossum
Guido van Rossum added the comment: It would be a deviation from existing practice for a collection ABC to exist in typing but not in collections.abc, and it would mean the inheritance tree for the types in typing.py would be different from that in collections.abc. These ABCs, while not so

[issue27366] PEP487: Simpler customization of class creation

2016-07-24 Thread Guido van Rossum
Guido van Rossum added the comment: That's a no from me. On Sunday, July 24, 2016, Martin Teichmann wrote: > > Martin Teichmann added the comment: > > Thanks for the nice review! > > I made the proposed changes, see attached patch. > > I am still waitin

[issue27598] Add SizedIterable to collections.abc and typing

2016-07-24 Thread Guido van Rossum
Guido van Rossum added the comment: Regarding the design of __subclasshook__, these two flaws kind of cancel each other out. The idea is that if you have a "one-trick pony" class whose issubclass() check must verify that the purported sublass implements a specific method (e.g. __ha

[issue27546] Integrate tkinter and asyncio (and async)

2016-07-24 Thread Guido van Rossum
Guido van Rossum added the comment: On what platform did you measure that? On a Mac, with Python 3.5.2, I get very different numbers: tkloop: 9000/sec asloop: 9/sec (about 10x!) tkasyncloop: 2500/sec -- ___ Python tracker <h

[issue27546] Integrate tkinter and asyncio (and async)

2016-07-24 Thread Guido van Rossum
Guido van Rossum added the comment: OK, I'm playing with this too. I merged your loop_tk.py example with crawl.py and am attaching the result as tkcrawl.py. I don't like global state so I added root and loop as parameters to a few places. Hopefully you have the asyncio repo checked

[issue27546] Integrate tkinter and asyncio (and async)

2016-07-24 Thread Guido van Rossum
Guido van Rossum added the comment: PS. I recommend this command line to play with tkcrawl.py: python3 tkcrawl.py xkcd.com -q The fetching process takes about 6.8 seconds to fetch 1765 URLs on my machine. The original crawl.py takes 6.2 seconds. I guess the next step would be to hook up the

[issue27546] Integrate tkinter and asyncio (and async)

2016-07-24 Thread Guido van Rossum
Guido van Rossum added the comment: Oh, my tkinter.TkVersion is 8.6. -- ___ Python tracker <http://bugs.python.org/issue27546> ___ ___ Python-bugs-list mailin

[issue27366] PEP487: Simpler customization of class creation

2016-07-25 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue27366> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2016-07-25 Thread Guido van Rossum
New submission from Guido van Rossum: The docs for threading.Lock say 79534:.. versionchanged:: 3.3 79534: Changed from a factory function to a class. but the implementation in threading.py doesn't define a class named Lock, and in fact it is an alias for _thread.allocate

[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2016-07-25 Thread Guido van Rossum
Changes by Guido van Rossum : -- assignee: -> docs@python components: +Documentation nosy: +docs@python versions: +Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issu

[issue27546] Integrate tkinter and asyncio (and async)

2016-07-26 Thread Guido van Rossum
Guido van Rossum added the comment: Isn't this going to busy-wait, esp. with the loop.call_soon() version? Even with loop.call_later(0.1, tk_update) you're wasting battery power even if no network activity and no UI activity is happening. I'm not eager to document this as the

[issue27546] Integrate tkinter and asyncio (and async)

2016-07-26 Thread Guido van Rossum
Guido van Rossum added the comment: OK, in the context of IDLE it probably doesn't matter (though I recall that IDLE was given a hard time many years ago by people complaining about that same busy-waiting -- I guess batteries have improved somewhat since

[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-29 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! Should go live later today. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-29 Thread Guido van Rossum
Guido van Rossum added the comment: Mercurial revs: fd0dce6d33e7, 15a35a8da24b, 4ecea1ea11bf, 4ecea1ea11bf. -- ___ Python tracker <http://bugs.python.org/issue27

[issue19660] decorator syntax: allow testlist instead of just dotted_name

2016-07-31 Thread Guido van Rossum
Guido van Rossum added the comment: Nobody has posted a real use case. All the examples are toys. What are the real use cases that are blocked by this? Readability counts! -- ___ Python tracker <http://bugs.python.org/issue19

[issue19660] decorator syntax: allow testlist instead of just dotted_name

2016-07-31 Thread Guido van Rossum
Guido van Rossum added the comment: Could you link to an example decorator definition and its call site(s) that would benefit? I'm lacking the imagination to understand what a "dynamic decorator" might be. @spam().eggs() is not enough to help me understand -- I understand quite w

[issue19660] decorator syntax: allow testlist instead of just dotted_name

2016-07-31 Thread Guido van Rossum
Guido van Rossum added the comment: OK, so if you wanted to be able to call myrole(...) instead of myrole.caller, why doesn't cmd.__call__ return self.caller rather than just self? -- ___ Python tracker <http://bugs.python.org/is

[issue19660] decorator syntax: allow testlist instead of just dotted_name

2016-07-31 Thread Guido van Rossum
Guido van Rossum added the comment: OK, maybe someone else wants to provide a real-world example. Otherwise I am really going to close this (again). -- ___ Python tracker <http://bugs.python.org/issue19

[issue27665] Make create_server able to listen on several ports

2016-08-01 Thread Guido van Rossum
Guido van Rossum added the comment: IIRC we got a similar PR before. But what's the problem with creating multiple server objects? -- ___ Python tracker <http://bugs.python.org/is

<    42   43   44   45   46   47   48   49   50   51   >