[issue39564] Parsed expression has wrong col_offset when concatenating f-strings

2020-02-05 Thread Guido van Rossum
Guido van Rossum added the comment: Note that this is somewhat urgent for oefen, since we strive to match the produced AST exactly. -- --Guido (mobile) -- ___ Python tracker <https://bugs.python.org/issue39

[issue39564] Parsed expression has wrong col_offset when concatenating f-strings

2020-02-05 Thread Guido van Rossum
Guido van Rossum added the comment: This is indeed a duplicate of issue35212 (the second message there also shows a problem with implicit f-string concatenation). There's not much information in issue34364 (just a merged PR, and a mention of a PR of yours from 2 years ago that appar

[issue39564] Parsed expression has wrong col_offset when concatenating f-strings

2020-02-05 Thread Guido van Rossum
Guido van Rossum added the comment: Wow. Do you still have a branch with that non-working patch? Maybe there are some ideas that can be salvaged. I'm wondering if maybe we're better leaving f-strings alone? The current code is quite voluminous, but it looks as if by the t

[issue39491] Import PEP 593 (Flexible function and variable annotations) support already implemented in typing_extensions

2020-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 38ac805fa30870e2d093e52a900e3b34 by Jakub Stasiak in branch 'master': bpo-39491: Mention Annotated in get_origin() docstring (GH-18379) https://github.com/python/cpython/commit/38ac805fa30870e2d093e52a90

[issue39579] Attribute node in a decorator has wrong end_col_offset

2020-02-07 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset d2e1098641f98594702ef29049c3c4a3f394786f by Lysandros Nikolaou in branch 'master': bpo-39579: Fix Attribute end_col_offset to point at the current node (GH-18405) https://github.com/python/cpyt

[issue39579] Attribute node in a decorator has wrong end_col_offset

2020-02-07 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue16776] Document PyCFunction_New and PyCFunction_NewEx functions

2020-02-10 Thread Guido van Rossum
Guido van Rossum added the comment: I'm sprinting with Roger. Based on Petr's comment I am closing this issue -- if we should not draw attention to this function let's not document it. @svetlov if you still think it should be documented, can you suggest where the document

[issue39501] gettext's default localedir does not match documentation

2020-02-10 Thread Guido van Rossum
Guido van Rossum added the comment: Fixed by Carl-y in PR 18435, PR 18440, PR 18439. (Sorry, those commits were attributed to issue3950 by mistake.) -- nosy: +gvanrossum resolution: -> fixed stage: -> resolved status: open -> closed _

[issue3950] turtle.py: bug in TurtleScreenBase._drawimage

2020-02-10 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, those PRs were for issue39501. -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue3950> ___ ___

[issue11664] Add patch method to unittest.TestCase

2020-02-10 Thread Guido van Rossum
Guido van Rossum added the comment: Given the two recent -1 responses let's close this. -- nosy: +gvanrossum resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.pyth

[issue13826] Having a shlex example in the subprocess.Popen docs is confusing

2020-02-10 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38374] Remove weakref.ReferenceError entry from documentation

2020-02-10 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39474] col_offset for parenthesized expressions looks weird

2020-02-11 Thread Guido van Rossum
Guido van Rossum added the comment: This is also a 3.8 issue. We discovered this with pegen, and would love to see it fixed. -- nosy: +gvanrossum versions: +Python 3.8 ___ Python tracker <https://bugs.python.org/issue39

[issue39474] col_offset for parenthesized expressions looks weird

2020-02-12 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39627] Fix TypedDict totality check for inherited keys

2020-02-13 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 10e87e5ef4c1b4fb8415d9ddc362e2591f2f0b6c by Vlad Emelianov in branch 'master': bpo-39627: Fix TypedDict totality check for inherited keys (#18503) https://github.com/python/cpython/commit/10e87e5ef4c1b4fb8415d9ddc362e2

[issue39627] Fix TypedDict totality check for inherited keys

2020-02-13 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39649] bdb.Bdb.format_stack_entry: checks for obsolete __args__

