[issue44958] [sqlite3] only reset statements when needed

2021-08-20 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Ref. Serhiy's msg387858 in bpo-43350: "Maybe the code could be rewritten in more explicit way and call pysqlite_statement_reset() only when it is necessary [...]" Currently, we try to reset statements in all "statement exit" routes. IMO, it would be clean

[issue44958] [sqlite3] only reset statements when needed

2021-08-20 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- Removed message: https://bugs.python.org/msg399931 ___ Python tracker ___ ___ Python-bugs-list mail

[issue44940] Hint the use of non-capturing group in re.findall() documentation

2021-08-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch nosy: +serhiy.storchaka nosy_count: 3.0 -> 4.0 pull_requests: +26309 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27849 ___ Python tracker

[issue20499] Rounding errors with statistics.variance

2021-08-20 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11: >>> statistics.pvariance([0,0,1]) 0.4 >>> statistics.variance([0,0,2]) 1.3335 -- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5 ___ Pyt

[issue21111] Add a new PyLong_AsUnsignedLongAndOverflow function

2021-08-20 Thread Mark Dickinson
Mark Dickinson added the comment: Let's close this one. The patch is stale, and I think we should be somewhat cautious about expanding the C-API without clear use-cases - I don't think it's worth adding the new function just for symmetry / consistency. I'm happy to re-open if those use-cases

[issue44728] Testsuite fails on x86_64

2021-08-20 Thread Mark Dickinson
Mark Dickinson added the comment: Update: test_turtle is fixed (44734); I think test_math and test_cmath should be resolved as either "third party" or "wont fix", since the issue is almost certainly the platform libm. That leaves test_posix, which we should probably open a fresh issue for.

[issue44728] Testsuite fails on x86_64

2021-08-20 Thread Mark Dickinson
Mark Dickinson added the comment: Here's the test_posix failure, extracted from the attachment: == ERROR: test_sched_rr_get_interval (test.test_posix.PosixTester) ---

[issue44934] Windows installer: Append Python to PATH instead of prepending it

2021-08-20 Thread Bastian Neuburger
Bastian Neuburger added the comment: Hi Steve, Of course there are various reasons for having multiple Python versions on a developer workstation but I would assume that the majority of Windows installer users simple want to run Python projects, at least this holds true for the majority of

[issue44449] Segfault in _PyTrash_begin when faulthandler tries to dump thread stacks

2021-08-20 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +26310 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27850 ___ Python tracker ___ _

[issue44959] EXT_SUFFIX is missing '.sl' on HP-UX

2021-08-20 Thread Florin Spătar
New submission from Florin Spătar : On HP-UX, python can no longer find extension modules with the '.sl' suffix. [fspatar@hpux1131:/cust/fspatar/buildtest/hp-ux/11.31/build]> ~/tmp/investigation3/old/bin/python3 Python 3.8.11 (default, Aug 3 2021, 06:15:31) [GCC 4.2.4] on hp-ux-pa Type "help"

[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()

2021-08-20 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue44625] Python C API version of `fractions` module

2021-08-20 Thread Mark Dickinson
Mark Dickinson added the comment: Closing here. I think we'd need a PEP and a wider discussion to take this forward. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue44959] EXT_SUFFIX is missing '.sl' on HP-UX

2021-08-20 Thread STINNER Victor
STINNER Victor added the comment: Can you please try to convert your patch into a GitHub pull request? -- ___ Python tracker ___ __

[issue28327] statistics.geometric_mean gives incorrect results for mixed int/float inputs

2021-08-20 Thread Irit Katriel
Irit Katriel added the comment: I can't reproduce this now: >>> statistics.geometric_mean([2, 3, 5, 7]) 3.80675409583932 >>> statistics.geometric_mean([2, 3, 5, 7.0]) 3.80675409583932 >>> statistics.geometric_mean([2, 3, 5.0, 7.0]) 3.80675409583932 >>> statistics.geometric_mean([2, 3.0, 5.0, 7

[issue28111] geometric_mean can raise OverflowError for large input length

