[issue2578] additional unittest type equality methods

2009-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: Hi Greg, I've mostly reviewed for style... http://codereview.appspot.com/32080/diff/13/1006 File Doc/library/unittest.rst (right): http://codereview.appspot.com/32080/diff/13/1006#newcode611 Line 611: assertTrue(expr[, msg]) Make assertTrue the

[issue992389] attribute error after non-from import

2009-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: Good sleuthing Nick! It's clearly the same bug that Fredrik found. I tried to test if using Brett' importlib has the same problem, but it can import neither p.a nor p.b, so that's not helpful as to sorting out the import semantics. I belie

[issue992389] attribute error after non-from import

2009-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, never mind about the importlib bug, that was my mistake. importlib actually behaves exactly the same way as the built-in import. I conclude that this is probably the best semantics of import that we can hope for in this corner case. I propose to

[issue2578] additional unittest type equality methods

2009-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: LG. http://codereview.appspot.com/32080 -- ___ Python tracker <http://bugs.python.org/issue2578> ___ ___ Python-bugs-list m

[issue2578] additional unittest type equality methods

2009-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: I think we should rename the method defs ASAP but not start deprecating the old names until 3.2. Otherwise many people's tests will be very noisy and that's just annoying. Give them time to migrate v

[issue992389] attribute error after non-from import

2009-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: I'm sorely tempted to apply the Van Lindberg clause to the last two responses by Torsten and Nick. If there was an easy solution it wouldn't have been open for five years. If you don't believe me, post a fix. I'll even accept a f

[issue1641] asyncore delayed calls feature

2009-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: At the language summit last Thursday there was widespread disappointment with the changes to asyncore.py in 2.6, which broke almost all code that actually uses it. Unfortunately, the documented API is lame, so everybody depended on undocumented internals

[issue2578] additional unittest type equality methods

2009-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: I absolutely do not want it to warn by default in 3.1. PendingDeprecationError is fine. -- ___ Python tracker <http://bugs.python.org/issue2

[issue4847] csv fails when file is opened in binary mode

2009-04-01 Thread Guido van Rossum
Guido van Rossum added the comment: I think it's good if it allowed passing in a binary file and an encoding, but I think it would be crazy if it wouldn't also take a text file. After all the primary purpose of a CSV file, edge cases notwithstanding, is to look like text to the end

[issue1641] asyncore delayed calls feature

2009-04-01 Thread Guido van Rossum
Guido van Rossum added the comment: I guess the Zope developers aren't that tuned in to core Python developement. They were sorely bitten. I don't think you can claim that users should be tuned in to python-dev just to assure their favorite module isn't removed or broken. It

[issue1641] asyncore delayed calls feature

2009-04-01 Thread Guido van Rossum
Guido van Rossum added the comment: Josiah, you need an attitude adjustment. The breakage of asyncore in 2.6 was real and is now harming adoption of 2.6 by those folks (who are by nature not early adopters -- their customers are typical enterprise users). Talk to Tres Seaver and Jim Fulton

[issue1641] asyncore delayed calls feature