2020-02-16 Thread Guido van Rossum
Guido van Rossum added the comment: That seems to be a correct observation. @blueyed, do you want to submit a PR to gt rid of the redundant check? -- ___ Python tracker <https://bugs.python.org/issue39

[issue39645] Expand concurrent.futures.Future's public API

2020-02-16 Thread Guido van Rossum
Guido van Rossum added the comment: I'll leave it to Brian and/or Antoine to review this. Good luck! -- ___ Python tracker <https://bugs.python.org/is

[issue39674] Keep deprecated features in Python 3.9 to ease migration from Python 2.7, but remove in Python 3.10

2020-02-18 Thread Guido van Rossum
Guido van Rossum added the comment: Yes please. I have one exception. I f we manage to get the new parser (pegen) in, we have to remove the old parser module. -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue39

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-18 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +easy ___ Python tracker <https://bugs.python.org/issue39572> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-18 Thread Guido van Rossum
Guido van Rossum added the comment: There's no __total__ argument, but there is a __total__ attribute. There are also (new in 3.9) __required_keys__ and __total_keys__ attributes. Are you interested in submitting a PR with the needed doc ch

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-18 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset ab6423fe2de0ed5f8a0dc86a9c7070229326b0f0 by ananthan-123 in branch 'master': bpo-39572: Document ’total’ flag of TypedDict (GH-18554) https://github.com/python/cpython/commit/ab6423fe2de0ed5f8a0dc86a9c7070

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-18 Thread Guido van Rossum
Guido van Rossum added the comment: Separately, would you also be interested in writing docs for the `__total__` class attribute of TypedDict subclasses (3.8 and 3.9) and for the `__required_keys__` and `__total_keys__` attributes (only in 3.9)? (Sorry, there's no document you can

[issue39572] [typing] TypedDict's 'total' argument is undocumented

2020-02-19 Thread Guido van Rossum
Guido van Rossum added the comment: Go for it. Use the same bug number. On Wed, Feb 19, 2020 at 02:30 Ananthakrishnan wrote: > > Ananthakrishnan added the comment: > > yes,I'm interested in writing docs for the `__required_keys__` and > `__tota

[issue39707] Abstract property setter/deleter implementation not enforced.

2020-02-21 Thread Guido van Rossum
Guido van Rossum added the comment: I agree with Raymond here. This is a job for a static type checker like mypy. Closing. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bug

[issue17422] language reference should specify restrictions on class namespace

2020-02-22 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset fbe2e0bb8a7ee75d0f9d57682436dac7d69e202e by ananthan-123 in branch 'master': bpo-17422: Language reference should specify restrictions on class namespace (#18559) https://github.com/python/cpyt

[issue17422] language reference should specify restrictions on class namespace

2020-02-22 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39724] IDLE threading + stdout/stdin observed blocking behavior

2020-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: It sounds like either an old implementation restriction or an old misguided attempt at keeping the IDLE console clean. I’m with Tal, let’s fix it and make it more like regular Python. Thanks John for taking the time to report this so clearly

[issue39019] Missing class getitems in standard library classes

2020-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: Once PEP 585 is implemented these should be rolled back and replaced with that, right? -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue39

[issue39649] bdb.Bdb.format_stack_entry: checks for obsolete __args__

2020-02-23 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36144] Dictionary addition. (PEP 584)

2020-02-24 Thread Guido van Rossum
Guido van Rossum added the comment: PEP 584 has been approved by the Steering Council (at my recommendation). We will shortly begin landing PRs related to this. -- versions: +Python 3.9 -Python 3.8 ___ Python tracker <https://bugs.python.

[issue36144] Dictionary addition. (PEP 584)

