[issue42576] Passing keyword arguments to types.GenericAlias causes a hard crash

2020-12-05 Thread Ken Jin
New submission from Ken Jin : I noticed that passing keyword arguments to types.GenericAlias's __new__ causes the interpreter to hard crash and exit due to an assertion failure: import types types.GenericAlias(bad=float) Result: Assertion failed: PyTuple_CheckExact(kwnames),

[issue42576] Passing keyword arguments to types.GenericAlias causes a hard crash

2020-12-05 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +22524 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23656 ___ Python tracker <https://bugs.python.org/issu

[issue42576] Passing keyword arguments to types.GenericAlias causes a hard crash

2020-12-05 Thread Ken Jin
Change by Ken Jin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42576] Passing keyword arguments to types.GenericAlias causes a hard crash

2020-12-06 Thread Ken Jin
Ken Jin added the comment: Thanks for taking the time to review this! I forgot to specify this only affects debug builds in the news entry. I'm opening a PR to edit that because I don't want people to mistake it for an actual interpreter-crashing bug in the release build (

[issue42576] Passing keyword arguments to types.GenericAlias causes a hard crash

2020-12-06 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +22530 pull_request: https://github.com/python/cpython/pull/23663 ___ Python tracker <https://bugs.python.org/issue42

[issue41559] Add support for PEP 612 to typing.py

2020-12-08 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch nosy: +kj nosy_count: 1.0 -> 2.0 pull_requests: +22569 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/23702 ___ Python tracker <https://bugs.python.org/i

[issue41559] Add support for PEP 612 to typing.py

2020-12-08 Thread Ken Jin
Ken Jin added the comment: I have a one question: Should ParamSpec be treated as a type of TypeVar? This mostly pertains to adding it to __parameters__ of generic aliases. Type substitution/chaining, seems inappropiate for it right now. Thanks for your help

[issue41559] Add support for PEP 612 to typing.py

2020-12-10 Thread Ken Jin
Ken Jin added the comment: > and was surprised that C.__parameters__ was (T,) instead of (T, P). Alright, I just fixed that :). I'm now encountering many problems with how typing works which prevent what PEP 612 declare as valid from not throwing an error (these are all examples copi

[issue41559] Add support for PEP 612 to typing.py

2020-12-10 Thread Ken Jin
Ken Jin added the comment: The pyre version in their __init__.py looks like they took your advice for letting the static checker do the work wholeheartedly. I'm not in favour of type checking either. Just that the pre-existing code does it for me. Not type checking when seeing

