[issue47255] Many broken :meth: roles in the docs

2022-04-08 Thread Ken Jin
Ken Jin added the comment: It's 3.10 only. Presumably our sphinx version changed then and something broke. In 3.9 and earlier the links are all fine. See https://bugs.python.org/issue42182 for a similar issue I raised ages ago. -- nosy

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

2021-03-15 Thread Ken Jin
Ken Jin added the comment: @Florian, IIUC inspect.signature auto-resolves string annotations to typing.ForwardRef internally from 3.10 onwards. It's mentioned in the what's new for PEP 563 https://docs.python.org/3.10/whatsnew/3.10.html#pep-563-postponed-evaluation-of-annotatio

[issue43512] Bug in isinstance(instance, cls) with cls being a protocol? (PEP 544)

2021-03-16 Thread Ken Jin
Ken Jin added the comment: Apologies if I misunderstood something, but doesn't PEP 544 also state in its "Rationale", "Non-goals" subsection that """ At runtime, protocol classes will be simple ABCs. There is no intent to provide sophisticated r

[issue43512] Bug in isinstance(instance, cls) with cls being a protocol? (PEP 544)

2021-03-18 Thread Ken Jin
Ken Jin added the comment: @paul-dest Anyone can add them using the bug tracker Web interface in the "Nosy List" field above the message box. Yes they will receive a notification. Adding people sends them an email and subscribes them to this issue (even if closed). I don't k

[issue43646] ForwardRef name conflict during evaluation

2021-03-28 Thread Ken Jin
Ken Jin added the comment: Wow, thank you for the excellent bug report! Surprisingly, issue42904 's patch fixes this problem as well. I've spent a few hours trying to debug this, and here's some findings: TLDR: 3.9.1 - 3.10 added ForwardRef recursive evaluation. A gues

[issue41370] PEP 585 and ForwardRef

2021-04-04 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj nosy_count: 7.0 -> 8.0 pull_requests: +23925 pull_request: https://github.com/python/cpython/pull/25183 ___ Python tracker <https://bugs.python.org/issu

[issue42128] Structural Pattern Matching (PEP 634)

2021-04-04 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +23927 pull_request: https://github.com/python/cpython/pull/25185 ___ Python tracker <https://bugs.python.org/issue42

[issue43766] Implement PEP 647 (User-Defined Type Guards) in typing.py

2021-04-07 Thread Ken Jin
New submission from Ken Jin : PEP 647 was recently accepted by the SC: https://mail.python.org/archives/list/python-...@python.org/thread/2ME6F6YUVKHOQYKSHTVQQU5WD4CVAZU4/ I'd like to work on the implementation for typing.py and any required docs later on (unless someone is already worki

[issue43766] Implement PEP 647 (User-Defined Type Guards) in typing.py

2021-04-08 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +24018 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25282 ___ Python tracker <https://bugs.python.org/issu

[issue43766] Implement PEP 647 (User-Defined Type Guards) in typing.py

2021-04-08 Thread Ken Jin
Ken Jin added the comment: > I assume that this will be pretty simple, right? Yep! The PR speaks for itself ;). typing.py has pretty nice internal constructs to make these types of additions a breeze. I'm really grateful to whoever wrote/refactored the _SpecialForm decorator to wh

[issue43783] Make ParamSpec.args/kwargs more useful objects

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

[issue43772] Minor repr error in typing.TypeVar.__ror__()

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

[issue42904] get_type_hints does not provide localns for classes

2021-04-13 Thread Ken Jin
Ken Jin added the comment: Yup I can! BTW, I agree with keeping the change in 3.10 only. I suspect it _may_ be backwards-incompatible in small edge cases (re: the long comment on the PR about suspicions with local and global scope). -- resolution: -> fixed stage: patch rev

[issue43646] ForwardRef name conflict during evaluation

2021-04-13 Thread Ken Jin
Ken Jin added the comment: @tefra, now that issue42904 has been solved, can you test your code again with 3.10.0a8? (it's not out yet, so you may have to pull the code from CPython's GitHub master branch and build CPython) Running your code again, it seems to be fixed: Pytho

[issue43817] Add typing.get_annotations()

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

[issue40432] Pegen regenerate project for Windows not working

2021-04-13 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj nosy_count: 2.0 -> 3.0 pull_requests: +24122 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/25389 ___ Python tracker <https://bugs.python.org/i

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

