[issue41272] New clause in FOR and WHILE instead of ELSE

2020-07-18 Thread Vedran Čačić
Vedran Čačić added the comment: I completely agree that we should reject this, but you commit a very frequent mistake in programming try-expressions. The problem is, if the first option contains a NameError, second option will be executed. It should be: try: i001 except NameError:

[issue41311] Add a function to get a random sample from an iterable (reservoir sampling)

2020-07-18 Thread Tim Peters
Tim Peters added the comment: The lack of exactness (and possibility of platform-dependent results, including, e.g., when a single platform changes its math libraries) certainly works against it. But I think Raymond is more bothered by that there's no apparently _compelling_ use case, in

[issue41324] Add a minimal decimal capsule API

2020-07-18 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- title: En az ondalık kapsül API ekleme -> Add a minimal decimal capsule API ___ Python tracker ___

[issue41324] En az ondalık kapsül API ekleme

2020-07-18 Thread Abdulkadir Özbudak
Change by Abdulkadir Özbudak : -- title: Add a minimal decimal capsule API -> En az ondalık kapsül API ekleme ___ Python tracker ___

[issue36723] Unittest Discovery for namespace subpackages dot notation fails

2020-07-18 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> unittest discovery doesn't detect namespace packages when given no parameters ___ Python tracker

[issue36723] Unittest Discovery for namespace subpackages dot notation fails

2020-07-18 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-18 Thread Inada Naoki
Inada Naoki added the comment: Searching into directory without __init__.py recursively is not only inefficient, but also dangerous. project/ - mylib/ - __init__.py - foo.py - tests/ - __init__.py - test_foo.py - tools/ - bin/ -

[issue35617] unittest discover does not work with implicit namespaces

2020-07-18 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> unittest discovery doesn't detect namespace packages when given no parameters ___ Python tracker

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-18 Thread Inada Naoki
Inada Naoki added the comment: I think people misunderstanding and misusing PEP 420, withouth knowing what is namespace package for. I had wrote an article to describe namespace package is not a regular package. https://dev.to/methane/don-t-omit-init-py-3hga --

[issue23882] unittest discovery doesn't detect namespace packages when given no parameters

2020-07-18 Thread Inada Naoki
Inada Naoki added the comment: I had rejected this idea in #29642. This is a copy of my comments in the issue. --- I'm afraid this change makes testloader searches unrelated directory contains massive files (like node_modules). I don't think loading all tests from whole namespace package

[issue29642] Why does unittest.TestLoader.discover still rely on existence of __init__.py files?