[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-12-14 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +22621 pull_request: https://github.com/python/cpython/pull/23765 ___ Python tracker <https://bugs.python.org/issue42

[issue42675] Document changes made in bpo-42195

2020-12-18 Thread Ken Jin
New submission from Ken Jin : A whatsnew is probably needed as this change causes backwards incompatibility in some code working with Python 3.9.0 and 3.9.1. I think the patch for Python 3.9.2 should mention that a DeprecationWarning is emitted for some invalid use cases, which will

[issue42675] Document changes made in bpo-42195

2020-12-18 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +22698 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23839 ___ Python tracker <https://bugs.python.org/issu

[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-12-18 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +22699 pull_request: https://github.com/python/cpython/pull/23839 ___ Python tracker <https://bugs.python.org/issue42

[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-12-18 Thread Ken Jin
Change by Ken Jin : -- pull_requests: -22699 ___ Python tracker <https://bugs.python.org/issue42195> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-12-18 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +22702 pull_request: https://github.com/python/cpython/pull/23839 ___ Python tracker <https://bugs.python.org/issue42

[issue42675] Document changes made in bpo-42195

2020-12-18 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +22716 pull_request: https://github.com/python/cpython/pull/23852 ___ Python tracker <https://bugs.python.org/issue42

[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-12-18 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +22717 pull_request: https://github.com/python/cpython/pull/23852 ___ Python tracker <https://bugs.python.org/issue42

[issue42675] Document changes made in bpo-42195

2020-12-19 Thread Ken Jin
Change by Ken Jin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42699] Use `.join(k for k in g)` instead of `.join([k for k in g])`

2020-12-20 Thread Ken Jin
Ken Jin added the comment: Sorry for intruding, but I thought I'd offer some rudimentary, non-scientific benchmarks for this: [MSC v.1928 32 bit (Intel)] on win32 # a debug build of python, no compiler optimizations import timeit # gen comp timeit.timeit("''.join(s

[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-12-23 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +22766 pull_request: https://github.com/python/cpython/pull/23915 ___ Python tracker <https://bugs.python.org/issue42

[issue41559] Add support for PEP 612 (Parameter Specification Variables) to typing.py

2020-12-23 Thread Ken Jin
Ken Jin added the comment: Thanks for the extremely helpful reviews and help in this Guido! Sure, I'll probably start work on that next week, slightly busy with life right now. After that I'll work on docs. -- ___ Python track

[issue42732] Buildbot s390x Fedora LTO + PGO 3.x fails intermittently

2020-12-24 Thread Ken Jin
New submission from Ken Jin : Dear core developers, I noticed that for many recent commits, the s390x Fedora LTO + PGO 3.x buildbot often fails. Here's an error log:: gcc -pthread -fno-semantic-interposition -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -Xl

[issue42732] Buildbot s390x Fedora LTO + PGO 3.x fails intermittently

2020-12-24 Thread Ken Jin
Ken Jin added the comment: Oops, you're right! Sorry, I'll close this issue. Anyways I realized I had the wrong hunch - I was looking at a different part of the logs. -- resolution: -> duplicate stage: -> resolved status

[issue40494] collections.abc.Callable and type variables

2020-12-25 Thread Ken Jin
Ken Jin added the comment: Now that issue42195 has been resolved by subclassing types.GenericAlias, can this be closed? On 3.9 and 3.10: >>> import typing, collections.abc >>> T = typing.TypeVar('T') >>> C2 = collections.abc.Callable[[T], T] >>&g

[issue42740] typing.py get_args and get_origin should support PEP 604 and 612

2020-12-25 Thread Ken Jin
New submission from Ken Jin : Currently get_args doesn't work for PEP 604 Union: >>> get_args(int | str) or new Callables with PEP 612: >>> P = ParamSpec('P) >>> get_args(Callable[P, int]) ([~P], ) get_origin doesn't work with PEP 604 Unions: >

[issue42740] typing.py get_args and get_origin should support PEP 604 and 612

2020-12-25 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +22793 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23942 ___ Python tracker <https://bugs.python.org/issu

[issue42741] Sync 3.9's whatsnew document in 3.10 with 3.9 branch

2020-12-25 Thread Ken Jin
New submission from Ken Jin : On the 3.10 branch, the what's new document for 3.9 isn't synced with the one on the 3.9 branch. Currently it's missing two entries: macOS 11.0 (Big Sur) and Apple Silicon Mac support issue41100 (next one's my fault, sorry) collections.

[issue42741] Sync 3.9's whatsnew document in 3.10 with 3.9 branch

2020-12-25 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +22794 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23943 ___ Python tracker <https://bugs.python.org/issu

[issue42740] typing.py get_args and get_origin should support PEP 604 and 612

2020-12-27 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +22808 pull_request: https://github.com/python/cpython/pull/23963 ___ Python tracker <https://bugs.python.org/issue42

[issue41559] Add support for PEP 612 (Parameter Specification Variables) to typing.py

2020-12-29 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +22842 pull_request: https://github.com/python/cpython/pull/24000 ___ Python tracker <https://bugs.python.org/issue41

[issue42786] Different repr for collections.abc.Callable and typing.Callable

2020-12-30 Thread Ken Jin
Ken Jin added the comment: This was addressed in issue42195 and issue40494 as you pointed out :). It has been fixed in Python 3.10. Unfortunately the backport didn't make it in time for Python 3.9.1, and will come in Python 3.9.2 instead. Sadly there's not much to do about that

[issue42786] Different repr for collections.abc.Callable and typing.Callable

2020-12-30 Thread Ken Jin
Ken Jin added the comment: You're welcome, and yes you're right! You can read the news item for it here https://docs.python.org/3/whatsnew/3.9.html#notable-changes-in-python-3-9-2. The expected release date for Python 3.9.2 is Monday, 2021-02-15 according to PEP 596 https://www.

[issue41559] Add support for PEP 612 (Parameter Specification Variables) to typing.py

2021-01-01 Thread Ken Jin
Ken Jin added the comment: I have just one more PR - one that converts genericalias nested lists to tuples by default. It'll simplify the code a little bit and prepare 3.9.x for PEP 612. -- ___ Python tracker <https://bugs.python.org/is

[issue41559] Add support for PEP 612 (Parameter Specification Variables) to typing.py

2021-01-02 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +22890 pull_request: https://github.com/python/cpython/pull/24056 ___ Python tracker <https://bugs.python.org/issue41

[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2021-01-02 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +22893 pull_request: https://github.com/python/cpython/pull/24059 ___ Python tracker <https://bugs.python.org/issue42

[issue42834] [subinterpreters] Convert "global" static variable caches in _json to heap variables

2021-01-05 Thread Ken Jin
New submission from Ken Jin : _json currently uses a few static locals for caching of PyUnicode and one Exception object. This patch aims to move them to the heap. Apologies if this isn't the right way to track subinterpreter issues, I took a look at issue36876 but it seemed like a

[issue42834] [subinterpreters] Convert "global" static variable caches in _json to heap variables

2021-01-05 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +22952 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24121 ___ Python tracker <https://bugs.python.org/issu

[issue42783] asyncio.sleep(0) idiom is not documented

2021-01-07 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj nosy_count: 5.0 -> 6.0 pull_requests: +22981 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/24153 ___ Python tracker <https://bugs.python.org/i

[issue42904] get_type_hints does not provide localns for classes

2021-01-12 Thread Ken Jin
Ken Jin added the comment: > Fidget-Spinner, are you interested in taking this? Sure thing! Please give me some time to look at it - I don't really use the runtime type validation stuff from typing (I usually defer that to 3rd party libraries), so I need to familiarize myse

[issue42904] get_type_hints does not provide localns for classes

2021-01-12 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +23026 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24201 ___ Python tracker <https://bugs.python.org/issu

[issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7

2021-01-15 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch nosy: +kj nosy_count: 2.0 -> 3.0 pull_requests: +23048 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24224 ___ Python tracker <https://bugs.python.org/i

[issue42377] allow typing.cast with TYPE_CHECKING

2021-01-15 Thread Ken Jin
Ken Jin added the comment: Sorry, I don't think this is a typing module issue. The NameError stems from what you mentioned: 'A' not being defined since TYPE_CHECKING evaluates to false at runtime. This would raise an error in any Python code, not just typing. The equivalent i

[issue42965] Optional callable raises TypeError

2021-01-19 Thread Ken Jin
Ken Jin added the comment: Hello, this issue is a byproduct of issue42195. It has already been fixed on Python 3.10, and on Python 3.9.2 (which isn't out yet). You can see the what's new for it here https://docs.python.org/3/whatsnew/3.9.html#notable-changes-in-python-3-9-2. Th

[issue42392] remove the deprecated 'loop' parameter asyncio API

2021-01-19 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj nosy_count: 5.0 -> 6.0 pull_requests: +23078 pull_request: https://github.com/python/cpython/pull/24256 ___ Python tracker <https://bugs.python.org/issu

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-20 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch nosy: +kj nosy_count: 4.0 -> 5.0 pull_requests: +23094 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24271 ___ Python tracker <https://bugs.python.org/i

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-20 Thread Ken Jin
Ken Jin added the comment: FWIW, a surprising amount of things rely on treating ';' as a valid separator in the standard test suite. >From just a cursory look: test_cgi test_urlparse A change in the public API of urlparse will also require a change in cgi.py&#x

[issue42988] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem

2021-01-21 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch nosy: +kj nosy_count: 4.0 -> 5.0 pull_requests: +23104 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24285 ___ Python tracker <https://bugs.python.org/i

[issue42988] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem

2021-01-21 Thread Ken Jin
Ken Jin added the comment: I created a PR to remove the getfile function - now it just places the hyperlinked file path there but clicking on it won't render the file contents. Personally I agree with Marc-Andre Lemburg's comments on how _url_handler probably has other vulne

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-22 Thread Ken Jin
Ken Jin added the comment: Adam, I linked a PR 2 days ago here https://github.com/python/cpython/pull/24271 , it has the test suite passing and the appropriate changes to cgi.py. Would you like to review it? Or since you submitted a PR, would you prefer I close mine instead

[issue42988] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem

2021-01-22 Thread Ken Jin
Ken Jin added the comment: I have updated the PR to do the following: - removed html_getfile - implement a unique secret as suggested above Now it says: >>> python.exe -m pydoc -b Server ready at http://localh

[issue43004] No type variables left in collections.abc.Callable

2021-01-22 Thread Ken Jin
Ken Jin added the comment: This seems to be a duplicate of Issue40494. It has already been fixed in Python 3.10, and in Python 3.9.2 (which isn't out yet). You can see the what's new for it here https://docs.python.org/3/whatsnew/3.9.html#notable-changes-in-python-3-9-2. Th

[issue43006] Changed behaviour of inspect.signature() in Python 3.10

2021-01-23 Thread Ken Jin
Ken Jin added the comment: > This is correct for typing.get_type_hints(), but *not* for > inspect.signature(). I therefore suspect that this is an accidental > side-effect from support for PEP-563 deferred evaluation of annotations. Spot on about PEP 563 becoming the default

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-23 Thread Ken Jin
Ken Jin added the comment: @Adam: >I haven't noticed, I'm sorry. I don't mind closing mine, just thought it could >be a nice first contribution. No worries :), please don't close yours. > Our PRs are different though - I feel like if we are to impleme

[issue43006] Changed behaviour of inspect.signature() in Python 3.10

2021-01-23 Thread Ken Jin
Ken Jin added the comment: For anyone interested, I went to do some digging on the 3 issues Zac listed: 1. Similar to the first message, this is caused by inspect.getfullarg/signature using get_type_hints in Py 3.10. get_type_hints internally converts None to NoneType. 2. I don't

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-23 Thread Ken Jin
Ken Jin added the comment: I updated the PR to take in a sequence of separators from the user - eg: >>> urllib.parse.parse_qsl('a=1&b=2;c=3', separators=('&', ';')) [('a', '1'), ('b', '2'), ('c&#x

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-24 Thread Ken Jin
Ken Jin added the comment: Dear all, now that Adam has signed the CLA, I have closed my PR in favor of Adam's because I think 2 open PRs might split everyone's attention. Instead, I'll focus on reviewing Adam's PR. Sorry for any

[issue42988] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem

2021-01-26 Thread Ken Jin
Ken Jin added the comment: @Serhiy, While this approach solves the getfile problem, I don't think this will solve the other problem of pydoc leaking secrets stored in python files: Quoting from Marc-Andre Lemburg's message: > the tool also makes available all Python modules

[issue43119] asyncio.Queue.put never yields if the queue is unbounded

2021-02-04 Thread Ken Jin
Ken Jin added the comment: Thanks for the minimal reproducer. I've tested it on 3.9.0 and 3.10a4 and they seem to exhibit the same behavior too. Out of genuine curiosity (I don't mean to question if this *is* a bug, it seems like a trap for users): why not place an ``await async

[issue42882] Restarting the interpreter causes UB on 3.10.0a4

2021-02-04 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj nosy_count: 2.0 -> 3.0 pull_requests: +23250 pull_request: https://github.com/python/cpython/pull/24440 ___ Python tracker <https://bugs.python.org/issu

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-09 Thread Ken Jin
Ken Jin added the comment: Guido and Brandt, may I take a stab at the docs for this? I'll probably base most of it off PEP 636's tutorial. Relevant parts of the docs that I've identified: reference/lexical_analysis.rst reference/compound_stmts.rst reference/grammar.rst # this

[issue42128] Structural Pattern Matching (PEP 634)

2021-02-09 Thread Ken Jin
Ken Jin added the comment: Hi Daniel, wow thanks for the offer! My GitHub username is Fidget-Spinner. I'm not sure about the grammar file either. Oh, thanks for mentioning the tutorial recommendation by the SC, I'll keep tha

[issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7

2021-02-09 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +23283 pull_request: https://github.com/python/cpython/pull/24493 ___ Python tracker <https://bugs.python.org/issue41

[issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7

2021-02-09 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +23284 pull_request: https://github.com/python/cpython/pull/24494 ___ Python tracker <https://bugs.python.org/issue41

[issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7

2021-02-09 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +23285 pull_request: https://github.com/python/cpython/pull/24495 ___ Python tracker <https://bugs.python.org/issue41

[issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7

2021-02-09 Thread Ken Jin
Ken Jin added the comment: I think we can close this now. Thanks for reporting it Dominic, and thanks Guido for all your help! -- ___ Python tracker <https://bugs.python.org/issue41

[issue8264] [doc] hasattr doesn't show private (double underscore) attributes exist

2021-02-12 Thread Ken Jin
Ken Jin added the comment: Thanks for merging this Ethan! I think we can close this now (unless you want me to backport this to 3.9 and 3.8 as well). -- ___ Python tracker <https://bugs.python.org/issue8

[issue41559] Add support for PEP 612 (Parameter Specification Variables) to typing.py

2021-02-12 Thread Ken Jin
Ken Jin added the comment: Hi Guido, after a month of observing how people stumbled over the related collections.abc.Callable bugs, and experience from implementing this PEP, I learnt a few things which I think may interest you: Previously it was *recommended* that everything in typing be

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-02-15 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +23323 pull_request: https://github.com/python/cpython/pull/24536 ___ Python tracker <https://bugs.python.org/issue42

[issue43257] get_type_hints evaluates class variables before type hints

2021-02-19 Thread Ken Jin
Ken Jin added the comment: Hmm I noticed this occurs in Python 3.9 but not 3.10. If you insert ``from __future__ import annotations`` at the start of your code, it stops erroring. Anyways, I don't think this is dataclass specific, the following code using a plain class also e

[issue43355] __future__.annotations breaks inspect.signature()

2021-03-03 Thread Ken Jin
Ken Jin added the comment: @eric.smith, here's a summarized version. I hope it helps: def foo(x: str) -> str: ... In Python 3.7 - 3.9 with from __future__ import annotations, inspect.signature sees foo's parameter as: Without the future import (and also in Python 3.10): T

[issue43463] typing.get_type_hints with TYPE_CHECKING imports / getting hints for single argument

2021-03-10 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj ___ Python tracker <https://bugs.python.org/issue43463> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-03-10 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +23584 pull_request: https://github.com/python/cpython/pull/24818 ___ Python tracker <https://bugs.python.org/issue42

[issue31391] Forward-port test_xpickle from 2.7 to 3.x

2020-09-29 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch nosy: +kj nosy_count: 2.0 -> 3.0 pull_requests: +21481 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22452 ___ Python tracker <https://bugs.python.org/i

[issue41428] PEP 604 -- Allow writing union types as X | Y

2020-10-03 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj nosy_count: 4.0 -> 5.0 pull_requests: +21526 pull_request: https://github.com/python/cpython/pull/22517 ___ Python tracker <https://bugs.python.org/issu

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-05 Thread Ken Jin
Ken Jin added the comment: Hi Patrick, I've completed the docs for PEP 604, and would like to work on the docs for PEP 585. May I know if you're still working on this? -- nosy: +kj ___ Python tracker <https://bugs.python.o

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-09 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +21596 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22615 ___ Python tracker <https://bugs.python.org/issu

[issue40814] Update typing module documentation based on PEP 585

2020-10-09 Thread Ken Jin
Ken Jin added the comment: I've created a PR 22615 which partly addresses the documentation for GenericAlias in stdtypes. I have a side question: should __args__, and __origin__ be documented somewhere as well? I noticed it has no documentation even though it's used to check ge

[issue42010] GenericAlias accepts indexing/subscripting, causing confusion

2020-10-12 Thread Ken Jin
New submission from Ken Jin : While writing the docs for PEP 585's GenericAlias, I noticed that the following anti-pattern described in PEP 585 no longer throws an error when it should: >>> l = list >>> l[-1] Whereas in versions of Python before 3.9, a "Typ

[issue42010] GenericAlias accepts indexing/subscripting, causing confusion

2020-10-12 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +21640 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22667 ___ Python tracker <https://bugs.python.org/issu

[issue42010] Generic types accepts indexing/subscripting, causing confusion

2020-10-12 Thread Ken Jin
Change by Ken Jin : -- title: GenericAlias accepts indexing/subscripting, causing confusion -> Generic types accepts indexing/subscripting, causing confusion ___ Python tracker <https://bugs.python.org/issu

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-12 Thread Ken Jin
Change by Ken Jin : -- title: Generic types accepts indexing/subscripting, causing confusion -> Generic types accept indexing/subscripting, causing confusion ___ Python tracker <https://bugs.python.org/issu

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-12 Thread Ken Jin
Ken Jin added the comment: I'd like to clarify the following too, currently: (1) >>> list[1] list[1] (2) >>> list[1, 2, 3] list[1, 2, 3] The PR only solves (1) and not (2), is (2) intended behavior? -- ___

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-12 Thread Ken Jin
Ken Jin added the comment: Partly due to Python 3.9.0's nascency, I've not been able to find online cases of beginners getting confused by this specific behavior. Wow I didn't know about integer variadics, assuming they make their way into 3.11, I can see why it'd be bet

[issue42067] Type annotation in for-loops

2020-10-18 Thread Ken Jin
Ken Jin added the comment: That's an interesting syntax suggestion, you might want to suggest that in the python-ideas mailing list for other people to read about it rather than post it on python bugs. IMO, this isn't really an issue since you can specify the type of the el

[issue40814] Update typing module documentation based on PEP 585

2020-10-18 Thread Ken Jin
Ken Jin added the comment: The PR should be ready for review now. Thanks for your patience. -- ___ Python tracker <https://bugs.python.org/issue40814> ___ ___

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +21779 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22822 ___ Python tracker <https://bugs.python.org/issu

[issue42102] Make builtins.callable "generic"

2020-10-20 Thread Ken Jin
Ken Jin added the comment: +1 to this. I'm more surprised that callable wasn't already able to do that (also surprised at the ``isinstance(x, callable)`` code crashing). I think the implementation would be slightly different than what you proposed. I'd like to give it a sho

[issue42169] Apparently all documentation on @typing.overload is wrong

2020-10-27 Thread Ken Jin
Change by Ken Jin : -- nosy: +gvanrossum, kj, levkivskyi versions: -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue42169> ___ ___ Pytho

[issue42169] Apparently all documentation on @typing.overload is wrong

2020-10-27 Thread Ken Jin
Change by Ken Jin : -- versions: +Python 3.6, Python 3.7 -Python 3.10, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue42169> ___ ___

[issue42169] Apparently all documentation on @typing.overload is wrong

2020-10-27 Thread Ken Jin
Ken Jin added the comment: Apologies to all for the spam, I made a misclick. Maybe the documentation could be clearer for that specific example. The following code seems to work on mypy (in a non-stub file): ``` from typing import overload, Any, Optional @overload def utf8(value: None

[issue42162] The license page for Python 3.0 is messed up

2020-10-27 Thread Ken Jin
Ken Jin added the comment: Python 3.0.x is no longer being maintained. As such I don't think there's a way for a fix to be ported over. I might be wrong though. -- nosy: +kj ___ Python tracker <https://bugs.python.o

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-28 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +21932 pull_request: https://github.com/python/cpython/pull/23016 ___ Python tracker <https://bugs.python.org/issue41

[issue42182] 3.10 Documentation Not Hyperlinking Some Methods

2020-10-28 Thread Ken Jin
New submission from Ken Jin : Some ``:meth:`` markups are not being hyperlinked at all, while some are. This only occurs for Python 3.10. This also seems related to https://bugs.python.org/issue42042. Eg. For 3.9, https://docs.python.org/3.9/library/stdtypes.html#truth-value-testing

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-28 Thread Ken Jin
Ken Jin added the comment: @guido, you're welcome! I'm thinking of updating the temporary hyperlinks for GenericAlias/PEP 585 in Union, subscriptions and typing, I'll submit 2 separate PRs since subscription and typing require backporting. If I think of anything major, I

[issue42198] Clean up docs for Union and GenericAlias

2020-10-29 Thread Ken Jin
New submission from Ken Jin : This is an umbrella issue to clean up docs for Union and GenericAlias. To-do (not in order): 1. Update links in typing, subscription and union to point to GenericAlias. 2. Park GenericAlias and Union under a new section 'Type Annotation Types' in st

[issue42198] Clean up docs for Union and GenericAlias

2020-10-29 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +21948 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23029 ___ Python tracker <https://bugs.python.org/issu

[issue42198] Clean up docs for Union and GenericAlias

2020-10-29 Thread Ken Jin
Ken Jin added the comment: 4. types.GenericAlias's __call__ signature of (origin, args) is not documented anywhere, I'll create a PR to types.rst eventually. -- ___ Python tracker <https://bugs.python.o

[issue42198] Clean up docs for Union and GenericAlias

2020-10-29 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +21949 pull_request: https://github.com/python/cpython/pull/23030 ___ Python tracker <https://bugs.python.org/issue42

[issue42198] Clean up docs for Union and GenericAlias

2020-10-30 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +21958 pull_request: https://github.com/python/cpython/pull/23039 ___ Python tracker <https://bugs.python.org/issue42

[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-10-31 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch nosy: +kj nosy_count: 6.0 -> 7.0 pull_requests: +21979 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23060 ___ Python tracker <https://bugs.python.org/i

<    1   2   3   4   5   6   >