2021-04-16 Thread Ken Jin
Ken Jin added the comment: Guido, I hope I didn't choose a bad time to send this PR over (I suspect you may already be flooded by emails about PEP 563). The jist of the PR is that it's possible to implement PEP 612 in pure-Python. Specifically, PEP 612 says: &

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

2021-04-16 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +24178 pull_request: https://github.com/python/cpython/pull/25449 ___ Python tracker <https://bugs.python.org/issue41

[issue43646] ForwardRef name conflict during evaluation

2021-04-17 Thread Ken Jin
Ken Jin added the comment: @tefra, thanks for testing. That's great to hear! And once again, thanks for the excellent bug report in your original message. @tefra and @gvanrossum, I'm closing this issue as it is now fixed in 3.10. If any of you feel that's wrong, please don&#

[issue43889] Pickle performance regression in 3.10

2021-04-19 Thread Ken Jin
New submission from Ken Jin : Hi everyone, I noticed on speed.python.org that the pickle benchmarks are noticeably slower: Overall, pickle slowed down by >10% https://speed.python.org/timeline/?exe=12&base=&ben=pickle&env=1&revs=200&equid=off&quarts=on&extr=on

[issue43889] Pickle performance regression in 3.10

2021-04-19 Thread Ken Jin
Ken Jin added the comment: > It definitely shouldn't be related to any of these, all are unrelated code > paths. Yeah I thought so too :(. After looking at the benchmark code in pyperformance, I can't find anything related in the commits that would cause such a big

[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-04-20 Thread Ken Jin
Change by Ken Jin : -- nosy: +gvanrossum, kj, levkivskyi ___ Python tracker <https://bugs.python.org/issue43893> ___ ___ Python-bugs-list mailing list Unsub

[issue43889] Pickle performance regression in 3.10

2021-04-24 Thread Ken Jin
Ken Jin added the comment: I'm unable to reproduce the regression locally with pyperformance. Additionally, the links on speed.python.org show that the results returned to normal after a week (again seemingly without any commit to cause such a change). I'm closing this bug as

[issue42904] get_type_hints does not provide localns for classes

2021-04-26 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +24327 pull_request: https://github.com/python/cpython/pull/25632 ___ Python tracker <https://bugs.python.org/issue42

[issue43766] Implement PEP 647 (User-Defined Type Guards) in typing.py

2021-04-27 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +24351 pull_request: https://github.com/python/cpython/pull/25660 ___ Python tracker <https://bugs.python.org/issue43

[issue43947] lambdas stored with assignment expressions are unoptimized

2021-04-27 Thread Ken Jin
Ken Jin added the comment: I'm unable to reproduce it on 3.10: >>> regass = lambda k: k in {None} >>> dis.dis(regass) 1 0 LOAD_FAST0 (k) 2 LOAD_CONST 1 (frozenset({None})) 4 CONTAINS_OP

[issue43766] Implement PEP 647 (User-Defined Type Guards) in typing.py

2021-04-27 Thread Ken Jin
Ken Jin added the comment: Guido, thanks so much for reviewing the docs for TypeGuard so thoroughly even with how busy you are. I hope you enjoy your upcoming vacation :). I'm closing this issue as all PRs have landed. Please don't hesitate to re-open this if you feel somethi

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

2021-04-28 Thread Ken Jin
Ken Jin added the comment: The last of the patches have landed. Guido, thank you so much for helping me through this 5 month long process. Please enjoy your vacation! PS: I need to send in a bugfix for typing.py later to ignore ``ParamSpec`` in the ``__parameters__`` of invalid locations

[issue42904] get_type_hints does not provide localns for classes

2021-04-29 Thread Ken Jin
Ken Jin added the comment: @larry > Is this "surprising, but required" behavior due specifically to this being a > backwards-incompatible change? Yes. That's the main factor. I've since learnt that there's sadly more to it though :( (see below). > Does

[issue42904] get_type_hints does not provide localns for classes

2021-04-29 Thread Ken Jin
Ken Jin added the comment: Hmm I think you're right - the normal behavior in Python is for local variables to shadow global variables, and as a user I expect the same for eval in inspect.get_annotation. -- ___ Python tracker &

[issue44010] IDLE: highlight new `match` / `case` syntax

2021-05-02 Thread Ken Jin
Ken Jin added the comment: Hi, I'm no IDLE expert, but I think moving the new soft keywords into kwlist seems wrong: Soft keywords were added in Python 3.9 when the PEG parser became the default. The keyword list was also updated accordingly https://docs.python.org/3/library/keyword