2020-07-18 Thread Inada Naoki
Change by Inada Naoki : -- superseder: -> unittest discovery doesn't detect namespace packages when given no parameters ___ Python tracker ___

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-18 Thread kam193
kam193 added the comment: @Stefan: Today I run unit tests for Flask-SQLAlchemy (v2.4.3) as well as for aioxmpp (another library reported this problem https://github.com/horazont/aioxmpp/issues/342). In both cases patch is successful: tests fail on Python 3.8.4 but pass on patched Python.

[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-07-18 Thread M W
Change by M W : -- assignee: -> christian.heimes components: +SSL nosy: +M W2, christian.heimes ___ Python tracker ___ ___

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-18 Thread Guido van Rossum
Guido van Rossum added the comment: We have a buildbot failure: test_asyncio altered the execution environment. What does that mean? Victor? -- nosy: +gvanrossum ___ Python tracker

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-18 Thread miss-islington
miss-islington added the comment: New changeset 38d930f2ccbff6f93c4c54a7a6a1759266136504 by Miss Islington (bot) in branch '3.8': bpo-41295: Reimplement the Carlo Verre "hackcheck" (GH-21528) https://github.com/python/cpython/commit/38d930f2ccbff6f93c4c54a7a6a1759266136504 --

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-18 Thread miss-islington
miss-islington added the comment: New changeset 01ab9634601fc1a4f9ac5d72ddc022239d2543fe by Miss Islington (bot) in branch '3.9': bpo-41295: Reimplement the Carlo Verre "hackcheck" (GH-21528) https://github.com/python/cpython/commit/01ab9634601fc1a4f9ac5d72ddc022239d2543fe --

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-18 Thread miss-islington
miss-islington added the comment: New changeset c53b310e5926266ce267c44a168165cacd786d6e by scoder in branch 'master': bpo-41295: Reimplement the Carlo Verre "hackcheck" (GH-21528) https://github.com/python/cpython/commit/c53b310e5926266ce267c44a168165cacd786d6e -- nosy:

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +20683 pull_request: https://github.com/python/cpython/pull/21541 ___ Python tracker ___

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +20682 pull_request: https://github.com/python/cpython/pull/21540 ___ Python tracker ___

[issue29778] [CVE-2020-15523] _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath

2020-07-18 Thread Eryk Sun
Eryk Sun added the comment: > If you can put files in the root of the hard drive where Windows was > installed, surely you have other, easier attack vectors. A rooted path is resolved relative to the process working directory, and Python can be started with any current working directory.

[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-07-18 Thread miss-islington
miss-islington added the comment: New changeset 27b811057ff5e93b68798e278c88358123efdc71 by Miss Islington (bot) in branch '3.9': bpo-39603: Prevent header injection in http methods (GH-18485) https://github.com/python/cpython/commit/27b811057ff5e93b68798e278c88358123efdc71 --

[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-07-18 Thread miss-islington
miss-islington added the comment: New changeset 668d321476d974c4f51476b33aaca870272523bf by Miss Islington (bot) in branch '3.8': bpo-39603: Prevent header injection in http methods (GH-18485) https://github.com/python/cpython/commit/668d321476d974c4f51476b33aaca870272523bf --

[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-07-18 Thread Guido van Rossum
Guido van Rossum added the comment: The 3.9 and 3.8 backports are waiting for tests to complete. The 3.7 and 3.6 backports need to be merged by the RM (Ned). Then someone can close this issue. -- nosy: +gvanrossum ___ Python tracker

[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-07-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +20681 pull_request: https://github.com/python/cpython/pull/21539 ___ Python tracker ___

[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-07-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +20680 pull_request: https://github.com/python/cpython/pull/21538 ___ Python tracker ___

[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-07-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +20679 pull_request: https://github.com/python/cpython/pull/21537 ___ Python tracker ___

[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-07-18 Thread miss-islington
miss-islington added the comment: New changeset 8ca8a2e8fb068863c1138f07e3098478ef8be12e by AMIR in branch 'master': bpo-39603: Prevent header injection in http methods (GH-18485) https://github.com/python/cpython/commit/8ca8a2e8fb068863c1138f07e3098478ef8be12e -- nosy:

[issue39603] [security] http.client: HTTP Header Injection in the HTTP method

2020-07-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +20678 pull_request: https://github.com/python/cpython/pull/21536 ___ Python tracker ___

[issue41272] New clause in FOR and WHILE instead of ELSE

2020-07-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think this should be closed as 'rejected'. 1. I am strongly opposed to giving keywords strongly context-dependent alternate meanings. I also don't think that the proposal could be parsed. Currently, 'if' introduces a new, independent statement, and

[issue20840] AttributeError: 'module' object has no attribute 'ArgumentParser'

2020-07-18 Thread David Friedman
David Friedman added the comment: I know this is 6 years too late, but I had this problem a few minutes ago on Python2.7. Googling didn't find me anything relevant except this bug entry. However, I found the cause myself: I had a test file named argparse.py (and an argparse.pyc) in the

[issue41336] Random segfaults during zoneinfo object creation stopped using Ctrl-C

2020-07-18 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : I get segfaults on random basis in the below program I wrote for issue41321 while trying to use Ctrl-C to stop the program. I used faulthandler but couldn't get to the exact case where it occurs. I tested it on Python 3.9 from deadsnakes ppa and

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-07-18 Thread Howard A. Landman
Change by Howard A. Landman : -- hgrepos: -389 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41335] free(): invalid pointer in list_ass_item() in Python 3.7.3

2020-07-18 Thread Howard A. Landman
New submission from Howard A. Landman : I have a program qtd.py that reliably dies with free(): invalid pointer after about 13 hours of runtime (on a RPi3B+). This is hard to debug because (1) try:except: will not catch SIGABRT (2) signal.signal(signal.SIGABRT, sigabrt_handler) also fails to

[issue41324] Add a minimal decimal capsule API

2020-07-18 Thread Stefan Krah
Stefan Krah added the comment: It looks like the API would be usable, so the PR now has documentation. -- ___ Python tracker ___

[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-07-18 Thread E. Paine
Change by E. Paine : -- keywords: +patch pull_requests: +20677 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21532 ___ Python tracker ___

[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-07-18 Thread E. Paine
Change by E. Paine : -- keywords: +patch pull_requests: +20676 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21532 ___ Python tracker ___

[issue21625] Make help() beginner helpful when no PAGER or LESS variable

2020-07-18 Thread Nagarajan
Nagarajan added the comment: I would request us to think about a couple more options while this is under consideration... Do we want to also add the flags -X and -F to the less options? The -X flag gets less to show its output inline, instead of a separate screen. The advantage here is

[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-07-18 Thread E. Paine
Change by E. Paine : -- keywords: +patch pull_requests: +20675 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21532 ___ Python tracker ___

[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-07-18 Thread E. Paine
E. Paine added the comment: It appears there are issues with this issue and so the PR for it is https://github.com/python/cpython/pull/21532 -- ___ Python tracker ___

[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-07-18 Thread E. Paine
Change by E. Paine : -- keywords: +patch pull_requests: +20674 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21532 ___ Python tracker ___

[issue41314] PEP 563 and annotations __future__ mandatory version

2020-07-18 Thread Guido van Rossum
Guido van Rossum added the comment: The PEP now says 3.10, so the docs for __future__ should be fixed. -- resolution: not a bug -> status: closed -> open ___ Python tracker

[issue41334] Convert str(), bytes() and bytearray() to Argument Clinic

2020-07-18 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41334] Convert str(), bytes() and bytearray() to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +20673 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21535 ___ Python tracker

[issue41334] Convert str(), bytes() and bytearray() to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Constructors str(), bytes() and bytearray() were not converted to Argument Clinic because it was not possible to generate correct signature for them. But now there is other reason of using Argument Clinic -- it generates more efficient code for parsing

[issue41333] Convert OrderedDict.pop() to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +20672 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21534 ___ Python tracker

[issue41332] connect_accepted_socket() missing from AbstractEventLoop

2020-07-18 Thread Alex Grönholm
Change by Alex Grönholm : -- keywords: +patch pull_requests: +20671 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21533 ___ Python tracker ___

[issue41333] Convert OrderedDict.pop() to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR converts OrderedDict.pop() to Argument Clinic. It makes it 2 times faster. $ ./python -m pyperf timeit -q --compare-to=../cpython-release2/python -s "from collections import OrderedDict; od = OrderedDict()" "od.pop('x', None)" Mean +-

[issue41332] connect_accepted_socket() missing from AbstractEventLoop

2020-07-18 Thread Alex Grönholm
New submission from Alex Grönholm : The connect_accepted_socket() method seems to be missing from the AbstractEventLoop ABC. I assume this was a simple mistake of omission. I will ready a PR to add it. -- components: asyncio messages: 373904 nosy: alex.gronholm, asvetlov, yselivanov

[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-07-18 Thread E. Paine
Change by E. Paine : -- keywords: +patch pull_requests: +20670 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21532 ___ Python tracker ___

[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-07-18 Thread E. Paine
Change by E. Paine : -- keywords: +patch pull_requests: +20668 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21532 ___ Python tracker ___

[issue39093] tkinter objects garbage collected from non-tkinter thread cause crash

2020-07-18 Thread E. Paine
Change by E. Paine : -- keywords: +patch pull_requests: +20669 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21532 ___ Python tracker ___

[issue41325] Document addition of `mock.call_args.args` and `mock.call_args.kwargs` in 3.8

2020-07-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks Jordan for the report and patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue41325] Document addition of `mock.call_args.args` and `mock.call_args.kwargs` in 3.8

2020-07-18 Thread miss-islington
miss-islington added the comment: New changeset f92544483fc724b7e9ac11b2ee86b38e069cc70f by Miss Islington (bot) in branch '3.9': bpo-41325: Add version note for args and kwargs property in call object (GH-21525)

[issue41325] Document addition of `mock.call_args.args` and `mock.call_args.kwargs` in 3.8

2020-07-18 Thread miss-islington
miss-islington added the comment: New changeset 7734738d71c052779d3cb189e5ba0759beb8d620 by Miss Islington (bot) in branch '3.8': bpo-41325: Add version note for args and kwargs property in call object (GH-21525)

[issue40820] Mock Call attributes args and kwargs have no changeversion

2020-07-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks for the report. Closing this in favor of https://bugs.python.org/issue41325 -- resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> Document addition of `mock.call_args.args` and

[issue41325] Document addition of `mock.call_args.args` and `mock.call_args.kwargs` in 3.8

2020-07-18 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +20666 pull_request: https://github.com/python/cpython/pull/21530 ___ Python tracker

[issue41325] Document addition of `mock.call_args.args` and `mock.call_args.kwargs` in 3.8

2020-07-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +20667 pull_request: https://github.com/python/cpython/pull/21531 ___ Python tracker ___

[issue41325] Document addition of `mock.call_args.args` and `mock.call_args.kwargs` in 3.8

2020-07-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: New changeset 9b01c598ca2576a1056816e85dd84bf5f9c74688 by Jordan Speicher in branch 'master': bpo-41325: Add version note for args and kwargs property in call object (GH-21525)

[issue41325] Document addition of `mock.call_args.args` and `mock.call_args.kwargs` in 3.8

2020-07-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This is a duplicate of https://bugs.python.org/issue40820 . But this PR has cla signed so I am inclined towards merging this instead. -- nosy: +xtreak ___ Python tracker

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-18 Thread Stefan Behnel
Stefan Behnel added the comment: PR 21528 works for all four test cases that we now have (1x test_capi.py, 3x test_descr.py). Any comments? We need to merge a fix before Monday to meet the deadline of the planned hotfix release. @kam193, could you please also test that change with your

[issue38805] locale.getlocale() returns a non RFC1766 language code

2020-07-18 Thread Riccardo Polignieri
Riccardo Polignieri added the comment: > `locale.getlocale()` is now returning strange results Not really "strange results" - fact is, now "getlocale()" returns the locale name *as if* it were already set from the beginnning (because it is, at least in part). Before: >>> import locale #

[issue41262] Convert memoryview to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not have other benchmarks. memoryview was just one of few builtins which still use PyArg_ParseTupleAndKeywords() and I know how inefficient it is. Since Argument Clinic was already used for memoryview.hex() I did not see problems with converting the

[issue41311] Add a function to get a random sample from an iterable (reservoir sampling)

2020-07-18 Thread Oscar Benjamin
Oscar Benjamin added the comment: > Please don't get personal. Sorry, that didn't come across with the intended tone :) I agree that this could be out of scope for the random module but I wanted to make sure the reasons were considered. Reading between the lines I get the impression that

[issue41326] Build failure in blurb-it repo: "Failed building wheel for yarl"

2020-07-18 Thread Ned Deily
Ned Deily added the comment: blurb-it imports aiohttp which imports yarl. It might be a duplicate of https://github.com/aio-libs/yarl/issues/459 -- nosy: +asvetlov, ned.deily ___ Python tracker

[issue41262] Convert memoryview to Argument Clinic

2020-07-18 Thread Stefan Krah
Stefan Krah added the comment: I cannot detect a speedup in test_buffer, which is a heavy user of memoryviews: # before: >>> a = [3.742, 3.589, 3.542, 3.495, 3.481, 3.620, 3.773, 3.755, 3.701, 3.661] >>> sum(a) / 10 3.63589995 # after >>> b = [3.63, 3.596, 3.475, 3.43, 3.792, 3.58,

[issue41304] [CVE-2020-15801] python 38 embed ignore python38._pth file on windows

2020-07-18 Thread Ned Deily
Ned Deily added the comment: New changeset eb0d255ffe002412bb937e1bde61225e5431da5e by Miss Islington (bot) in branch '3.7': bpo-41304: Update NEWS to include CVE-2020-15801 reference (GH-21521) (GH-21524) https://github.com/python/cpython/commit/eb0d255ffe002412bb937e1bde61225e5431da5e

[issue41330] Inefficient error-handle for CJK encodings

2020-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In the Web application you need first to generate data (this may involve some network requests, IO operations, and some data transformations), then format the page, then encode it, and finally send it to client. I suppose that the encoding part is minor

[issue41330] Inefficient error-handle for CJK encodings

2020-07-18 Thread Ma Lin
Ma Lin added the comment: > But how many new Python web application use CJK codec instead of UTF-8? A CJK character usually takes 2-bytes in CJK encodings, but takes 3-bytes in UTF-8. I tested a Chinese book: in GBK: 853,025 bytes in UTF-8: 1,267,523 bytes For CJK content, UTF-8 is

[issue41331] Sphinx can't find asdl.py when not started from the Doc/ directory

2020-07-18 Thread Julien Palard
Change by Julien Palard : -- keywords: +patch pull_requests: +20665 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21529 ___ Python tracker ___

[issue41331] Sphinx can't find asdl.py when not started from the Doc/ directory

2020-07-18 Thread Julien Palard
New submission from Julien Palard : When running the following command from the Doc/ directory: ./venv/bin/sphinx-build -Q -b gettext -D gettext_compact=0 . ../pot/ everything goes right, but when running the following from cpython direcory: ./Doc/venv/bin/sphinx-build -Q -b gettext

[issue41262] Convert memoryview to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41262] Convert memoryview to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 80a50368c0e4dc9d56af0ce748dea35c9d96d23f by Serhiy Storchaka in branch 'master': bpo-41262: Convert memoryview to Argument Clinic. (GH-21421) https://github.com/python/cpython/commit/80a50368c0e4dc9d56af0ce748dea35c9d96d23f --

[issue41288] Pickle crashes unpickling invalid NEWOBJ_EX opcode

2020-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b4c98ed41e6c959e95b2a6f65c1b728e94039dfd by Serhiy Storchaka in branch 'master': bpo-41288: Refactor of unpickling NEWOBJ and NEWOBJ_EX opcodes. (GH-21472) https://github.com/python/cpython/commit/b4c98ed41e6c959e95b2a6f65c1b728e94039dfd

[issue41330] Inefficient error-handle for CJK encodings

2020-07-18 Thread Inada Naoki
Inada Naoki added the comment: But how many new Python web application use CJK codec instead of UTF-8? -- nosy: +inada.naoki ___ Python tracker ___

[issue41271] Add support for io_uring to cpython

2020-07-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm closing this as "later" as the consensus is that this might be a useful binding to have, but io_uring is evolving too fast at the moment. It is better to develop these bindings on PyPI, which also makes it easier to iterate on the design. --

[issue41315] Add mathematical functions as wrappers to decimal.Decimal methods

2020-07-18 Thread Jean Abou Samra
Jean Abou Samra added the comment: Okay, understood, thanks for your detailed explanations. -- ___ Python tracker ___ ___

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

2020-07-18 Thread Stefan Behnel
Stefan Behnel added the comment: I pushed PR 21528 with a new proposal. See issue 41295. -- ___ Python tracker ___ ___

[issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses

2020-07-18 Thread Stefan Behnel
Change by Stefan Behnel : -- pull_requests: +20664 pull_request: https://github.com/python/cpython/pull/21528 ___ Python tracker ___

[issue41330] Inefficient error-handle for CJK encodings

2020-07-18 Thread Ma Lin
Ma Lin added the comment: IMO "xmlcharrefreplace" is useful for Web application. For example, the page's charset is "gbk", then this statement can generate the bytes content easily & safely: s.encode('gbk', 'xmlcharrefreplace') Maybe some HTML-related frameworks use this way to escape

[issue41297] Remove doctest import from heapq

2020-07-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: modulegraph already knows where the import is done, and users of the library can use that information to make decisions. There's no need to make changes to either heapq.py or modulegraph. For py2app I've made the choice to no be smart about inclusions and

[issue40059] Provide a toml module in the standard library

2020-07-18 Thread Va
Va added the comment: 1.0.0-rc.1 is out by now: https://github.com/toml-lang/toml/blob/master/CHANGELOG.md -- nosy: +VA versions: +Python 3.10 ___ Python tracker ___

[issue41330] Inefficient error-handle for CJK encodings

2020-07-18 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

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

2020-07-18 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

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

2020-07-18 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

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

2020-07-18 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

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

2020-07-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: The current behavior is not a bug as it follows documented behavior. In the absence of any use for returning values from test functions, I agree that we should do the simple thing and raise ValueError (I checked and did not find anything like a

[issue41315] Add mathematical functions as wrappers to decimal.Decimal methods

2020-07-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Jean, I sympathize a bit with your wish, but decimal was designed for business, not science. Sqrt, exp, and 3 versions of log are the only math methods, and they happen to be the ones with some use in business calculations and statistics. Extended