2021-08-20 Thread Irit Katriel
Irit Katriel added the comment: I can't reproduce this now (tried on mac and windows): >>> statistics.geometric_mean([0.7 for _ in range(5000)]) 0.7 The current geometric_mean was added in PR12638. Is this issue about a previous version? -- nosy: +iritkatriel __

[issue44547] fraction.Fraction does not implement __int__.

2021-08-20 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +26311 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27851 ___ Python tracker ___ _

[issue28111] geometric_mean can raise OverflowError for large input length

2021-08-20 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, @Irit. Yes, this is about a different version of geometric_mean that didn't end up making it into any release. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <

[issue28327] statistics.geometric_mean gives incorrect results for mixed int/float inputs

2021-08-20 Thread Mark Dickinson
Mark Dickinson added the comment: > Is this issue about a previous version? Yep. Sorry for failing to close this earlier. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue20389] clarify meaning of xbar and mu in pvariance/variance of statistics module

2021-08-20 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4 ___ Python tracker ___ ___ P

[issue44728] Testsuite fails on x86_64

2021-08-20 Thread Mark Dickinson
Mark Dickinson added the comment: One more thought on the libm issues - from the logs, it looks as though the libm implementation is coming from a fairly recent version of glibc (glibc 2.33, which was released in February 2021). There were updates to the 'exp' implementation in glibc in 2018

[issue16801] Preserve original representation for integers / floats in docstrings

2021-08-20 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue20389] clarify meaning of xbar and mu in pvariance/variance of statistics module

2021-08-20 Thread Irit Katriel
Irit Katriel added the comment: I've closed issue36099 as a duplicate of this. -- nosy: +iritkatriel ___ Python tracker ___ ___ Pyt

[issue36099] Clarify the difference between mu and xbar in the statistics documentation

2021-08-20 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> clarify meaning of xbar and mu in pvariance/variance of statistics module ___ Python tracker _

[issue27353] Add nroot function to math

2021-08-20 Thread Irit Katriel
Irit Katriel added the comment: Is this still needed? It was requested for issue27181, which has been resolved by now. -- nosy: +iritkatriel ___ Python tracker ___ __

[issue44344] Documentation for pow() should include the possibility of complex numbers as a return type

2021-08-20 Thread Mark Dickinson
Change by Mark Dickinson : -- keywords: +patch pull_requests: +26312 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27853 ___ Python tracker ___ _

[issue44959] EXT_SUFFIX is missing '.sl' on HP-UX

2021-08-20 Thread mattip
mattip added the comment: I assume you tried and succeeded with your patch. Could you post what `_imp.extension_suffixes()` reports after the patch? I am a bit confused because you said the following, should the last line be `_m2crypto.sl` and not `_m2crypto.sl` ? my understanding is that

[issue44344] Documentation for pow() should include the possibility of complex numbers as a return type

2021-08-20 Thread Mark Dickinson
Change by Mark Dickinson : -- assignee: docs@python -> mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue44960] Add regression test for geometric test

2021-08-20 Thread Steven D'Aprano
New submission from Steven D'Aprano : Hi Irit, thanks for looking at #28327. Sorry to be That Guy who can't do it himself, but I'm still stuck with old tech and ignorance about the git way of doing things, which limits my ability to do PRs :-( Would you be willing to add a regression test fo

[issue27353] Add nroot function to math

2021-08-20 Thread Mark Dickinson
Mark Dickinson added the comment: [Irit] > Is this still needed? It's not needed for geometric_mean. It's still a reasonable feature request, but it would be non-trivial effort to put a good quality implementation together - C doesn't have this function, so we can't simply wrap it like we d

[issue44960] Add regression test for geometric test

2021-08-20 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue44547] fraction.Fraction does not implement __int__.

2021-08-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fraction.__int__ = Fraction.__trunc__ may not work because __trunc__() can return any object with __index__, while __int__ should return an exact int (not even an int subclass). -- ___ Python tracker

[issue44959] EXT_SUFFIX is missing '.sl' on HP-UX