2009-04-01 Thread Guido van Rossum
Guido van Rossum added the comment: Well arguably asyncore is unsalvageable due to the undocumented internals issue, and we sure know a bit more about how to design a *good* asynchronous API than we did when asyncore was created. (One hint: don't make subclassing part of your API.) The

[issue2578] additional unittest type equality methods

2009-04-01 Thread Guido van Rossum
Guido van Rossum added the comment: Do I mind? I *insist*! I thought put a note about that in the code review but I guess Greg missed it. Thanks for noticing. -- ___ Python tracker <http://bugs.python.org/issue2

[issue1641] asyncore delayed calls feature

2009-04-01 Thread Guido van Rossum
Guido van Rossum added the comment: Josiah, there's no need to get all defensive and passive-aggressive about it. I'm just reporting about strong feelings that were brought up at the language summit -- to my surprise too! Admitting somebody made a mistake would be step one (and I

[issue1641] asyncore delayed calls feature

2009-04-01 Thread Guido van Rossum
Guido van Rossum added the comment: Looking back, I think Zope and Medusa should have adopted and evolved their own copy of asynchat a long time ago... -- ___ Python tracker <http://bugs.python.org/issue1

[issue2578] additional unittest type equality methods

2009-04-02 Thread Guido van Rossum
Guido van Rossum added the comment: > Nick Coghlan added the comment: > Bikeshedding a bit - the 'assertGreaterEqual' and 'assertLessEqual' > method names grate on me a little. My brain has to do a double take in > order to correctly insert the implied 'Or

[issue1641] asyncore delayed calls feature

2009-04-02 Thread Guido van Rossum
Guido van Rossum added the comment: [Guido] >> Looking back, I think Zope and Medusa should have adopted and evolved >> their own copy of asynchat a long time ago... [Jim] > This statement is puzzling.  No big deal, but I'm curious why you say > this. ISTR that Zope

[issue5654] Add C hook in PyDict_SetItem for debuggers

2009-04-03 Thread Guido van Rossum
Guido van Rossum added the comment: John, I'm adding a +0 to cancel out Raymond's -1. I've read your motivation and, like you, hope/expect that benchmarking will show this has no real impact. But I need data to decide. Once there are benchmark results I'll revise my vi

[issue2578] additional unittest type equality methods

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

[issue1580] Use shorter float repr when possible

2009-04-07 Thread Guido van Rossum
Guido van Rossum added the comment: On Tue, Apr 7, 2009 at 3:10 AM, Mark Dickinson wrote: > A proposal: I propose that the short float representation should be > considered an implementation detail for CPython, not a requirement for > Python the language.  This leaves Jython and IronP

[issue5717] os.defpath includes unix /bin on windows

2009-04-07 Thread Guido van Rossum
Guido van Rossum added the comment: Can you suggest a fix? -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/issue5717> ___ ___ Python-bugs-list m

[issue3720] segfault in for loop with evil iterator

2009-04-20 Thread Guido van Rossum
Guido van Rossum added the comment: I'm okay with that hack for 2.6 and 2.5. -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/issue3720> ___ ___

[issue3959] Add Google's ipaddr.py to the stdlib

2009-05-01 Thread Guido van Rossum
Changes by Guido van Rossum : -- ___ Python tracker <http://bugs.python.org/issue3959> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue2292] Missing *-unpacking generalizations

2009-05-29 Thread Guido van Rossum
Guido van Rossum added the comment: > I was hoping this would make 3.1. Too late, I guess. What about 3.2? Here's what I said before: """ I think we should either get this into the 3.0a5 release planned for May 7, or wait for 3.1. I'd prefer to see some kind of

[issue1943] improved allocation of PyUnicode objects

2009-06-02 Thread Guido van Rossum
Guido van Rossum added the comment: If this is not yet in 3.1, it's clearly too late to add it (now that RC1 was already released). If was in already (hard to tell from the long bug), I think it should be kept in (removing it would destabilize more than keepi

[issue1943] improved allocation of PyUnicode objects

2009-06-02 Thread Guido van Rossum
Guido van Rossum added the comment: That's unfortunate; it would clearly have been easier to change this in 3.1. That said, I'm not sure anyone *should* be subclassing PyUnicode. Maybe Marc-Andre can explain why he is doing this (or point to the message in this thread where he expl

[issue1943] improved allocation of PyUnicode objects

2009-06-03 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, so the extra pointer is a feature. I guess a compromise would be to keep the extra indirection but make it point into the same object in the base class. Thinking about how memory caching in modern CPUs work, this would probably be quite fast but it

[issue1943] improved allocation of PyUnicode objects

2009-06-03 Thread Guido van Rossum
Guido van Rossum added the comment: On Wed, Jun 3, 2009 at 1:41 PM, Antoine Pitrou wrote: > Apart from the example Marc-André just posted (and which is a 0.0.1 > proof of concept he apparently just wrote), the number of users is, > AFAICT, zero. IIUC Marc-Andre extracted that from

[issue1943] improved allocation of PyUnicode objects

2009-06-05 Thread Guido van Rossum
Guido van Rossum added the comment: On Fri, Jun 5, 2009 at 4:06 AM, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > Antoine Pitrou wrote: >> Antoine Pitrou added the comment: >> >> Raymond suggested the patch be committed in 3.1, s

[issue6137] Make pickle generated by Python 3.x compatible with 2.x and vice-versa.

2009-06-09 Thread Guido van Rossum
Guido van Rossum added the comment: I'm not on IRC. What exactly is your question for me? What is Raymond's view? -- ___ Python tracker <http://bugs.python.

[issue6137] Make pickle generated by Python 3.x compatible with 2.x and vice-versa.

2009-06-09 Thread Guido van Rossum
Guido van Rossum added the comment: Ah. How about only doing back-translation when protocol=2 (or lower) is explicitly selected? I don't much like that 3.0 will be to read pickles written by 3.1 with the default protocol (i.e. 3), but I don't mind breaking protocol 2, since that

[issue6137] Make pickle generated by Python 3.x compatible with 2.x and vice-versa.

2009-06-09 Thread Guido van Rossum
Guido van Rossum added the comment: On Tue, Jun 9, 2009 at 12:16 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> Ah. How about only doing back-translation when protocol=2 (or lower) >> is explicitly selected? > > Well, this is exactly what is

[issue8077] cgi handling of POSTed files is broken

2010-06-09 Thread Guido van Rossum
Guido van Rossum added the comment: The example works for me if I make this change: --- Lib/cgi.py (revision 81862) +++ Lib/cgi.py (working copy) @@ -608,7 +608,7 @@ parser = email.parser.FeedParser() # Create bogus content-type header for proper multipart parsing

[issue8977] Globalize lonely augmented assignment

2010-06-11 Thread Guido van Rossum
Guido van Rossum added the comment: It's not that much more evil than this: A = [] def f(x): A.append(x) print(A) # [] f(4) print(A) # [4] I've always thought this is a borderline case. -- nosy: +gvanrossum ___ Python trac

[issue8977] Globalize lonely augmented assignment

2010-06-11 Thread Guido van Rossum
Guido van Rossum added the comment: Because the latter (n += 1) is more fundamental, since it uses integers (arguably the most fundamental type). This is why we've never done it before. -- ___ Python tracker <http://bugs.python.org/i

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2010-06-16 Thread Guido van Rossum
Guido van Rossum added the comment: Could this be related to issue 8077? -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/issue4953> ___ ___ Pytho

[issue8077] cgi handling of POSTed files is broken

2010-06-16 Thread Guido van Rossum
Guido van Rossum added the comment: Could this be related to issue 4953? -- ___ Python tracker <http://bugs.python.org/issue8077> ___ ___ Python-bugs-list mailin

[issue9083] At least some Tools utilities are still Python 2

2010-06-25 Thread Guido van Rossum
Guido van Rossum added the comment: Webchecker is so old, it should be deleted. -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/issue9

[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception.

2010-07-21 Thread Guido van Rossum
Guido van Rossum added the comment: On Wed, Jul 21, 2010 at 3:32 AM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > Discussion has continued on pydev thread "mkdir -p in python". Some suggested > a new function. Others questioned the details o

[issue9226] erroneous behavior when creating classes inside a closure

2010-07-24 Thread Guido van Rossum
Guido van Rossum added the comment: Hm. This seems an old bug, probably introduced when closures where first introduced (2.1 ISTR, by Jeremy Hylton). Class scopes *do* behave differently from function scopes; outside a nested function, this should work: x = 1 class C(object): x = x assert

[issue9226] erroneous behavior when creating classes inside a closure

2010-07-24 Thread Guido van Rossum
Guido van Rossum added the comment: I meant, of course, assert C.x == 1 -- ___ Python tracker <http://bugs.python.org/issue9226> ___ ___ Python-bugs-list mailin

[issue9226] erroneous behavior when creating classes inside a closure

2010-07-24 Thread Guido van Rossum
Guido van Rossum added the comment: On Sat, Jul 24, 2010 at 3:21 PM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > Guido clarified: >> Class scopes *do* behave differently from function scopes; >> outside a nested function, this should work: &g

[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

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

[issue3173] external strftime for Python?

2010-07-28 Thread Guido van Rossum
Guido van Rossum added the comment: What about the licensing? That look like the BSD license *with* advertising clause... -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/issue3

[issue8743] set() operators don't work with collections.Set instances

2010-08-01 Thread Guido van Rossum
Guido van Rossum added the comment: No idea, I don't even know what collections.Set is. :-( -- assignee: gvanrossum -> ___ Python tracker <http://bugs.python.or

[issue9527] Add aware local time support to datetime module

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

[issue1647654] No obvious and correct way to get the time zone offset

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

[issue1142] code sample showing errors reading large files with py 2.5/3.0

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

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-08-08 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue8047> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4617] SyntaxError when free variable name is also an exception target

2010-08-08 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, please fix in 3.2, don't fix in 2.7. -- ___ Python tracker <http://bugs.python.org/issue4617> ___ ___ Python-bugs-l

[issue28773] typing.FrozenSet missing in documentation.

2016-11-23 Thread Guido van Rossum
Guido van Rossum added the comment: Ned: does the ban on non-critical commits to the 3.6 branch also apply to doc patches? -- nosy: +ned.deily ___ Python tracker <http://bugs.python.org/issue28

[issue28773] typing.FrozenSet missing in documentation.

2016-11-24 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! I pushed this into 3.5, then merged into 3.6 and default. Is that the right procedure still? -- resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python track

[issue28790] Error when using Generic and __slots__

2016-11-24 Thread Guido van Rossum
New submission from Guido van Rossum: Proxy for https://github.com/python/typing/issues/332 (issue) and https://github.com/python/typing/pull/334 (fix). """ from typing import Generic, TypeVar class C(Generic[TypeVar('T')]): __slots__ = ('potato',)

[issue28790] Error when using Generic and __slots__

2016-11-24 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: +levkivskyi ___ Python tracker <http://bugs.python.org/issue28790> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28777] Add asyncio.Queue __aiter__, __anext__ methods

2016-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: This should be an upstream PR first (GitHub.com/python/asyncio). Also, too late for 3.6. -- versions: -Python 3.5, Python 3.6 ___ Python tracker <http://bugs.python.org/issue28

[issue28777] Add asyncio.Queue __aiter__, __anext__ methods

2016-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: Also it's not clear that it's a good idea without more thought -- there's no way to end the loop on the producing side. -- ___ Python tracker <http://bugs.pyt

[issue28739] PEP 498: docstrings as f-strings

2016-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: I don't really care that much, but I personally think that it would be more consistent (and a simpler rule) if *no* f-string (not even ones without substitutions) were to be allowed as docstrings. In all other examples that Raymond shows it's the

[issue28739] PEP 498: docstrings as f-strings

2016-11-26 Thread Guido van Rossum
Guido van Rossum added the comment: OK, clearly the code that sets __doc__ is too closely tied to the generated code (or to the reduced AST used to generate code). I still think code that uses any of these is on thin ice and should expect to be broken in the future

[issue28739] PEP 498: docstrings as f-strings

2016-11-26 Thread Guido van Rossum
Guido van Rossum added the comment: I think such a patch is fine -- for 3.6.1. Also note that linking to the definition of "string literal" is insufficient, assuming we will want to continue supporting literal concatenation ( https://docs.python.org/3/reference/lexical_analysis.h

[issue28739] PEP 498: docstrings as f-strings

2016-11-26 Thread Guido van Rossum
Guido van Rossum added the comment: I was just noticing that the formal grammar in the reference manual first defines a single string literal and then separately describes concatenation. -- ___ Python tracker <http://bugs.python.org/issue28

[issue24469] Py2.x int free list can grow without bounds

2016-11-28 Thread Guido van Rossum
Guido van Rossum added the comment: OK, SGTM. -- ___ Python tracker <http://bugs.python.org/issue24469> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28790] Error when using Generic and __slots__

2016-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: OK, having thought about it some more, given that you don't seem to object too strenuously, I'm going to merge the fix. May it be the last one! -- ___ Python tracker <http://bugs.python.o

[issue28790] Error when using Generic and __slots__

2016-11-29 Thread Guido van Rossum
Changes by Guido van Rossum : -- resolution: -> fixed stage: -> commit review status: open -> closed type: -> behavior ___ Python tracker <http://bugs.python

[issue28836] Throw concurrent.futures.TimeoutError instead of concurrent.futures.__base.TimeoutError

2016-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: concurrent.futures.TimeoutError and concurrent.futures.__base.TimeoutError are the same class. So there is nothing to do here. -- resolution: -> rejected status: open -> closed ___ Python tracker

[issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore

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

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

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

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-12-07 Thread Guido van Rossum
Changes by Guido van Rossum : -- priority: deferred blocker -> normal ___ Python tracker <http://bugs.python.org/issue28339> ___ ___ Python-bugs-list mai

[issue28912] collections.abc.OrderedMapping

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

[issue28091] Document PEP 525

2016-12-09 Thread Guido van Rossum
Guido van Rossum added the comment: It sounds particularly confusing that an "[XXX] generator" is the function in one case and the object in the other case. There's of course also Nathaniel Smith's opinion that we should switch away from the term coroutine and call those

[issue28091] Document PEP 525

2016-12-09 Thread Guido van Rossum
Guido van Rossum added the comment: I think that most documentation uses "generator" to refer to both functions and objects. So whenever you want to be clear you have to write the long form. -- ___ Python tracker <http://bugs.python.o

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

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

[issue28942] await expressions in f-strings

2016-12-12 Thread Guido van Rossum
Guido van Rossum added the comment: I was going to say "no", but given that "yield" works, I think it is reasonable to allow "await" as well. (And what about "yield from"?) -- ___ Python tra

[issue28937] str.split(): remove empty strings when sep is not None

2016-12-12 Thread Guido van Rossum
Guido van Rossum added the comment: I like the proposal. I agree that filter(None, ...) is not discoverable (and has its own magic). So the proposal would be: prune=False -> empty strings stay, prune=True, empty strings are dropped, prune=None (default) use True if sep is None, Fa

[issue28937] str.split(): remove empty strings when sep is not None

2016-12-12 Thread Guido van Rossum
Guido van Rossum added the comment: > except the other way around Whoops. Indeed. So all's well here. > x.split(tuple(string.whitespace)) Yes, that's what I was after. (But it can be a separate PR.) -- ___ Python tracker <htt

[issue26110] Speedup method calls 1.2x

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

[issue28972] Document all "python -m" utilities

2016-12-17 Thread Guido van Rossum
Guido van Rossum added the comment: I'm neutral on this idea. I would much rather focus on making sure that the various modules (such as pdb or tarfile) which have useful command-line functionality document that clearly and uniformly, but as part of each module's library docs. I d

[issue29011] No entry Deque in typing.py

2016-12-19 Thread Guido van Rossum
Guido van Rossum added the comment: I don't recall exactly what happened here, but I think it was left out during formulation of PEP 484 because it's not an ABC. IIRC originally we only wanted to include builtins and ABCs. But we changed that subsequently to include e.g. Defau

[issue29002] typing.AnyStr doc is unclear about python2 unicode support

2017-01-07 Thread Guido van Rossum
Guido van Rossum added the comment: I agree that it would just be confusing if the Python 3 docs were to explain Python 2 specific things. Maybe this should be explained in the mypy docs (or maybe it's really a mypy bug). Can you open an issue there? -- nosy: +gvanrossum resol

[issue29246] typing.Union raises RecursionError when comparing Union to other type

2017-01-12 Thread Guido van Rossum
Changes by Guido van Rossum : -- assignee: -> levkivskyi nosy: +levkivskyi ___ Python tracker <http://bugs.python.org/issue29246> ___ ___ Python-bugs-list mai

[issue29271] Task.current_task(None) returns unexpected result

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

[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, maybe isinstance(t, Union) should actually be allowed? (Though isinstance(x, Union[int, str]) should not be!) After all we can write isinstance(t, Callable) as well, even though isinstance(x, Callable[[int], int]) is disallowed

[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, let me back-pedal a bit. The situation with Callable is murky, as e.g. isinstance(typing.Tuple[int, int], typing.Callable) returns True. Maybe we need to take a step back and look at the needs for code that wants to implement runtime type checking more

[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Guido van Rossum
Guido van Rossum added the comment: Maybe a proposal should be discussed as an addendum to PEP 484? Or would Mark Shannon reject that? On Sun, Jan 15, 2017 at 2:48 PM, Ivan Levkivskyi wrote: > > Ivan Levkivskyi added the comment: > > > Maybe we need to take a step back and lo

[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Guido van Rossum
Guido van Rossum added the comment: Posting to python-dev would probably cause more friction than a PR for the PEPs repo. But maybe the best way to do this is to use a third party module with a proposed API? E.g. typing_inspect. We could then iterate quickly on the design and implementation

[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Guido van Rossum
Guido van Rossum added the comment: I think it should be separate from mypy_extensions, since it's not even related to mypy. Regarding typing.re and typing.io, typing.inspect would be a typed version of the inspect module, so that's not quite the same. (Though I consider typing.re/i

[issue29262] Provide a way to check for *real* typing.Union instances

2017-01-15 Thread Guido van Rossum
Guido van Rossum added the comment: Up to you, but the latter might make it clearer that the two are to be kept in sync. -- ___ Python tracker <http://bugs.python.org/issue29

[issue29303] asyncio.Lock.acquire() does not always yield

2017-01-17 Thread Guido van Rossum
Guido van Rossum added the comment: Locks are not meant to have predictable behavior like that. They are meant to protect against concurrent access. If you want fairness you have to look elsewhere. -- ___ Python tracker <http://bugs.python.

[issue29303] asyncio.Lock.acquire() does not always yield

2017-01-17 Thread Guido van Rossum
Guido van Rossum added the comment: No, `yield from` (or, in Python 3.5+, `await`) is not meant to bound back to the scheduler. If the target is a coroutine that itself doesn't yield, it is a *feature* that the scheduler is bypassed. If you want to force a trip through the scheduler

[issue29246] typing.Union raises RecursionError when comparing Union to other type

2017-01-17 Thread Guido van Rossum
Guido van Rossum added the comment: Fixed, see http://bugs.python.org/issue28556#msg281317 New changeset 75c7bc2c1ad8 by Guido van Rossum in branch '3.5': Issue #28556: upstream improvements to docstrings and error messages by Ivan Levkivskyi (#331) https://hg.python.org/c

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2017-01-17 Thread Guido van Rossum
Guido van Rossum added the comment: @levkivskyi Do you want to attempt a better fix in tome for 3.6.1? -- ___ Python tracker <http://bugs.python.org/issue28

[issue29310] Document typing.NamedTuple default argument syntax

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

[issue29198] AsyncGenerator is missing from typing

2017-01-18 Thread Guido van Rossum
Guido van Rossum added the comment: So the changes to typing.py have been committed. Can someone commit the right doc patches? -- ___ Python tracker <http://bugs.python.org/issue29

[issue29316] Can we keep typing.py provisional for the duration of the Python 3.6 release cycle?

2017-01-18 Thread Guido van Rossum
New submission from Guido van Rossum: The 3.6 what's new (https://docs.python.org/3/whatsnew/3.6.html#whatsnew36-typing) claims typing.py is no longer provisional, but I don't think it's quite ready yet. There are a number of things that I'd like to merge into typing.py o

[issue29316] Keep typing.py provisional for the duration of the Python 3.6 release cycle

2017-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks everybody! We'll make typing.py provisional again for 3.6. @levkivskyi do you have the stomach to upload a patch here? -- title: Can we keep typing.py provisional for the duration of the Python 3.6 release cycle? -> Keep typing.py pro

[issue28635] Update What's New for 3.6

2017-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: Can this be closed (since 3.6 has been released)? Or is there still more you'd like to do specifically to complete this issue? -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/is

[issue29310] Document typing.NamedTuple default argument syntax

2017-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, I'm still sick. You may have to find another core dev to help you. -- ___ Python tracker <http://bugs.python.org/is

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-31 Thread Guido van Rossum
Guido van Rossum added the comment: Seems the combined patch doesn't include the tests. Nor does the most recent slot-wrappre-types.patch. Ivan, can you make a single truly combined patch and add a Misc/NEWS entry to it as well? Other than that this looks fine. Maybe we need to wait fo

[issue29407] Remove redundant ensure_future() calls in factorial example

2017-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: LGTM, and should be committed to 3.5 and merged upwards from there. And yes, it's time for the asyncio docs to converge on async/await everywhere, making `yield from` a footnoot to history. -- ___ Python tr

[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks Manuel and Ivan! -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue29344] sock_recv not detected a coroutine

2017-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: OP is correct. sock_recv(), sock_sendall(), sock_connect(), sock_accept() all are functions that return Futures. The docs are wrong, as are the docstrings in the code. -- versions: +Python 3.5, Python 3.7

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