[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-17 Thread Stefan Behnel
Stefan Behnel added the comment: The problem in the test added in PR 21473 is that there is an intermediate base type "object" in the hierarchy: class A(type): def __setattr__(cls, key, value): type.__setattr__(cls, key, value) class B: pass class C(B

[issue41322] unittest: deprecate test methods returning non-None values

2020-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is also a good idea for linters to catch such kind of errors. It will help users of older Python versions. We cannot raise error without deprecation period or add warnings in old versions because it potentially can break existing code, e.g.: def te

[issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?)

2020-07-17 Thread Stefan Behnel
Stefan Behnel added the comment: > intermediate base type "object" in the hierarchy Sorry, I meant an intermediate base type "B", which inherits its setattr from "object". -- ___ Python tracker ___

[issue41330] Inefficient error-handle for CJK encodings

2020-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not even sure it was worth to add fast path for "xmlcharrefreplace". "surrogateescape" and "surrogatepass" are most likely used in performance critical cases. It is also easy to add support of "ignore" and "replace". "strict" raises an exception in an

<    1   2