[issue42083] PyStructSequence_NewType broken in 3.8

2021-05-03 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch nosy: +kj nosy_count: 3.0 -> 4.0 pull_requests: +24536 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/25852 ___ Python tracker <https://bugs.python.org/i

[issue41832] PyType_FromSpec() should accept tp_doc=NULL

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

[issue42083] PyStructSequence_NewType broken in 3.8

2021-05-04 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +24560 pull_request: https://github.com/python/cpython/pull/25886 ___ Python tracker <https://bugs.python.org/issue42

[issue42083] PyStructSequence_NewType broken in 3.8

2021-05-04 Thread Ken Jin
Ken Jin added the comment: Steve, thank you for your invaluable investigation. Thanks Petr for a better fix - your issue didn't come to my mind at the time. Since all PRs have landed and the fix should arrive in Python 3.9.6, I am closing this issue. Please don't hesitate to reop

[issue42067] Type annotation in for-loops

2021-05-04 Thread Ken Jin
Ken Jin added the comment: @pablo, may I close this issue as 'not a bug'? I think it looks like a feature request that belongs on https://discuss.python.org/c/ideas/ or https://mail.python.org/mailman3/lists/python-ideas.python.org/ instead. What do you think? -- nosy:

[issue43978] Incorrect "versionadded" info in typing.NoReturn documentation

2021-05-04 Thread Ken Jin
Ken Jin added the comment: Hi Miguel, with reference to https://github.com/python/cpython/pull/25760#issuecomment-830338306, Guido rejected the PR because he said that the current docs are correct. This is a major point of confusion for many people, but here's why a single feature c