2020-02-24 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset eb8ac57af26c4eb96a8230eba7492ce5ceef7886 by Brandt Bucher in branch 'master': bpo-36144: Dictionary Union (PEP 584) (#12088) https://github.com/python/cpython/commit/eb8ac57af26c4eb96a8230eba7492c

[issue36144] Dictionary addition. (PEP 584)

2020-02-24 Thread Guido van Rossum
Guido van Rossum added the comment: While the main code has been merged now, I propose to keep this issue open until some other things have happened: - Documentation - Add | operators to some dict subclasses in the stdlib - (What else

[issue31539] asyncio.sleep may sleep less time then it should

2020-02-25 Thread Guido van Rossum
Guido van Rossum added the comment: Markus, your comment does not seem relevant to this issue. Maybe you meant to add it to a different issue, or you meant to create a new issue? -- ___ Python tracker <https://bugs.python.org/issue31

[issue36144] Dictionary addition. (PEP 584)

2020-02-25 Thread Guido van Rossum
Guido van Rossum added the comment: Yup, great plan. On Mon, Feb 24, 2020 at 22:29 Brandt Bucher wrote: > > Brandt Bucher added the comment: > > My current PR plans are: > > - Docs. This will include the dict docs and the whatsnew 3.9. I assume we > have no plans

[issue39763] Hang after fork due to logging trying to reacquire the module lock in an atfork() handler

2020-02-26 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum, pitrou ___ Python tracker <https://bugs.python.org/issue39763> ___ ___ Python-bugs-list mailing list Unsub

[issue36144] Dictionary union. (PEP 584)

2020-02-26 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset d0ca9bd93bb9d8d4aa9bbe939ca7fd54ac870c8f by Brandt Bucher in branch 'master': bpo-36144: Document PEP 584 (GH-18659) https://github.com/python/cpython/commit/d0ca9bd93bb9d8d4aa9bbe939ca7fd

[issue36144] Dictionary union. (PEP 584)

2020-02-26 Thread Guido van Rossum
Guido van Rossum added the comment: @Brandt: you have some more followup PRs planned right? Let's keep this issue open until you've done all of those. -- ___ Python tracker <https://bugs.python.o

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-02-26 Thread Guido van Rossum
Guido van Rossum added the comment: @Antoine: I can sort of see why you consider the small example a red herring, since it mixes threads and fork. Nevertheless, a simpler version (not using an executor) would probably work just fine? It's the edge cases where the mixture becomes expl

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-02-26 Thread Guido van Rossum
Guido van Rossum added the comment: When I run this on macOS, either with the bug, or with the buggy line commented out, I get the same hang. When I interrupt it, I get a separate traceback from each thread. Here's the full session: Parent 78918 Parent 78919 Child 78918 Parent 78920

[issue36144] Dictionary union. (PEP 584)

2020-02-26 Thread Guido van Rossum
Guido van Rossum added the comment: I think for `|=` the only choice is for it to be essentially an alias to `.update()`. So that means `cm |= other` becomes `cm.maps[0].update(other)`. For `|` we are breaking new ground and we could indeed make `cm | other` do something like `ChainMap

[issue36144] Dictionary union. (PEP 584)

2020-02-27 Thread Guido van Rossum
Guido van Rossum added the comment: I had just come to a different conclusion. Maybe ChainMap should just not grow `|` and `|=` operators? That way there can be no confusion. `dict() | ChainMap()` and `ChainMap() | dict()` will fail because ChainMap doesn't inherit from dict. (Note th

[issue36144] Dictionary union. (PEP 584)

2020-02-27 Thread Guido van Rossum
Guido van Rossum added the comment: OK, assuming `|=` gets the same semantics as update(), can you repeat once more (without motivation) what the specification for `cm | other` will be? -- ___ Python tracker <https://bugs.python.org/issue36

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-02-27 Thread Guido van Rossum
Guido van Rossum added the comment: The key is that os.execl() never returns. My understanding is that the hang happens when the child code returns (or raises) in the forked child process, because the semaphore state is cloned by the fork. There is no logging here. I just added some print

[issue36144] Dictionary union. (PEP 584)

2020-02-27 Thread Guido van Rossum
Guido van Rossum added the comment: OK, that makes sense, it works similar to ChainMap.copy(), which copies maps[0] and keeps links to the rest. So in particular `cm | {}` will do the same thing as cm.copy(). Im not sure if the dict(other) cast is the best way to go about it. Maybe this

[issue36144] Dictionary union. (PEP 584)

2020-02-27 Thread Guido van Rossum
Guido van Rossum added the comment: I didn't see your second reply, with `ChainMap(other, *cm.maps)`. I'm not so keen on that, because its special behavior can't be mimicked by `|=`. -- ___ Python tracker <https://bugs.pyt

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-02-27 Thread Guido van Rossum
Guido van Rossum added the comment: And you're sure that your "toy" example hangs in the at-fork handler. In that case I can't help you further, I don't have the resources or time to try out QNX. Your best bet is indeed to change distutils.spawn to not use fork+exe

[issue36144] Dictionary union. (PEP 584)

2020-02-27 Thread Guido van Rossum
Guido van Rossum added the comment: We already have somewhat different semantics of `|` for Counter, and hence I think it's fine to give it the most useful semantics for ChainMap given that class's special behavior. I think we've come up with the right solution there. Let&#x

[issue17422] language reference should specify restrictions on class namespace

2020-02-27 Thread Guido van Rossum
Guido van Rossum added the comment: As I mentioned in my response on the PR, dict *is* required to be ordered since 3.7. So I think it is okay as is. -- ___ Python tracker <https://bugs.python.org/issue17

[issue17422] language reference should specify restrictions on class namespace

2020-02-27 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue17422> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39806] different behavior between __ior__ and __or__ in dict made by PEP 584

2020-03-01 Thread Guido van Rossum
Guido van Rossum added the comment: This is as intended. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39645] Read approximate state of concurrent.futures.Future

2020-03-01 Thread Guido van Rossum
Guido van Rossum added the comment: I’m a bit disappointed, since it looks like this won’t allow implementing the OP’s classes without using private APIs. The debugging and loggin use cases aren’t very compelling to me. -- ___ Python tracker

[issue39645] Read approximate state of concurrent.futures.Future

2020-03-01 Thread Guido van Rossum
Guido van Rossum added the comment: But note my response to Antoine at the time, mentioning that implementing ‘as_completed()’ is impossible that way. Antoine then backtracked somewhat. -- ___ Python tracker <https://bugs.python.org/issue39

[issue39704] Disable code coverage

2020-03-02 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue39704> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-03-03 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset be501ca2419a91546dea85ef4f36945545458589 by Brandt Bucher in branch 'master': bpo-39702: Relax grammar restrictions on decorators (PEP 614) (GH-18570) https://github.com/python/cpython/commit/be501ca2419a91546dea85ef4f3694

[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-03-03 Thread Guido van Rossum
Guido van Rossum added the comment: I'm guessing there's some doc update that needs to happen now the code has landed. -- ___ Python tracker <https://bugs.python.o

[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-03-03 Thread Guido van Rossum
Guido van Rossum added the comment: Sounds good. If you feel like it you can submit a PR to the devguide, I'm sure Brett will merge it quickly... -- ___ Python tracker <https://bugs.python.org/is

[issue39866] get_type_hints raises inconsistent TypeError

2020-03-05 Thread Guido van Rossum
Guido van Rossum added the comment: It should definitely not return {} for objects without __annotations__ attributes -- get_type_hints(42) should raise TypeError. One could argue that get_type_hints(Bar()) incorrectly returns a dict, but we want to allow for some duck typing here, and

[issue39868] Stale Python Language Reference docs (no walrus).

2020-03-05 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 8bae21962bab2fac7630982abd73676b89930902 by Brandt Bucher in branch 'master': bpo-39868: Update Language Reference for PEP 572. (#18793) https://github.com/python/cpython/commit/8bae21962bab2fac7630982abd73676b89930902 -

[issue36144] Dictionary union. (PEP 584)

2020-03-06 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 57c9d1725689dde068a7fccaa7500772ecd16d2e by Brandt Bucher in branch 'master': bpo-36144: Implement defaultdict union (GH-18729) https://github.com/python/cpython/commit/57c9d1725689dde068a7fccaa75007

[issue36144] Dictionary union. (PEP 584)

2020-03-06 Thread Guido van Rossum
Guido van Rossum added the comment: Still waiting for ChainMap -- what else? -- ___ Python tracker <https://bugs.python.org/issue36144> ___ ___ Python-bug

[issue34822] Simplify AST for slices

2020-03-06 Thread Guido van Rossum
Guido van Rossum added the comment: Haven’t looked at the code but I welcome the simplification. -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue34

[issue39702] PEP 614: Relaxing Grammar Restrictions On Decorators

2020-03-07 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 8f130536926a30237b5297780d61ef4232e88577 by Brandt Bucher in branch 'master': bpo-39702: Update the Language Reference (PEP 614) (GH-18802) https://github.com/python/cpython/commit/8f130536926a30237b5297780d61ef

[issue36144] Dictionary union. (PEP 584)

2020-03-07 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 4663f66f3554dd8e2ec130e40f6abb3c6a514775 by Brandt Bucher in branch 'master': bpo-36144: Update MappingProxyType with PEP 584's operators (#18814) https://github.com/python/cpython/commit/4663f66f3554dd8e2ec130e40

[issue39852] IDLE: Goto should remove selection and update the status bar

2020-03-08 Thread Guido van Rossum
Guido van Rossum added the comment: I have a nit on the commit message used here (and also in issue 39885). *Please* don't use this style of commit message "IDLE context menu clears selection". That phrasing sounds like it is the description of a bug. Please always use a phra

[issue39852] IDLE: Goto should remove selection and update the status bar

2020-03-09 Thread Guido van Rossum
Guido van Rossum added the comment: I guess it's similar to the 'return' vs. 'returns' issue, but I feel much stronger about it here. I would have written that as "make the spam module more spammy". Just read a bunch of commits using e.g. `git log --onelin

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2020-03-09 Thread Guido van Rossum
Change by Guido van Rossum : -- versions: -Python 3.8 ___ Python tracker <https://bugs.python.org/issue12782> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2020-03-09 Thread Guido van Rossum
Guido van Rossum added the comment: If we introduce a PEG-based parser, we can do this without hacking the tokenizer. See https://github.com/gvanrossum/pegen/issues/229 I'd propose to aim for Python 3.10 (if the PEG parser happens). -- nosy: +gvanr

[issue34822] Simplify AST for slices

2020-03-09 Thread Guido van Rossum
Guido van Rossum added the comment: I'm going to review the actual code next. Regarding the omission of parentheses in various contexts, I am all for that, but I consider it a separate issue (as it only pertains to ast.unparse()). The fix in https://github.com/python/cpython/pull/

[issue39763] distutils.spawn should use subprocess (hang in parallel builds on QNX)

2020-03-10 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue39763> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24119] Carry comments with the AST

2020-03-12 Thread Guido van Rossum
Guido van Rossum added the comment: I propose to close this issue, since (as of Python 3.8) we now have ast.parse(source, type_comments=True). -- ___ Python tracker <https://bugs.python.org/issue24

[issue33337] Provide a supported Concrete Syntax Tree implementation in the standard library

2020-03-12 Thread Guido van Rossum
Guido van Rossum added the comment: If people are looking for a concrete CST that works now, maybe LibCST will work? https://github.com/Instagram/LibCST -- ___ Python tracker <https://bugs.python.org/issue33

[issue36144] Dictionary union. (PEP 584)

2020-03-13 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset d648ef10c5c7659ed3c9f34d5c751dc55e2c6007 by Charles Burkland in branch 'master': bpo-36144: Update os.environ and os.environb for PEP 584 (#18911) https://github.com/python/cpython/commit/d648ef10c5c7659ed3c9f34d5c751d

[issue36144] Dictionary union. (PEP 584)

2020-03-13 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 6d674a1bf456945eb758e85c11484a9f1494f2b4 by Brandt Bucher in branch 'master': bpo-36144: OrderedDict Union (PEP 584) (#18967) https://github.com/python/cpython/commit/6d674a1bf456945eb758e85c11484a

[issue36144] Dictionary union. (PEP 584)

2020-03-14 Thread Guido van Rossum
Guido van Rossum added the comment: I definitely think we should leave Shelf alone, it's a toy class from a different era. It makes sense to update the weak dicts; hopefully the | and |= operators can be implemented in terms of other, more primitive operations, so we will have assu

[issue39939] Add str methods to remove prefixes or suffixes

2020-03-15 Thread Guido van Rossum
Guido van Rossum added the comment: I stopped following the discussion at some point, but I think this is worth adding it -- I have seen this done over and over again, and apparently lots of other people have felt the need too. I think these names are fine, and about the best we can do

[issue40004] String comparison with dotted numerical values wrong

2020-03-18 Thread Guido van Rossum
Guido van Rossum added the comment: That's why for over a decade we've been recommending not to use string comparisons to compare versions. You have to parse the version and then compare the numeric values. -- resolution: -> not a bug stage: -> resolved status

[issue40004] String comparison with dotted numerical values wrong

2020-03-18 Thread Guido van Rossum
Guido van Rossum added the comment: That's a question for a user forum. There's some code in Lib/distutils/version.py. -- ___ Python tracker <https://bugs.python.o

[issue39939] Add str methods to remove prefixes or suffixes

2020-03-18 Thread Guido van Rossum
Guido van Rossum added the comment: Sounds good. -- ___ Python tracker <https://bugs.python.org/issue39939> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36144] Dictionary union. (PEP 584)

2020-03-23 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset f393b2c588559162dc2e77f8079a42e48558870a by Curtis Bucher in branch 'master': bpo-36144: Add PEP 584 operators to collections.ChainMap (#18832) https://github.com/python/cpython/commit/f393b2c588559162dc2e77f8079a42

[issue36144] Dictionary union. (PEP 584)

2020-03-23 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 25e580a73c163f472fdeb5489bebef85da21655c by Curtis Bucher in branch 'master': bpo-36144: Add union operators to WeakKeyDictionary (#19106) https://github.com/python/cpython/commit/25e580a73c163f472fdeb5489bebef

[issue36144] Dictionary union. (PEP 584)

2020-03-24 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 8f1ed21ecf57cc8b8095d9d1058af2b9b3ed0413 by Curtis Bucher in branch 'master': bpo-36144: Add union operators to WeakValueDictionary584 (#19127) https://github.com/python/cpython/commit/8f1ed21ecf57cc8b8095d9d1058af2

[issue36144] Dictionary union. (PEP 584)

2020-03-28 Thread Guido van Rossum
Guido van Rossum added the comment: I'm guessing this can be closed? -- stage: resolved -> patch review ___ Python tracker <https://bugs.python.org

[issue40098] dir() does not return the list of valid attributes for the object

2020-03-29 Thread Guido van Rossum
Guido van Rossum added the comment: I think you're going too far for some of these. > 1. metaclasses This is reasonable. > 2. __mro__ This is also reasonable. (I wonder if that part of the dir() implementation predates __mro__?) I'm not sure about honoring mro() in the m

[issue40098] dir() does not return the list of valid attributes for the object

2020-03-29 Thread Guido van Rossum
Guido van Rossum added the comment: FWIW it might be a good idea to look into how PEP 585 could benefit from the improvements to dir(). Currently, dir(list) and dir(list[int]) are quite different -- only the former shows list methods like append and insert. See https://github.com/gvanrossum

[issue36144] Dictionary union. (PEP 584)

2020-03-30 Thread Guido van Rossum
Guido van Rossum added the comment: I guess we should keep this open until Raymond Hettinger has given feedback on https://github.com/python/cpython/pull/18832 (where we have the option of changing to Brandt's proposal from https://github.com/python/cpython/pull/18832#issuecomment-5969

[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-03-30 Thread Guido van Rossum
Guido van Rossum added the comment: The SC approved the PEP! Łukasz, do you want to submit the PR to update the PEP status? We should get the implementation reviewed (e.g. by Serhiy) and land it before alpha 6 goes out, April 22 (we should aim for a week before at least

[issue40098] dir() does not return the list of valid attributes for the object

2020-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: > >>> t = list[int] > > A few years ago, I tried to explain to you that it's much more intuitive > to use builtin types instead of their alter egos from typing (List etc.) > for [] operator, you said it's not important. I

[issue40098] dir() does not return the list of valid attributes for the object

2020-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: For me, one of the most annoying things about dir() is that it gives all the dunders. There are many dunders that are just always there (__class__, mostly __dict__, __doc__, __name__ etc.). I wish it would just not give dunders that are inherited from

[issue40098] dir() does not return the list of valid attributes for the object

2020-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: Vedran, please stay on topic for this issue. FWIW I agree that it would be best if dir() showed only those dunders that are significant. E.g. __eq__ should only be shown if it is overridden by a subclass. Serhiy did you see my feedback on 3 and 4

[issue40098] dir() does not return the list of valid attributes for the object

2020-03-31 Thread Guido van Rossum
Guido van Rossum added the comment: At least for overriding __dict__, I would presume there would be a matching override for __getattribute__ (not __getattr__). Ditto for __class__, e.g. look at GenericAlias in the pep585 implementation PR. (Here __class__ is not in the list of exceptions

[issue15140] PEP 384 inconsistent with implementation

2020-04-01 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue39704] Disable code coverage

2020-04-02 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue39704> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-04-07 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 48b069a003ba6c684a9ba78493fbbec5e89f10b8 by Guido van Rossum in branch 'master': bpo-39481: Implementation for PEP 585 (#18239) https://github.com/python/cpython/commit/48b069a003ba6c684a9ba78493fbbe

[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-04-07 Thread Guido van Rossum
Guido van Rossum added the comment: The base implementation has landed. We still need docs, and I'm sure that the alpha and beta release cycle will find small things that need to be improved. Perhaps the next priority is an update for Doc/whatsnew/3.

[issue39019] Missing class getitems in standard library classes

2020-04-07 Thread Guido van Rossum
Guido van Rossum added the comment: Hold on, os.DirEntry[str] still doesn't work. -- ___ Python tracker <https://bugs.python.org/issue39019> ___ ___ Pytho

[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-04-07 Thread Guido van Rossum
Guido van Rossum added the comment: Ethan Smith produced a list of types that are Generic in typeshed but not in the stdlib. So these could be added. https://github.com/gvanrossum/cpython/pull/1#issuecomment-582781121 -- ___ Python tracker

[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-04-07 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset f9dd51e7db27d04e0b716d41a2804d5acbf145d1 by Batuhan Taşkaya in branch 'master': bpo-39481: Make os.DirEntry generic (GH-19415) https://github.com/python/cpython/commit/f9dd51e7db27d04e0b716d41a2804d

[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-04-09 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 2fa67df605e4b0803e7e3aac0b85d851b4b4e09a by Batuhan Taşkaya in branch 'master': bpo-39481: PEP 585 for ipaddress.py (GH-19418) https://github.com/python/cpython/commit/2fa67df605e4b0803e7e3aac0b85d8

[issue39481] Implement PEP 585 (Type Hinting Generics In Standard Collections)

2020-04-09 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 7c4185d62d4aec486d82c3ad02acd878db2d3537 by Ethan Smith in branch 'master': bpo-39481: PEP 585 for enumerate, AsyncGeneratorType, mmap (GH-19421) https://github.com/python/cpython/commit/7c4185d62d4aec486d82c3ad02acd8

<    20   21   22   23   24   25   26   27   28   29   >