[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-05 Thread Guido van Rossum
Guido van Rossum added the comment: [Barry] > I know the PEP defines TargetScopeError as a subclass of SyntaxError, but it > doesn't really explain why a subclass is necessary. I think seeing > "TargetScopeError" will be a head scratcher. Why not just SyntaxError

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-05 Thread Guido van Rossum
Guido van Rossum added the comment: But we don't do that with any of the other (many) errors detected by later passes of the compiler. Those report dozens of SyntaxErrors, with good descriptive messages. Users can search the web for those messages too. Also, I doubt that many people

[issue37757] TargetScopeError not raised for comprehension scope conflict

2019-08-06 Thread Guido van Rossum
Guido van Rossum added the comment: If you and Nick both feel strongly about this please take it to python-dev, I'm sure we'll get closure quickly there. -- ___ Python tracker <https://bugs.python.o

[issue37496] Support annotations in signature strings.

2019-08-07 Thread Guido van Rossum
Guido van Rossum added the comment: > 1. Should I create a new function in the `ast` module that exposes that C > function in Python in order to use it in `Lib/inspect.py`? > 2. Would it be better to just re-use the _AST to string_ implementation in > `Tools/unparse.py`? I would

[issue16837] Number ABC can be instantiated

2019-08-10 Thread Guido van Rossum
Guido van Rossum added the comment: Let's not do this. We've survived this long. -- ___ Python tracker <https://bugs.python.org/issue16837> ___ ___

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-10 Thread Guido van Rossum
Guido van Rossum added the comment: That’s correct. Mind making a PR? -- ___ Python tracker <https://bugs.python.org/issue37814> ___ ___ Python-bugs-list mailin

[issue37808] Deprecate unbound super methods

2019-08-11 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue37808> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37814] typing module: empty tuple syntax is undocumented

2019-08-11 Thread Guido van Rossum
Guido van Rossum added the comment: > What is better, Tuple[()] or Literal[()]? In this context, Tuple[()] is better, as the discussion is about how to write the type of various tuples. Tuple[()] is just the edge case of the type of the empty tuple. Josh, please sign the CLA and adjust

[issue37819] as_integer_ratio() missing from fractions.Fraction()

2019-08-11 Thread Guido van Rossum
Guido van Rossum added the comment: Let's continue on the current path -- add Fraction.as_integer_ratio(). Note that as_integer_ratio() is not part of the Numbers API, it is an optional protocol. You can count me out for Jeroen's __ratio_

[issue37808] Deprecate unbound super methods

2019-08-11 Thread Guido van Rossum
Guido van Rossum added the comment: I don't have time to review this, sorry. -- ___ Python tracker <https://bugs.python.org/issue37808> ___ ___ Pytho

[issue1360] Queue.get() can't be interrupted with Ctrl-C unless timed out

2017-06-13 Thread Guido van Rossum
Guido van Rossum added the comment: This issue is closed, but you can open a new issue to flag this in the docs. -- ___ Python tracker <http://bugs.python.org/issue1

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

2017-06-13 Thread Guido van Rossum
Guido van Rossum added the comment: Skimming the issue I can't even figure out what the task is -- Cheryl, I suppose you have, could you post a brief summary of your plan here? -- ___ Python tracker <http://bugs.python.org/is

[issue17960] Clarify the required behaviour of locals()

2017-06-26 Thread Guido van Rossum
Guido van Rossum added the comment: I've tried thinking though a few scenarios, and I think I'm +1 (or at least +0 or +0.5) on the proposed change to locals(), and of course I'm happy that we're going to specify its behavior better. -- __

[issue30763] There is functionality bug in linecache library.

2017-06-26 Thread Guido van Rossum
Guido van Rossum added the comment: You nailed it, Emily! This is not a bug (though the docs could be a bit more upfront about this -- just having "cache" in the name doesn't cut it these days :-). If either Serhiy or Raymond agrees they can close the issue (we won't wait

[issue30763] There is functionality bug in linecache library.

2017-06-27 Thread Guido van Rossum
Changes by Guido van Rossum : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue21998] asyncio: support fork

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