[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

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

[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-04 Thread Ken Jin
Ken Jin added the comment: Jelle, thanks for fixing up the docs. You're right here - anything that can be an element in a frozenset or used as a key in a dict works. And the current docs for sets says that means anything hashable: https://docs.python.org/3/library/stdtypes.html#set-

[issue42067] Type annotation in for-loops

2021-05-04 Thread Ken Jin
Ken Jin added the comment: Thanks for your input Mark! -- components: -Build resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43978] Incorrect "versionadded" info in typing.NoReturn documentation

2021-05-04 Thread Ken Jin
Ken Jin added the comment: To answer the person who posted this on docs mailing list, after much investigation, it seems that this made it into 3.7.0, 3.5.4 and 3.6.2 . Here's the 3.7.0 (alpha) commit for the initial implementation of typing.NoReturn: https://github.com/python/cp

[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-04 Thread Ken Jin
Ken Jin added the comment: Well something was amiss: the 3.9 backport PR ;-). Sorry for closing this issue too early. I didn't notice there was still one more to go. -- resolution: fixed -> status: closed -> open ___ Python trac

[issue44001] typing.Literal: args must be hashable, not immutable

2021-05-05 Thread Ken Jin
Change by Ken Jin : -- resolution: -> fixed status: open -> closed ___ Python tracker <https://bugs.python.org/issue44001> ___ ___ Python-bugs-list

[issue44050] Exceptions in a subinterpreter are changed by another subinterpreter

2021-05-05 Thread Ken Jin
Change by Ken Jin : -- keywords: +3.9regression nosy: +christian.heimes, lukasz.langa, vstinner ___ Python tracker <https://bugs.python.org/issue44050> ___ ___

[issue43977] Implement the latest semantics for PEP 634 for matching collections

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

[issue44057] Inconsitencies in `__init_subclass__` in a generic class

2021-05-06 Thread Ken Jin
Ken Jin added the comment: Hi Erez, thank you for the bug report. What minor version of 3.8 are you using exactly? I'm able to reproduce this on 3.6.8, but not on 3.8.5. BTW, Python 3.8 is no longer receiving bugfixes - only security fixes. The only versions still getting bugfixes righ

[issue44057] Inconsitencies in `__init_subclass__` in a generic class

2021-05-08 Thread Ken Jin
Ken Jin added the comment: Since this only affects 3.6 which is no longer receiving bugfixes, I'm closing this issue. 3.7 and higher do not have this bug. So one way forward is to upgrade to 3.7 or 3.8 - both of which are supported by most major libraries. If this bug reappears aga

[issue42115] Caching infrastructure for the evaluation loop: specialised opcodes

2021-05-08 Thread Ken Jin
Ken Jin added the comment: > IMO you need to implement LOAD_METHOD support for all kinds of calls, > including the ones that use kwargs, to see any improvement. Recently I played around with that idea and extended LOAD/CALL_METHOD to keyword arguments (so CALL_FUNCTION_KW is replac

[issue30076] Opcode names BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL are too long

2021-05-09 Thread Ken Jin
Ken Jin added the comment: Serhiy, may I close this issue please? Since 3.10, those long opcodes no longer exist. Issue39320 removed BUILD_TUPLE_UNPACK_WITH_CALL and BUILD_MAP_UNPACK_WITH_CALL from the compiler. The new opcodes have shorter names. -- nosy: +kj

[issue44089] csv.Error can't be subclassed

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

[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-05-10 Thread Ken Jin
New submission from Ken Jin : ``typing.List`` includes ``ParamSpec`` in ``__parameters__`` but the builtin ``list`` doesn't. The behavior of the latter is correct, as PEP 612 states that: "As before, parameters_expressions by themselves are not acceptable in places where a type i

[issue44098] Remove ParamSpec from __parameters__ of most typing generics

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

[issue26110] Speedup method calls 1.2x

2021-05-10 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj nosy_count: 21.0 -> 22.0 pull_requests: +24665 pull_request: https://github.com/python/cpython/pull/26014 ___ Python tracker <https://bugs.python.org/issu

[issue38908] Troubles with @runtime_checkable protocols

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

[issue38908] Troubles with @runtime_checkable protocols

2021-05-12 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +24717 pull_request: https://github.com/python/cpython/pull/26077 ___ Python tracker <https://bugs.python.org/issue38

[issue38908] Troubles with @runtime_checkable protocols

2021-05-12 Thread Ken Jin
Ken Jin added the comment: Yurii and Kevin, thanks for pushing the patch forward! Thanks for the review too Guido. I'm closing this issue as all bugfix PRs have landed to bugfix branches. This will make its way into the next versions of Python for those respective branches. One poi

[issue38908] Troubles with @runtime_checkable protocols

2021-05-13 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +24736 pull_request: https://github.com/python/cpython/pull/26096 ___ Python tracker <https://bugs.python.org/issue38

[issue44098] Remove ParamSpec from __parameters__ of most typing generics

2021-05-14 Thread Ken Jin
Ken Jin added the comment: All patches have landed. Thanks Guido! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44135] issubclass documentation doesn't explain tuple semantic

2021-05-15 Thread Ken Jin
Ken Jin added the comment: I agree that this subtlety could be expressed better. Thanks for the catch! Would you like to work on this? BTW, only Python 3.9 and higher are still receiving bugfixes (including doc fixes). The older versions are either security fixes only or end of life

[issue26110] Speedup method calls 1.2x

2021-05-16 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +24793 pull_request: https://github.com/python/cpython/pull/26159 ___ Python tracker <https://bugs.python.org/issue26

[issue42834] [subinterpreters] Make static caches in various places subinterpreter compatible

2021-05-16 Thread Ken Jin
Ken Jin added the comment: Hi Victor, I'm re-using this issue as I'm doing a similar change to compile.c. I hope you're alright with that. -- resolution: fixed -> status: closed -> open title: [subinterpreters] Convert "global" static variable cac

[issue42834] [subinterpreters] Make static caches in various places subinterpreter compatible

2021-05-16 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +24795 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/26161 ___ Python tracker <https://bugs.python.org/issu

[issue44156] [subinterpreters] Replace static string caches with subinterpreter-compatible alternatives

2021-05-17 Thread Ken Jin
New submission from Ken Jin : Hello, this is a meta issue for replacing cached string constants in various places with alternatives compatible with subinterpreters such as _Py_IDENTIFIER. Ideally the replacements should not cause any performance regression. But to be safe I would recommend

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

2021-05-17 Thread Ken Jin
Ken Jin added the comment: Hi Christian and Victor, thanks for the advice! Points taken. I'll keep in mind to create a new issue for similar things in the future so things are less confusing for everyone. The new issue for this is Issue

[issue44156] [subinterpreters] Replace static string caches with subinterpreter-compatible alternatives

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

[issue43223] [security] http.server: Open Redirection if the URL path starts with //

2021-05-18 Thread Ken Jin
Change by Ken Jin : -- title: [security] http.server: Open Redirection if the URL path starts with //racha999coperation -> [security] http.server: Open Redirection if the URL path starts with // type: crash -> security ___ Python tracker

[issue44174] Unclear meaning of _Private__names in enum docs.

2021-05-19 Thread Ken Jin
Ken Jin added the comment: I think linking to this part of the docs may help https://docs.python.org/3/reference/expressions.html#atom-identifiers There's also already a label to reference to, so the sentence could start with :ref:`Private names `. -- keywords: +easy, new

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

2021-05-22 Thread Ken Jin
Ken Jin added the comment: All the PRs have landed in bugfix branches so I'm closing this issue. Thanks Irit and Ethan! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https:

[issue44220] PyStructSequence_UnnamedField unavailable on Windows

2021-05-24 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch nosy: +kj nosy_count: 5.0 -> 6.0 pull_requests: +24923 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26331 ___ Python tracker <https://bugs.python.org/i

[issue44207] Add a version number to Python functions

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

[issue42392] [document removal of] the deprecated 'loop' parameter asyncio API in 3.10

2021-05-25 Thread Ken Jin
Ken Jin added the comment: > There appear to be no versionchanged:: 3.10 in the asyncio docs on the APIs > that formerly accepted a loop= parameter Sorry, I missed that. Working on it. -- ___ Python tracker <https://bugs.python.org/i

[issue44232] Crash in Objects/typeobject.c

2021-05-25 Thread Ken Jin
Ken Jin added the comment: Can you please try removing the `assert(type != NULL);` line at https://github.com/python/cpython/blob/main/Objects/typeobject.c#L3313 and see if it works for you? I suspect that `winner->tp_new()` may sometimes fail and *should* return NULL to indicate that

[issue42392] [document removal of] the deprecated 'loop' parameter asyncio API in 3.10

2021-05-25 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +24949 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/26357 ___ Python tracker <https://bugs.python.org/issu

[issue44232] Crash in Objects/typeobject.c

2021-05-25 Thread Ken Jin
Ken Jin added the comment: Alright, I got a minimum reproducible example: class XBase(type): def __new__(cls, name, bases, attrs, **kwargs): attrs.pop('__module__') return super().__new__(cls, name, bases, attrs, **kwargs) class X(metaclass=XBase): ... ty

[issue44232] Crash in Objects/typeobject.c

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

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-26 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj nosy_count: 8.0 -> 9.0 pull_requests: +24973 pull_request: https://github.com/python/cpython/pull/26381 ___ Python tracker <https://bugs.python.org/issu

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-26 Thread Ken Jin
Ken Jin added the comment: _winapi is leaky still even with my PR: >>> import sys,gc >>> for _ in range(5): ... print(sys.gettotalrefcount()) ... import _winapi ... del sys.modules['_winapi'] ... del _winapi ... gc.collect() ... 50468 51076 51432 51788 521

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-26 Thread Ken Jin
Ken Jin added the comment: > it creates nearly 100 objects Oops sorry I think I'm wrong. most of those objects may be borrowed refs. Just 1 type object is causing the leak. -- ___ Python tracker <https://bugs.python.org

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-28 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +25023 pull_request: https://github.com/python/cpython/pull/26429 ___ Python tracker <https://bugs.python.org/issue42

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-28 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +25024 pull_request: https://github.com/python/cpython/pull/26430 ___ Python tracker <https://bugs.python.org/issue42

[issue44252] test_ssl and test_httplib.HTTPSTest crash randomly with "Windows fatal exception: access violation" on Windows

2021-05-28 Thread Ken Jin
Ken Jin added the comment: Sorry, I introduced the test_httplib regression on Windows with GH-26381 commit 0fa282c55f1a45765340cb24ed65c90ffe2aa405. I made a second PR GH-26429 to fix it. -- nosy: +kj ___ Python tracker <https://bugs.python.

[issue44252] test_ssl and test_httplib.HTTPSTest crash randomly with "Windows fatal exception: access violation" on Windows

2021-05-28 Thread Ken Jin
Ken Jin added the comment: Oops, nevermind I mixed the issues up, please ignore the previous message. The regression I introduced in main was a related assertionerror in test_httplib but doesn't affect 3.10. 3.10 still fails randomly for unknown re

[issue32592] Drop support of Windows Vista and Windows 7

2021-05-28 Thread Ken Jin
Change by Ken Jin : -- nosy: +kj nosy_count: 14.0 -> 15.0 pull_requests: +25026 pull_request: https://github.com/python/cpython/pull/26429 ___ Python tracker <https://bugs.python.org/issu

[issue41249] TypedDict inheritance doesn't work with get_type_hints and postponed evaluation of annotations across modules

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

[issue44283] Add jump table for certain safe match-case statements

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

[issue44293] PEP 585 breaks inspect.isclass

2021-06-03 Thread Ken Jin
Ken Jin added the comment: @Jelle thanks for nosy-ing me too and the thorough investigation. @Joseph Thanks for taking the time to raise this inconvenience on the bug tracker. > By the way, Python typing is so much unstable (every version breaks the > previous one), it's very

[issue44310] lru_cache memory leak

2021-06-04 Thread Ken Jin
Ken Jin added the comment: @Wouter Hmm, I thought most use cases of lru_cache benefit from strong references for predictable hit rates? I'm not an expert in this area, so I nosied-in someone else who is. However, I noticed that the current doc doesn't mention the strong reference

[issue11105] Compiling recursive Python ASTs crash the interpreter

2021-06-05 Thread Ken Jin
Ken Jin added the comment: The newly added test ``test_recursion_direct`` seems to trigger a stack overflow on windows in debug mode instead of a RecursionError. Release mode isn't affected and the test passes there. One of the buildbots reflects this too: https://buildbot.python.or

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-06-06 Thread Ken Jin
Ken Jin added the comment: The new test `test_entry_points_by_index` (added in c34ed08d975fb7daa7b329f7c631647782290393 ) seems to fail on some windows buildbots: https://dev.azure.com/Python/cpython/_build/results?buildId=81807&view=logs&j=c8a71634-e5ec-54a0-3958-760f4148b765&am

[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2021-06-06 Thread Ken Jin
Ken Jin added the comment: @victor, git bisect tells me the change f3fa63ec75fdbb4a08a10957a5c631bf0c4a5970 caused test_exceptions.ExceptionTests.test_recursion_in_except_handler to stack overflow only on windows debug builds. 3 windows buildbots using python debug mode is affected. Python

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-08 Thread Ken Jin
New submission from Ken Jin : Hi all, I created this issue after discussion in https://bugs.python.org/issue39573#msg395206: In issue39573 "[C API] Make PyObject an opaque structure in the limited C API" the commit f3fa63ec75fdbb4a08a10957a5c631bf0c4a5970 ("Py_TYPE becomes a

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-09 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +25213 pull_request: https://github.com/python/cpython/pull/26627 ___ Python tracker <https://bugs.python.org/issue44

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-06-09 Thread Ken Jin
Ken Jin added the comment: @Steve thanks for the info, > This is already what we do, so if someone has increased stack usage, they > should also decrease the value here. I see the recursion limit set in _PyEval_InitState but I don't see any special settings for windows. Is i

[issue44353] PEP 604 NewType

2021-06-10 Thread Ken Jin
Change by Ken Jin : -- nosy: +Jelle Zijlstra, gvanrossum, kj, levkivskyi versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue44353> ___ ___

[issue44392] Py_GenericAlias is not documented

2021-06-11 Thread Ken Jin
Ken Jin added the comment: Ronald, may I take this please? Or are you working on something already? -- nosy: +gvanrossum, kj ___ Python tracker <https://bugs.python.org/issue44

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Ken Jin
Change by Ken Jin : -- keywords: +patch pull_requests: +25314 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26724 ___ Python tracker <https://bugs.python.org/issu

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Ken Jin
Ken Jin added the comment: > maybe it was a mistake to expose this I was wondering if this was accidentally added at the time too. > Remind me what use is made of this from C code It's required for a C extension type to implement the __class_getitem__ method properly. Eg. ``

[issue44392] Py_GenericAlias is not documented

2021-06-14 Thread Ken Jin
Ken Jin added the comment: (Copied over from the PR) BTW, I also noticed the stable ABI manifest exposes the wrong return type for Py_GenericAliasType. It exposes it as a function when it's a var/type/struct. So I fixed that in the PR too otherwise the docs weren't compiling (I

[issue44392] Py_GenericAlias is not documented

2021-06-15 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +25325 pull_request: https://github.com/python/cpython/pull/26739 ___ Python tracker <https://bugs.python.org/issue44

[issue44392] Py_GenericAlias is not documented

2021-06-16 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +25342 pull_request: https://github.com/python/cpython/pull/26757 ___ Python tracker <https://bugs.python.org/issue44

<    1   2   3   4   5   6   >