2021-08-20 Thread Florin Spătar
Florin Spătar added the comment: @mattip Yes, the patch fixed the issue and the extension module import works. With the patch applied: [fspatar@hpux1131:/cust/fspatar/buildtest/hp-ux/11.31/build]> /opt/OPSWbuildtools/2.0.5/python/3.8.11.01/bin/python3 Python 3.8.11 (default, Aug 4 2021, 03:1

[issue44954] Bug in float.fromhex

2021-08-20 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 60b93d9e4922eeae25052bc15909d1f4152babde by Mark Dickinson in branch 'main': bpo-44954: Fix wrong result in float.fromhex corner case (GH-27834) https://github.com/python/cpython/commit/60b93d9e4922eeae25052bc15909d1f4152babde --

[issue44954] Bug in float.fromhex

2021-08-20 Thread miss-islington
Change by miss-islington : -- pull_requests: +26314 pull_request: https://github.com/python/cpython/pull/27855 ___ Python tracker ___ __

[issue44954] Bug in float.fromhex

2021-08-20 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +26313 pull_request: https://github.com/python/cpython/pull/27854 ___ Python tracker _

[issue44960] Add regression test for geometric test

2021-08-20 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +26315 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27856 ___ Python tracker ___ ___

[issue44959] EXT_SUFFIX is missing '.sl' on HP-UX

2021-08-20 Thread Roundup Robot
Change by Roundup Robot : -- nosy: +python-dev nosy_count: 5.0 -> 6.0 pull_requests: +26316 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27857 ___ Python tracker __

[issue44960] Add regression test for geometric_mean

2021-08-20 Thread Irit Katriel
Change by Irit Katriel : -- title: Add regression test for geometric test -> Add regression test for geometric_mean ___ Python tracker ___

[issue44954] Bug in float.fromhex

2021-08-20 Thread Mark Dickinson
Mark Dickinson added the comment: New changeset 7ef0673de48958bc3a75af5f152564bd2dffa8dd by Miss Islington (bot) in branch '3.9': bpo-44954: Fix wrong result in float.fromhex corner case (GH-27834) (GH-27855) https://github.com/python/cpython/commit/7ef0673de48958bc3a75af5f152564bd2dffa8dd

[issue44954] Bug in float.fromhex

2021-08-20 Thread Mark Dickinson
Mark Dickinson added the comment: Fixed in the main branch and in 3.9; 3.10 is very close to release, so the backport PR for 3.10 may have to wait for 3.10.1 (which wouldn't really be a problem, given that this bug has apparently lain unnoticed since Python 2.7). That's Pablo's call, of cour

[issue43093] Make modules picklable

2021-08-20 Thread Cornelius Krupp
Cornelius Krupp added the comment: I would also like to see this added, and I can also provided a usecase where I naturally came across this. I am helping on a parsing library which uses regular expressions internally. We allow the user to select the stdlib re module or the third party regex

[issue39218] Assertion failure when calling statistics.variance() on a float32 Numpy array

2021-08-20 Thread Irit Katriel
Irit Katriel added the comment: I've reproduced this on 3.9 and 3.10. This part of the code in main is still the same, so the issue is probably there even though we don't have numpy with which to test. -- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8

[issue44961] @classmethod doesn't set __wrapped__ the same way as functool's update_wrapper

2021-08-20 Thread Thomas
New submission from Thomas : @classmethod defines a __wrapped__ attribute that always points to the inner most function in a decorator chain while functool's update_wrapper has been fixed to set the wrapper.__wrapped__ attribute after updating the wrapper.__dict__ (see https://bugs.python.org

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-20 Thread Maximilian Hils
Change by Maximilian Hils : -- keywords: +patch pull_requests: +26317 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27859 ___ Python tracker ___

[issue44960] Add regression test for geometric_mean

2021-08-20 Thread Irit Katriel
Irit Katriel added the comment: New changeset f5d7a8d29c49ad47254fa098abb7a510e5e7b45e by Irit Katriel in branch 'main': bpo-44960: add regression test for geometric_mean with mixed int/floa… (#27856) https://github.com/python/cpython/commit/f5d7a8d29c49ad47254fa098abb7a510e5e7b45e -

[issue44960] Add regression test for geometric_mean

2021-08-20 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue21184] statistics.pvariance with known mean does not work as expected

2021-08-20 Thread Irit Katriel
Irit Katriel added the comment: I can't reproduce this on 3.11, was it fixed? >>> import statistics >>> data = [1, 2, 2, 2, 3, 4] >>> statistics.pvariance(data) 0. >>> statistics.pvariance(data, 2.5) 0.9166 >>> -- nosy: +iritkatriel ___

[issue33084] statistics module: NaN handling in median, median_high an median_low

2021-08-20 Thread Irit Katriel
Irit Katriel added the comment: Reproduced in 3.11: >>> import numpy as np >>> import statistics as stats >>> data = [75, 90,85, 92, 95, 80, np.nan] >>> stats.median(data) 90 >>> stats.median_low(data) 90 >>> stats.median_high(data) 90 -- nosy: +iritkatriel title: Computing median, me

[issue44962] asyncio.create_task weakrefset race condition

2021-08-20 Thread Thomas Grainger
New submission from Thomas Grainger : with the following demo script I can get a IndexError: pop from empty list ``` import itertools import asyncio import concurrent.futures import sys import threading threads = 200 def test_all_tasks_threading() -> None: async def foo() -> None:

[issue44962] asyncio.create_task weakrefset race condition

2021-08-20 Thread Thomas Grainger
Change by Thomas Grainger : -- versions: +Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue44962] asyncio.create_task weakrefset race condition

2021-08-20 Thread Thomas Grainger
Change by Thomas Grainger : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue30999] statistics module: add a general selection function

2021-08-20 Thread Irit Katriel
Irit Katriel added the comment: Updating the subject according to the discussion. -- nosy: +iritkatriel title: statistics module: add "key" keyword argument to median, mode, ... -> statistics module: add a general selection function versions: +Python 3.11 -Python 3.7

[issue44962] asyncio.create_task weakrefset race condition

2021-08-20 Thread Thomas Grainger
Thomas Grainger added the comment: still happens on 3.10 even though there's an `with _IterationGuard` ``` worked 0 Traceback (most recent call last): File "/home/graingert/projects/asyncio-demo/demo.py", line 36, in sys.exit(main()) File "/home/graingert/projects/asyncio-demo/demo.py

[issue44962] asyncio.create_task weakrefset race condition

2021-08-20 Thread Thomas Grainger
Thomas Grainger added the comment: interestingly 3.10 didn't show: sys:1: RuntimeWarning: coroutine 'BaseEventLoop.shutdown_asyncgens' was never awaited -- ___ Python tracker __

[issue44962] asyncio.create_task weakrefset race condition

2021-08-20 Thread Ben
Ben added the comment: I can reproduce on 3.9.6 A little digging and it seems asyncio imports Task from _asyncio and _asyncio's implementation (in asynciomodule.c) of Task has an __init__ which adds the task to the `all_tasks` weakref.WeakSet which appears to be implemented in Python (in Lib/

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-20 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +26318 pull_request: https://github.com/python/cpython/pull/27860 ___ Python tracker _

[issue44926] typing.get_type_hints() raises for type aliases with forward references

2021-08-20 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 16b9be4861e007ad483611ba0479feb2b90ea783 by Maximilian Hils in branch 'main': bpo-44926: `get_type_hints`: Add note about type aliases with forward refs (#27859) https://github.com/python/cpython/commit/16b9be4861e007ad483611ba0479feb2b90ea78

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2021-08-20 Thread Hasan
Hasan added the comment: We have tested with cxx-modules that issue. module is just a specifier for export (only export is a compiler-based keyword in >= C++20) That's why we can use module as argument name and there's no need to rename or delete *module arguments from header files. What do

[issue44940] Hint the use of non-capturing group in re.findall() documentation

2021-08-20 Thread Rondevous
Rondevous added the comment: To clarify in short: the pattern I mentioned doesn't give the result I expected in re.findall() unlike re.search() Given pattern: (foo)?bar|cool Maybe my approach in testing the regex first using re.search() and then using re.findall() to return all matches was

[issue44940] Suggest the use of non-capturing groups in re.findall() and re.finditer() docs

2021-08-20 Thread Rondevous
Rondevous added the comment: >From my understanding, "|" should match either the RegEx on the left or the >RegEx on the right of the pipe >>> help(re): "|" A|B, creates an RE that will match either A or B. With re.search(), the pattern below matches 'cool' as well as 'foo' >>> re

[issue44940] Suggest the use of non-capturing groups in re.findall() and re.finditer() docs

2021-08-20 Thread Rondevous
Rondevous added the comment: Maybe the functionality of re.findall and re.finditer is limited because, e.g. I can't do something like this: https://stackoverflow.com/questions/3512471/what-is-a-non-capturing-group-in-regular-expressions#3513858 The workaround for doing that might need me to e

[issue44940] Suggest the use of non-capturing groups in re.findall() and re.finditer() docs

2021-08-20 Thread Rondevous
Rondevous added the comment: To produce the same results that you'd get by using the global flag in javascript regex, and make re.findall to not capture the groups exclusively, all the groups in the pattern need to be of the non-capturing (?:) type. If the distinction about capturing and no

[issue4442] document immutable type subclassing via __new__

2021-08-20 Thread Gautam Chaudhuri
Change by Gautam Chaudhuri : -- nosy: +quantum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue44940] Suggest the use of non-capturing groups in re.findall() and re.finditer() docs

2021-08-20 Thread Vedran Čačić
Vedran Čačić added the comment: Have you seen the patch? In the patched docs, non-capturing grouping is explicitly mentioned. (Though I myself wouldn't include even that, as it's superfluous with what's said before, obviously it's needed.:) -- ___

[issue44940] Suggest the use of non-capturing groups in re.findall() and re.finditer() docs

2021-08-20 Thread Vedran Čačić
Vedran Čačić added the comment: Also, maybe you should read the following sentence (also in the docs): > If one wants more information about all matches of a pattern than the matched > text, finditer() is useful as it provides match objects instead of strings. It seems that's what you wanted

[issue44524] __name__ attribute in typing module

2021-08-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26319 pull_request: https://github.com/python/cpython/pull/27861 ___ Python tracker ___

[issue44963] anext_awaitable is not a collections.abc.Generator

2021-08-20 Thread Daniel Pope
New submission from Daniel Pope : The anext_awaitable object returned by anext(..., default) does not support .send()/.throw(). It only supports __next__(). So we can pass messages from the suspending coroutine to the event loop but not from the event loop to the suspending coroutine. trio a

[issue44954] Bug in float.fromhex

2021-08-20 Thread miss-islington
miss-islington added the comment: New changeset 838b0e975fc2c106508eb27d19a9548533ac1e55 by Miss Islington (bot) in branch '3.10': bpo-44954: Fix wrong result in float.fromhex corner case (GH-27834) https://github.com/python/cpython/commit/838b0e975fc2c106508eb27d19a9548533ac1e55 --

[issue44958] [sqlite3] only reset statements when needed

2021-08-20 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I did a quick count of sqlite3_reset()s in the sqlite3 test suite: - main: 2976 calls - PR 27844: 1730 calls Since we never call sqlite3_reset() with a NULL pointer, all sqlite3_reset() calls we execute hold the SQLite db mutex; reducing the number of

[issue44964] Semantics of PyCode_Addr2Line() changed

2021-08-20 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : I have noticed that the semantics of PyCode_Addr2Line() have changed from 3.9 to 3.10. Technically, the function was called with: PyCode_Addr2Line(frame->f_code, frame->f_last_i * 2) but now it needs to be called with PyCode_Addr2Line(frame->f_code

[issue44964] Semantics of PyCode_Addr2Line() changed

2021-08-20 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Sorry, bad copy paste. Correction: Technically, the function was called with: PyCode_Addr2Line(frame->f_code, frame->f_last_i) but now it needs to be called with PyCode_Addr2Line(frame->f_code, frame->f_last_i * 2) -- __

[issue44954] Bug in float.fromhex

2021-08-20 Thread Mark Dickinson
Mark Dickinson added the comment: All fixed! Closing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker ___

[issue11479] Add discussion of trailing backslash in raw string to tutorial

2021-08-20 Thread Irit Katriel
Irit Katriel added the comment: The patch needs to be converted into a github PR, and modified according to the feedback on this issue. -- keywords: +easy nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _

[issue30999] statistics module: add a general selection function

2021-08-20 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue39039] zlib.error with tarfile.open

2021-08-20 Thread jvoisin
jvoisin added the comment: The file was created with a fuzzer, like the one described in https://dustri.org/b/fuzzing-python-in-python-and-doing-it-fast.html -- ___ Python tracker __

[issue44941] Add check_methods function to standard library

2021-08-20 Thread Éric Araujo
Éric Araujo added the comment: FYI there was a ticket and a discussion before: https://mail.python.org/archives/list/python-id...@python.org/thread/FCGDSVWHIJHBYKS2O4RHZVLXCGSGBLQH/#FCGDSVWHIJHBYKS2O4RHZVLXCGSGBLQH Should be reviewed to see the arguments made and determine if things have chan

[issue44954] Bug in float.fromhex

2021-08-20 Thread Pedro Gimeno
Pedro Gimeno added the comment: > @Pedro Thanks again for the report! Just out of curiosity, how did you manage > to find this? I'm writing a C strtod implementation and I was adding corner cases to the unit testing (now published here: https://codeberg.org/pgimeno/ACSL/src/branch/master/te

[issue44965] [sqlite3] early exit for non-DML statements in executemany()

2021-08-20 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Currently, if a non-DML statement is executed with executemany(), we only bail as late as possible: just before the call to _pysqlite_fetch_one_row(). This means that we've already stepped through the statement once (!), and possibly bound values, built

[issue44965] [sqlite3] early exit for non-DML statements in executemany()

2021-08-20 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +26320 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27865 ___ Python tracker __

[issue44963] anext_awaitable is not a collections.abc.Generator

2021-08-20 Thread Joshua Bronson
Change by Joshua Bronson : -- nosy: +jab ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue44963] anext_awaitable is not a collections.abc.Generator

2021-08-20 Thread Thomas Grainger
Thomas Grainger added the comment: it also fails with asyncio.create_task ``` import asyncio async def agen(): yield async def main(): p = agen() await asyncio.create_task(anext(p, 'finished')) asyncio.run(main()) ``` ``` Traceback (most recent call last): File "/home/grainge

[issue44934] Windows installer: Append Python to PATH instead of prepending it

2021-08-20 Thread Steve Dower
Steve Dower added the comment: The logic is probably simplest if you clone the Tools/msi/path project entirely as pathappend. That will technically allow people to both prepend and append if they set both flags, but I think it's okay to say "don't do that", especially if AppendPath is only a

[issue33084] statistics module: NaN handling in median, median_high an median_low

2021-08-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Steven] > Thoughts? 1) Document that results are undefined if a NaN is present in the data. 2) Add function to strip NaNs from the data: def remove_nans(iterable): "Remove float('NaN') and other objects not equal to themselves" return

[issue44915] Python keywords as string keys in TypedDict

2021-08-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: The current behavior is not a bug, so this is an enhancement proposal. -- nosy: +gvanrossum, terry.reedy type: behavior -> enhancement versions: +Python 3.11 -Python 3.8, Python 3.9 ___ Python tracker

[issue44918] Unhandled Exception (Not Implemented) in HTMLParser().feed

2021-08-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Not Implemented Error in stdLib HTMLParser ___ Python tracker ___

[issue30999] statistics module: add a general selection function

2021-08-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: No one has shown any interest in this in a long time. Marking is as closed for now. This issue can be reopened if there is an interest and a reasonable use case that can't be reasonably handled with sorted, min, or max. -- resolution: -> lat

[issue44915] Python keywords as string keys in TypedDict

2021-08-20 Thread Guido van Rossum
Guido van Rossum added the comment: Unfortunately you can’t use Python keywords in such positions and we have no plans to fix this. Serhiy’s workaround is the best you can do. -- resolution: -> wont fix stage: -> resolved status: open -> closed __

[issue44934] Windows installer: Append Python to PATH instead of prepending it

2021-08-20 Thread Bastian Neuburger
Bastian Neuburger added the comment: Thanks for the rundown, after digging a little bit into the abyss that is the WIX toolset if you've never dealt with it before I already started going down that route. I pushed it to my fork of cpython: https://github.com/bneuburg/cpython/commits/issue44

[issue44934] Windows installer: Append Python to PATH instead of prepending it

2021-08-20 Thread Bastian Neuburger
Bastian Neuburger added the comment: Maybe this view better shows what I've actually done: https://github.com/python/cpython/compare/16b9be4861e007ad483611ba0479feb2b90ea783...bneuburg:issue44934?expand=1 -- ___ Python tracker

[issue44934] Windows installer: Append Python to PATH instead of prepending it

2021-08-20 Thread Bastian Neuburger
Bastian Neuburger added the comment: Previous URL got "fixed" by roundup, hopefully this one works: https://github.com/python/cpython/compare/16b9be4861e007ad483611ba0479feb2b90ea783...bneuburg:issue44934 -- ___ Python tracker

[issue44943] Integrate PyHyphen into the textwrap module?

2021-08-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: This strikes me as an example of the sort of thing that should not be in the stdlib. 'Correct' behavior is a matter of opinion and the language being hyphenated. I recommend rejecting. -- nosy: +terry.reedy versions: +Python 3.11 -Python 3.7 _

[issue44934] Windows installer: Append Python to PATH instead of prepending it

2021-08-20 Thread Steve Dower
Steve Dower added the comment: That branch looks like you're on the right track. The build scripts in Tools/msi should Just Work, so I'd be interested to see the error you get. You can also submit it as a PR and the MSI will be built automatically. One thing I noticed is updating the name of

[issue44954] Bug in float.fromhex

2021-08-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue4442] document immutable type subclassing via __new__

2021-08-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch nosy: +rhettinger nosy_count: 8.0 -> 9.0 pull_requests: +26321 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/27866 ___ Python tracker

[issue44943] Integrate PyHyphen into the textwrap module?

2021-08-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Terry. The suggestion is nice but it belongs outside the standard library. -- nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue44963] anext_awaitable is not a collections.abc.Generator

2021-08-20 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +asvetlov, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue39827] setting a locale that uses comma as decimal separator breaks tkinter.DoubleVar

2021-08-20 Thread Andrei Kulakov
Andrei Kulakov added the comment: I wrote a longer explanation but BPO and Chrome ate it. The issue is that DoubleVar is not locale aware. I don't know what should be the actual fix but the following may be a useful workaround (It works on my system): import tkinter import locale import sys

[issue39218] Assertion failure when calling statistics.variance() on a float32 Numpy array

2021-08-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Removing the assertion and implementing Steven's idea seems like the best way to go: sum((y:=(x-c)) * y for x in data) -- ___ Python tracker ___

[issue44966] example code does not macth the very version(3.9)

2021-08-20 Thread 杨青
New submission from 杨青 : 【url】https://docs.python.org/3/tutorial/errors.html 【chapter】8.2. Exceptions 【origina example code】 >>> '2' + 2 Traceback (most recent call last): File "", line 1, in TypeError: Can't convert 'int' object to str implicitly 【what i got in practice】 >>> '2' + 2 Traceb

[issue44966] example code does not macth the very version(3.9)

2021-08-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch nosy: +rhettinger nosy_count: 2.0 -> 3.0 pull_requests: +26322 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27867 ___ Python tracker

  1   2   >