[issue17960] Clarify the required behaviour of locals()

2017-06-29 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, I think a short PEP would be helpful here. -- ___ Python tracker <http://bugs.python.org/issue17960> ___ ___ Python-bug

[issue11798] Test cases not garbage collected after run

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

[issue30847] asyncio: selector_events: add_urgent() for urgent data to read, 3rd argument of select.select()

2017-07-05 Thread Guido van Rossum
Guido van Rossum added the comment: How do you define "urgent data"? Is this just the third category of select(), Read, Write, Exceptional? I don't know if that should be considered urgent, it's just "out of band" IIRC. -- ___

[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-05 Thread Guido van Rossum
Guido van Rossum added the comment: Do you have a specific use case where it's important to access the remaining data? ISTM that this is happening when the connection is lost and then it shouldn't matter how much of the data you read or not -- the connection was broken before the r

[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-05 Thread Guido van Rossum
Guido van Rossum added the comment: The Redis example doesn't sound valid to me, as (IIUC) it closes the connection immediately? -- ___ Python tracker <http://bugs.python.org/is

[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-06 Thread Guido van Rossum
Guido van Rossum added the comment: We seem to have a failure to communicate. I'm sure your example code "works", but you're not showing what's in the data it receives that is important for the app to read (your example just prints it). And surely your app sho

[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-07 Thread Guido van Rossum
Guido van Rossum added the comment: But half closed state is already supported. On Jul 7, 2017 2:37 AM, "Dima Tisnek" wrote: > > Dima Tisnek added the comment: > > It seems Guido sets a higher bar on the proposed change. > > @pfreixes, if you can show that this c

[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-07 Thread Guido van Rossum
Guido van Rossum added the comment: IMO you haven't demonstrated a need, you are just complaining that you don't like it. -- ___ Python tracker <http://bugs.python.o

[issue27364] Deprecate invalid escape sequences in str/bytes

2017-07-10 Thread Guido van Rossum
Guido van Rossum added the comment: Yes. -- ___ Python tracker <http://bugs.python.org/issue27364> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30921] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Guido van Rossum
Guido van Rossum added the comment: Please find a list like python-list (comp.lang.python) to ask for help with your problem. Also please stop adding people to the nosy list. -- stage: -> resolved status: open -> closed ___ Python tracker

[issue30922] Process in not get killed using subprocess.call() in python thread

2017-07-13 Thread Guido van Rossum
Guido van Rossum added the comment: So top ope in tickets about this issue or you will be banned. On Jul 13, 2017 8:46 AM, "Sanket" wrote: > > New submission from Sanket: > > import threading > import subprocess > > def B(): > while True: >

[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-07-17 Thread Guido van Rossum
Guido van Rossum added the comment: There's no need. You seem to have accidentally shown a use case for getting the buffered data -- it can contain an error message explaining why the connection was closed. -- ___ Python tracker

[issue28638] Optimize namedtuple creation

2017-07-17 Thread Guido van Rossum
Guido van Rossum added the comment: On python-dev Raymond agreed to reopen the issue and consider Jelle's implementation (https://github.com/python/cpython/pull/2736). -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/is

[issue28638] Optimize namedtuple creation

2017-07-17 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks Raymond and Jelle. The bar for a reimplementation in C is much higher (though we'll have to agree that Jelle's version is fast enough before we reject it). The bar for backporting this to 3.6 is much higher as well and I think it&#x

[issue28638] Optimize namedtuple creation

2017-07-19 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, it looks like the standard `_pickle` and `pickle` solution would work here. -- ___ Python tracker <http://bugs.python.org/issue28

[issue25988] collections.abc.Indexable

2017-07-20 Thread Guido van Rossum
Guido van Rossum added the comment: At least one use of Indexable (by whatever name, but this rolls off the tongue the easiest) would be the metaclass in typing.py that allows one to write List[int] -- there's no containter here! The "drowning out" seems purely subjective --

[issue25988] collections.abc.Indexable

2017-07-21 Thread Guido van Rossum
Guido van Rossum added the comment: Yes we will need a deprecation period for this starting with 3.7. It's fine not to import names newly added to collections.abc in 3.7 (i.e. collections would have to explicitly import everything that it got via * i

[issue25988] collections.abc.Indexable

2017-07-21 Thread Guido van Rossum
Guido van Rossum added the comment: The copying approach likely won't work because there will be code that uses isinstance(x, collections.abc.Sequence) and other code that uses isinstance(x, collections.Sequence) and they'll expect both

[issue25988] collections.abc.Indexable

2017-07-22 Thread Guido van Rossum
Guido van Rossum added the comment: I think it's not worth the hack that Serhiy suggests. But we should make some noise around this change in the 3.7 announcement. -- ___ Python tracker <http://bugs.python.org/is

[issue30985] Set closing variable in asyncore at close

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

[issue28777] Add asyncio.Queue __aiter__, __anext__ methods

2017-07-25 Thread Guido van Rossum
Guido van Rossum added the comment: > > there's no way to end the loop on the producing side. > I might be missing something, but can't something similar be said of > queue.get()? That's my point, actually. If you are wrapping the Queue protocol with __aiter__

[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2017-07-26 Thread Guido van Rossum
Guido van Rossum added the comment: Alexander, can you summarize the status of this issue? Maybe we can move forward for 3.7? -- ___ Python tracker <http://bugs.python.org/issue24

[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2017-07-26 Thread Guido van Rossum
Guido van Rossum added the comment: I haven't reviewed the code, but given Tim Peters' response (which matches my own gut feeling) we should just allow/support tz offsets with second-precision (and deal with the default formatting issues in a backwards compatible way, of course)

[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2017-07-26 Thread Guido van Rossum
Guido van Rossum added the comment: Please do! I have no opinion on %::z but maybe you can find inspiration in the Zen of Python. :-) -- ___ Python tracker <http://bugs.python.org/issue24

[issue28777] Add asyncio.Queue __aiter__, __anext__ methods

2017-08-03 Thread Guido van Rossum
Guido van Rossum added the comment: So that's an infinite loop right? -- ___ Python tracker <http://bugs.python.org/issue28777> ___ ___ Python-bugs-list m

[issue31129] RawConfigParser.items() is unusual in taking arguments

2017-08-06 Thread Guido van Rossum
Guido van Rossum added the comment: I think the proposed change is not worth it. Developments in type checking (in particular overloading) make it unambiguous what the return type will be from just a static inspection of the call site. (Given that the _UNSET value is intended to be private

[issue31129] RawConfigParser.items() is unusual in taking arguments

2017-08-14 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think this is worth it. -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <http://bugs.pyth

[issue28777] Add asyncio.Queue __aiter__, __anext__ methods

2017-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: Let's not do this. -- resolution: -> rejected stage: test needed -> resolved status: open -> closed ___ Python tracker <http://bugs.pyth

[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: Given the date from that comment I assume that I told Raymond this during the 2016 core sprint. I can't recall that conversation but I am still pretty worried about using an RLock. (What if someone slightly more insane decides to call get() from inside

[issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv

2017-08-22 Thread Guido van Rossum
Guido van Rossum added the comment: Before I spend more time reviewing your patch, can you please explain what you mean by "sphinx fails to find these"? Is there a particular dead link on docs.python.org or a specific query you typed in the search box that failed to find the def

[issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv

2017-08-22 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, I am a little closer to understanding now. > once intersphinx looks at the Tuple during documentation generation it > deduces it actually is of type class How does intersphinx deduce this? Also, does it run when we generate the Python docs, o

[issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv

2017-08-22 Thread Guido van Rossum
Guido van Rossum added the comment: OK, I think Sphinx is way too complicated for its own good, and it's arguably not the fault of Python's documentation that this doesn't work for you. I would like to close this issue as "won't fix", except... in a sense Tuple

[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-09-02 Thread Guido van Rossum
Guido van Rossum added the comment: Agreed; the Queue class has a bunch of rarely used functionality rolled in... Why was task management ever added? -- ___ Python tracker <http://bugs.python.org/issue14

[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-09-03 Thread Guido van Rossum
Guido van Rossum added the comment: Oh well. While it is undoubtedly useful I wish we had had more experience and factored the API differently. Ditto for the maxsize=N feature. So, while it's not too late, perhaps we should indeed follow Antoine's advice and implement a different

[issue31333] Implement ABCMeta in C

2017-09-04 Thread Guido van Rossum
Guido van Rossum added the comment: I've heard many anecdotal complaints about the lack of speed of ABCs. Even if it doesn't affect core Python startup, it does affect startup of apps, and if people are afraid to use them because of this, it's reasonable to try to do som

[issue26858] setting SO_REUSEPORT fails

2017-09-16 Thread Guido van Rossum
Guido van Rossum added the comment: Can't you just submit a PR? It's so easy now! -- ___ Python tracker <https://bugs.python.org/issue26858> ___ ___

[issue13224] Change str(x) to return only the qualname for some types

2017-09-18 Thread Guido van Rossum
Guido van Rossum added the comment: For modules, __name__ is the fully-qualified name, and that's fine. But for classes and functions __name__ is just the "given name" from the syntax (whatever came after 'def' or 'class') and that's not fine -- for anyt

[issue13224] Change str(x) to return only the qualname for some types

2017-09-19 Thread Guido van Rossum
Guido van Rossum added the comment: Given Nick's feedback (and imagining what this would do to some codebases I know) I think this idea is dead, sadly. A helper function just doesn't give enough value, so let's not pursue that (it's easy to write the helper you want, it

[issue13224] Change str(x) to return only the qualname for some types

2017-09-19 Thread Guido van Rossum
Guido van Rossum added the comment: And thanks for working it through! It was a valuable exercise. -- ___ Python tracker <https://bugs.python.org/issue13

[issue31530] [2.7] Python 2.7 readahead feature of file objects is not thread safe

2017-09-20 Thread Guido van Rossum
Guido van Rossum added the comment: @benjamin can you post your patch as a PR so you'll get credit for it? -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/is

[issue31530] [2.7] Python 2.7 readahead feature of file objects is not thread safe

2017-09-20 Thread Guido van Rossum
Guido van Rossum added the comment: > Why not simply document the fact that read ahead in Python 2.7 > is not thread-safe and leave it at that ? Program bugs should not crash the interpreter. (ctypes excepted.) -- ___ Python tracker

[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-21 Thread Guido van Rossum
Guido van Rossum added the comment: I'm afraid I no longer have all the details of this design in my head, and I have no idea what the fix does (and no time to read up on everything). The OP says "If you do not await gather" -- what happens if you *do* await it? Do the tasks

[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-22 Thread Guido van Rossum
Guido van Rossum added the comment: > if you change run_forever with run_until_complete, then behavior changes: > success_coro(5) will not be executed Oh, that's a red herring. The reason is that the event loop stops when you use run_complete(), but the execution of success_coro(

[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-11-20 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue34995> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35341] Add generic version of OrderedDict to typing module

2018-11-28 Thread Guido van Rossum
Guido van Rossum added the comment: Given that this is in collections, I don't object. Ivan, what do you say? -- ___ Python tracker <https://bugs.python.org/is

[issue35358] avoid '-' in importlib.import_module and builtins.__import__

2018-11-30 Thread Guido van Rossum
Guido van Rossum added the comment: Do not change this. I'd rather see it documented that importlib can import any name as long as it doesn't contain a dot, slash or backslash. (Clearly the fact that Django loads it is an additional argument that this should be supported, not

[issue34850] Emit a syntax warning for "is" with a literal

2018-11-30 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue34850> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32417] fromutc does not respect datetime subclasses

2018-12-07 Thread Guido van Rossum
Guido van Rossum added the comment: What's the use case for subclassing DateTime? These classes were not designed with subclassing as a use case in mind. -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/is

[issue32417] fromutc does not respect datetime subclasses

2018-12-07 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue32417> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32417] fromutc does not respect datetime subclasses

2018-12-07 Thread Guido van Rossum
Guido van Rossum added the comment: OK. -- ___ Python tracker <https://bugs.python.org/issue32417> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23864] issubclass without registration only works for "one-trick pony" collections ABCs.

2018-12-09 Thread Guido van Rossum
Guido van Rossum added the comment: No, I consider this is a documentation problem. I don't recall why the docs say that (I don't even know if they still say that or whether Martijn misread them), but IMO this should not be changed. --

[issue16516] argparse types (and actions) must be hashable

2018-12-11 Thread Guido van Rossum
Guido van Rossum added the comment: Luna and I talked a bit about this offline and we decided not to merge the PR (nor the original patch, which is the same). Instead Luna will add a note to the docs explaining the caveat. -- nosy: +gvanrossum

[issue16516] argparse types (and actions) must be hashable

2018-12-16 Thread Guido van Rossum
Guido van Rossum added the comment: Luna discovered that has actually been fixed in 3.8 (i.e. the master branch), by making {}.get hashable. So I'm closing this as fixed. -- resolution: -> fixed stage: patch review -> resolved status: ope

[issue35517] selector.EpollSelector: add new parameter to support EPOLLEXCLUSIVE

2018-12-17 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue35517> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2018-12-18 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue29406> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17561] Add socket.create_server_sock() convenience function

2018-12-18 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue17561> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23057] [Windows] asyncio: support signal handlers on Windows (feature request)

2018-12-30 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue23057> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35651] PEP 257 (active) references PEP 258 (rejected) as if it were active

2019-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: A rejected PEP still exists in perpetuity, and can still be used as a reference. Also, the reason for PEP 258's rejection is not that it is invalid, but that it's not slated for stdlib inclusion. So I think that the reference is still useful, a

[issue35672] Error on divide

2019-01-07 Thread Guido van Rossum
Guido van Rossum added the comment: For reference, the OP reported the issue initially at https://github.com/python/psf-infra-meta/issues/17 (but it was closed because that's not the right tracker). The y1y2y3y4 etc. are multiplications (mangled by not quoting the code in GitHub and

[issue35712] Make NotImplemented unusable in boolean context

2019-01-11 Thread Guido van Rossum
Guido van Rossum added the comment: I agree. On Thu, Jan 10, 2019 at 11:24 PM Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > This is a common mistake. Even the default implementation of object.__ne__ > had a bug, fixed only 4 years ago in issue21408. The

[issue35766] Merge typed_ast back into CPython

2019-01-17 Thread Guido van Rossum
New submission from Guido van Rossum : (This started at https://discuss.python.org/t/merge-typed-ast-back-into-cpython/377. It's somewhat related to https://bugs.python.org/issue7.) I now have a thorough understanding of what typed_ast does, and I think it would be straightforwa

[issue35766] Merge typed_ast back into CPython

2019-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: You’d be surprised how tenacious old versions are. Anywa, I am working on this on my copious spare time — you can follow my progress at https://github.com/gvanrossum/cpython/tree/ast-type-comments?files=1

[issue24119] Carry comments with the AST

2019-01-19 Thread Guido van Rossum
Guido van Rossum added the comment: See also issue35766. -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue24119> ___ ___ Python-bugs-list m

[issue35766] Merge typed_ast back into CPython

2019-01-21 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch, patch pull_requests: +11427, 11428 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35766] Merge typed_ast back into CPython

2019-01-21 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +11427 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35766] Merge typed_ast back into CPython

2019-01-21 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch, patch, patch pull_requests: +11427, 11428, 11429 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35806] typing module adds objects to sys.modules that don't look like modules

2019-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: It's been a somewhat well-known idiom for modules to replace themselves in sys.modules with an object that implements some special behaviors (e.g. dynamic loading). This "just works" and AFAIK people have been doing this for ages. Typical

[issue35806] typing module adds objects to sys.modules that don't look like modules

2019-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: OK, I don't see a bug here. The docs for sys.modules are pretty vague -- I don't believe they imply that all values in sys.modules must have every attribute of a Module object. -- resolution: -> wont fix stage: test needed ->

[issue35808] Let's retire pgen

2019-01-22 Thread Guido van Rossum
New submission from Guido van Rossum : Pgen is literally the oldest piece of technology in the CPython repo -- it was the first thing I wrote for Python over 29 years ago. It's not aged well, and building it requires various #if[n]def PGEN hacks in other parts of the code; it also de

[issue15248] Better explain "TypeError: 'tuple' object is not callable"

2019-01-24 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue15248> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35224] PEP 572: Assignment Expressions

2019-01-24 Thread Guido van Rossum
Guido van Rossum added the comment: This is huge! I do recall there are some minor edge cases where the implementation currently doesn't match the PEP. Could you summarize those here, and add your recommendation (e.g. change the PEP, fix the code, wait and see) with motiv

[issue35766] Merge typed_ast back into CPython

2019-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: The PR is ready for reviews now. -- ___ Python tracker <https://bugs.python.org/issue35766> ___ ___ Python-bugs-list mailin

[issue35806] typing module adds objects to sys.modules that don't look like modules

2019-01-27 Thread Guido van Rossum
Guido van Rossum added the comment: Option 2 sounds best. I am also not against adding __spec__ but I think we should support the idiom regardless, and I don’t consider this a bug in the typing module — at best there’s a slight improvement. On Sun, Jan 27, 2019 at 6:50 AM Nick Coghlan wrote

[issue35808] Let's retire pgen

2019-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: @eamanu, feel free to submit a PR. I won't be available to guide you through the steps; there are other forums e.g. Zulip. -- ___ Python tracker <https://bugs.python.org/is

[issue35806] typing module adds objects to sys.modules that don't look like modules

2019-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! -- ___ Python tracker <https://bugs.python.org/issue35806> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35766] Merge typed_ast back into CPython

2019-01-28 Thread Guido van Rossum
Guido van Rossum added the comment: Also the tests now all pass; for now I am happy with the solution I found for the indentation error (see https://github.com/python/cpython/pull/11645#issuecomment-456627216). -- ___ Python tracker <ht

[issue35766] Merge typed_ast back into CPython

2019-01-31 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +11573 ___ Python tracker <https://bugs.python.org/issue35766> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35766] Merge typed_ast back into CPython

2019-01-31 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +11573, 11574 ___ Python tracker <https://bugs.python.org/issue35766> ___ ___ Python-bugs-list mailing list Unsub

[issue35766] Merge typed_ast back into CPython

2019-01-31 Thread Guido van Rossum
Change by Guido van Rossum : -- pull_requests: +11573, 11574, 11575 ___ Python tracker <https://bugs.python.org/issue35766> ___ ___ Python-bugs-list mailin

[issue35877] parenthesis is mandatory for named expressions in while statement

2019-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: Emily, I think this would be as simple as making a tiny change to Grammar/Grammar and running make regen-grammar. Can you take care of that? -- assignee: -> emilyemorehouse stage: -> needs patch ___

[issue35877] parenthesis is mandatory for named expressions in while statement

2019-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, Karthikeyan! Can you submit that as a PR? -- ___ Python tracker <https://bugs.python.org/issue35877> ___ ___ Pytho

[issue35879] test_type_comments leaks references

2019-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: I can confirm it, but I don't understand it yet. Somehow the type_comment fields get an extra reference count and are never freed. How are other string fields handled? -- ___ Python tracker &

[issue35879] test_type_comments leaks references

2019-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: OK, let me make a PR, I found another leak for type:ignore. On Fri, Feb 1, 2019 at 9:22 AM Pablo Galindo Salgado wrote: > > Pablo Galindo Salgado added the comment: > > The extra referenced happen here in Python-ast.c : > > value

[issue35879] test_type_comments leaks references

2019-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: > ast2obj_string increments it once and the setattr does it again and then > there is only one Py_DECREF. Actually I don't understand how this is the leak. Adding another Py_DECREF(value) causes an immediate crash. I've been trying to fol

<    29   30   31   32   33   34   35   36   37   38   >