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),
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
Change by Ken Jin :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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 (
Change by Ken Jin :
--
pull_requests: +22530
pull_request: https://github.com/python/cpython/pull/23663
___
Python tracker
<https://bugs.python.org/issue42
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
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
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
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
Change by Ken Jin :
--
pull_requests: +22621
pull_request: https://github.com/python/cpython/pull/23765
___
Python tracker
<https://bugs.python.org/issue42
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
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
Change by Ken Jin :
--
pull_requests: +22699
pull_request: https://github.com/python/cpython/pull/23839
___
Python tracker
<https://bugs.python.org/issue42
Change by Ken Jin :
--
pull_requests: -22699
___
Python tracker
<https://bugs.python.org/issue42195>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Ken Jin :
--
pull_requests: +22702
pull_request: https://github.com/python/cpython/pull/23839
___
Python tracker
<https://bugs.python.org/issue42
Change by Ken Jin :
--
pull_requests: +22716
pull_request: https://github.com/python/cpython/pull/23852
___
Python tracker
<https://bugs.python.org/issue42
Change by Ken Jin :
--
pull_requests: +22717
pull_request: https://github.com/python/cpython/pull/23852
___
Python tracker
<https://bugs.python.org/issue42
Change by Ken Jin :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Change by Ken Jin :
--
pull_requests: +22766
pull_request: https://github.com/python/cpython/pull/23915
___
Python tracker
<https://bugs.python.org/issue42
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
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
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
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
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:
>
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
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.
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
Change by Ken Jin :
--
pull_requests: +22808
pull_request: https://github.com/python/cpython/pull/23963
___
Python tracker
<https://bugs.python.org/issue42
Change by Ken Jin :
--
pull_requests: +22842
pull_request: https://github.com/python/cpython/pull/24000
___
Python tracker
<https://bugs.python.org/issue41
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
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.
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
Change by Ken Jin :
--
pull_requests: +22890
pull_request: https://github.com/python/cpython/pull/24056
___
Python tracker
<https://bugs.python.org/issue41
Change by Ken Jin :
--
pull_requests: +22893
pull_request: https://github.com/python/cpython/pull/24059
___
Python tracker
<https://bugs.python.org/issue42
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Change by Ken Jin :
--
pull_requests: +23283
pull_request: https://github.com/python/cpython/pull/24493
___
Python tracker
<https://bugs.python.org/issue41
Change by Ken Jin :
--
pull_requests: +23284
pull_request: https://github.com/python/cpython/pull/24494
___
Python tracker
<https://bugs.python.org/issue41
Change by Ken Jin :
--
pull_requests: +23285
pull_request: https://github.com/python/cpython/pull/24495
___
Python tracker
<https://bugs.python.org/issue41
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
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
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
Change by Ken Jin :
--
pull_requests: +23323
pull_request: https://github.com/python/cpython/pull/24536
___
Python tracker
<https://bugs.python.org/issue42
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
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
Change by Ken Jin :
--
nosy: +kj
___
Python tracker
<https://bugs.python.org/issue43463>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Change by Ken Jin :
--
pull_requests: +23584
pull_request: https://github.com/python/cpython/pull/24818
___
Python tracker
<https://bugs.python.org/issue42
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
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
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
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
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
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
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
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
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
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?
--
___
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
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
Ken Jin added the comment:
The PR should be ready for review now. Thanks for your patience.
--
___
Python tracker
<https://bugs.python.org/issue40814>
___
___
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
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
Change by Ken Jin :
--
nosy: +gvanrossum, kj, levkivskyi
versions: -Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue42169>
___
___
Pytho
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>
___
___
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
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
Change by Ken Jin :
--
pull_requests: +21932
pull_request: https://github.com/python/cpython/pull/23016
___
Python tracker
<https://bugs.python.org/issue41
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
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
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
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
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
Change by Ken Jin :
--
pull_requests: +21949
pull_request: https://github.com/python/cpython/pull/23030
___
Python tracker
<https://bugs.python.org/issue42
Change by Ken Jin :
--
pull_requests: +21958
pull_request: https://github.com/python/cpython/pull/23039
___
Python tracker
<https://bugs.python.org/issue42
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
401 - 500 of 530 matches
Mail list logo