[issue44096] Bad clang detection in configure script

2021-05-09 Thread Rishav Kundu
New submission from Rishav Kundu : Because autoconf detects `cc` before `clang` [1], this means that most of the checks in configure.ac that compare $CC to `clang` don’t work. This in turn means that things like LTO and PGO don’t work — the appropriate compiler options do not get set. I can

[issue44076] issue with list in Python 3.8.5

2021-05-09 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: It doesn't seem to be a Python bug at all. This is pretty awkward that even without upgrading your Python your program is breaking. I don't know tkinter well but upgrading your Windows shouldn't affect tkinter at all. And as Steven described if that was

[issue44094] Remove PyErr_Set...WithUnicodeFilename APIs

2021-05-09 Thread Inada Naoki
Change by Inada Naoki : -- keywords: +patch pull_requests: +24661 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26011 ___ Python tracker ___

[issue44095] Add suffix property to zipfile.Path

2021-05-09 Thread Jakub Nowak
New submission from Jakub Nowak : suffix property is present on pathlib.Path (specifically pathlib.PurePath) and it could also be added to zipfile.Path for consistency. My use case is filtering files by suffix: patch_files = list(filter(lambda file: file.suffix == '.patch', files))

[issue44094] Remove PyErr_Set...WithUnicodeFilename APIs

2021-05-09 Thread Inada Naoki
New submission from Inada Naoki : These APIs are deprecated since Python 3.3. They are not documented too. ``` #ifdef MS_WINDOWS Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithUnicodeFilename( PyObject *, const Py_UNICODE *); /* XXX redeclare to use WSTRING */

[issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal()

2021-05-09 Thread Inada Naoki
Inada Naoki added the comment: For the record, I noticed PyUnicode_InternImmortal() is a stable ABI. We may need to keep the function to avoid dynamic link errors. But we can still change its implementation to just raise an exception. -- ___

[issue44093] compiler detection on macOS seems to be incorrect

2021-05-09 Thread Ned Deily
Change by Ned Deily : -- assignee: -> ned.deily components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker ___ ___

[issue44090] Add class binding to unbound super objects for allowing autosuper with class methods

2021-05-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: Do we have any meaningful examples to show that this is desired and useful? The primary use case for classmethods is to serve as alternate constructors that return new instances. That doesn't really lend itself to extending in a subclass. User's can

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

2021-05-09 Thread Guido van Rossum
Guido van Rossum added the comment: Moving the needle on the pyperformance benchmarks is really hard! -- ___ Python tracker ___

[issue44028] Request for locals().update() to work, it is

2021-05-09 Thread wang xuancong
wang xuancong added the comment: Thanks @terry.reedy for your expert-level good comments! 1. "In Python 3, the one *implementation*, and its lookup mode, are fixed. The slower implementation was dropped because it was not thought worth the bother." If I remember correctly, the performance

[issue44090] Add class binding to unbound super objects for allowing autosuper with class methods

2021-05-09 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44093] compiler detection on macOS seems to be incorrect

2021-05-09 Thread Rishav Kundu
New submission from Rishav Kundu : On macOS devices, the configure script seems to always detect gcc, even though Apple does not ship with gcc — the gcc binary is simply a wrapper around clang (probably llvm-gcc?) I believe the issue is with these lines.

[issue44076] issue with list in Python 3.8.5

2021-05-09 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sun, May 09, 2021 at 11:55:56PM +, Mohamed wrote: > Please find attached, the demo with dummy data. As I mentioned, it was > working fine until May 1st. If it was working fine until May 1st, I would start my investigation by looking at what

[issue44076] issue with list in Python 3.8.5

2021-05-09 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sun, May 09, 2021 at 10:04:29PM +, Mohamed wrote: > As I mentioned, It seems that the recent update of Windows has affected > Tkinter, > so that mainloop is not working after the first time That isn't what it looks like to me. If updating Windows

[issue44076] issue with list in Python 3.8.5

2021-05-09 Thread Mohamed
Mohamed added the comment: Please find attached, the demo with dummy data. As I mentioned, it was working fine until May 1st. Also, As I mentioned, in case I call MasterApp at the end of add function data appears correctly. This means a malfunction occurred after Windows Update, and it

[issue40222] "Zero cost" exception handling

2021-05-09 Thread Dennis Sweeney
Dennis Sweeney added the comment: I tried some debugging code: diff --git a/Python/ceval.c b/Python/ceval.c index f745067069..a8668dbac2 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -4864,6 +4864,18 @@ get_exception_handler(PyCodeObject *code, int index) return res;

[issue44076] issue with list in Python 3.8.5

2021-05-09 Thread Andrei Kulakov
Andrei Kulakov added the comment: Hi Mohamed, >From the output it looks like the app is trying to get item at index 28 from assetinfo_list, while that list is of only 17 length. So it seems likely that either app is not inserting enough items into assetinfo_list, or you are clicking on

[issue44076] issue with list in Python 3.8.5

2021-05-09 Thread Mohamed
Mohamed added the comment: I made changes but result is same: xrec = self.treedata.selection()[0] xrec = int(xrec[1:], 16) - 1 print('xrec: ', xrec) itemXid = assetinfo_lst[xrec] itemXid = itemXid[1] Exception in Tkinter callback Traceback (most recent call

[issue44092] [sqlite3] consider removing special rollback handling

2021-05-09 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Attached patch includes the test case from bpo-33376. -- ___ Python tracker ___ ___

[issue44092] [sqlite3] consider removing special rollback handling

2021-05-09 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch Added file: https://bugs.python.org/file50029/patch.diff ___ Python tracker ___

[issue44092] [sqlite3] consider removing special rollback handling

2021-05-09 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Ref. bpo-33376 and bpo-10513. Quoting from the SQLite 3.7.11 changelog[1]: "Pending statements no longer block ROLLBACK. Instead, the pending statement will return SQLITE_ABORT upon next access after the ROLLBACK." Quoting from the SQLite 3.8.7.2

[issue43149] Misleading error message for except with missing parens (3.10.a5)

2021-05-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 9a0e65c8e05fdcd2207650d216ebdacdf0a025e9 by Miss Islington (bot) in branch '3.10': bpo-43149: Correct the syntax error message for multiple exception types (GH-25996) GH-25997)

[issue43389] Cancellation ignored by asyncio.wait_for can hang application

2021-05-09 Thread nmatravolgyi
Change by nmatravolgyi : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42130] AsyncIO's wait_for can hide cancellation in a rare race condition

2021-05-09 Thread nmatravolgyi
nmatravolgyi added the comment: I've also found this deficiency of asyncio.wait_for by debugging an obscure hang in an application. Back then I've quickly made an issue about it: https://bugs.python.org/issue43389 I've just closed it as duplicate, since this issue covers the same bug and

[issue43389] Cancellation ignored by asyncio.wait_for can hang application

2021-05-09 Thread nmatravolgyi
nmatravolgyi added the comment: Closing as duplicate, because there was already an issue for this bug: https://bugs.python.org/issue42130 -- resolution: -> duplicate ___ Python tracker

[issue43109] When using Apple Clang, --with-lto builds should not check for llvm-ar

2021-05-09 Thread Ned Deily
Ned Deily added the comment: Thanks for the PR. I am looking at this area currently. -- ___ Python tracker ___ ___

[issue43109] When using Apple Clang, --with-lto builds should not check for llvm-ar

2021-05-09 Thread Ned Deily
Change by Ned Deily : -- assignee: -> ned.deily components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker ___ ___

[issue44084] Can't mark match, case, _ as keywords in docs

2021-05-09 Thread Tal Einat
Change by Tal Einat : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44080] Bias in random.choices(long_sequence)

2021-05-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, the principal use case that choices() was designed for is resampling/bootstapping. In that use case, speed matters and small imbalances in large sequences don't matter at all. Also, the API was designed to make it easy to select from an itemized

[issue44084] Can't mark match, case, _ as keywords in docs

2021-05-09 Thread Tal Einat
Tal Einat added the comment: Thanks Dominic, it seems that you're absolutely right! -- ___ Python tracker ___ ___ Python-bugs-list

[issue41930] Wrap sqlite3_serialize API in sqlite3 module

2021-05-09 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: FYI, this was just checked into the SQLite fossil repo: $ fossil update trunk updated-to: 6df3b03e00b1143be8fed3a39a58ce8106302027 2021-05-08 17:18:23 UTC tags: trunk comment: Enable the sqlite3_serialize() and sqlite3_deserialize()

[issue44084] Can't mark match, case, _ as keywords in docs

2021-05-09 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: I'm not sure this is a Pygments or Sphinx bug. The documentation for the :keyword: role[1] says: This creates a link to a reference label with that name, if it exists. Looking at the documentation source for "Compound statements"[2] each section

[issue44080] Bias in random.choices(long_sequence)

2021-05-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: This is known and an intentional design decision. It isn't just a speed issue. Because the weights can be floats, we have floats involved at the outset and some round-off is unavoidable. To keep the method internally consistent, the same technique is

[issue44091] traceback & inspect modules should verify that the .py source file matches the one that the running process is using

2021-05-09 Thread Gregory P. Smith
New submission from Gregory P. Smith : A long-standing wart in Python is that once a module is loaded, when rendering a traceback and including source lines, we do not verify if the source file we're loading is the same as the one representing the code we are running. It could have been

[issue44080] Bias in random.choices(long_sequence)

2021-05-09 Thread Dennis Sweeney
Dennis Sweeney added the comment: Your suspicion looks correct, random() is faster: .\python.bat -m pyperf timeit -s "from random import choices" "choices(range(100), k=10_000)" Before int_choices.diff: Mean +- std dev: 1.49 ms +- 0.09 ms After int_choices.diff: Mean +- std dev: 3.50 ms +-

[issue44090] Add class binding to unbound super objects for allowing autosuper with class methods

2021-05-09 Thread Géry
Change by Géry : -- keywords: +patch pull_requests: +24660 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26009 ___ Python tracker ___

[issue43853] [sqlite3] Improve sqlite3_value_text() error handling

2021-05-09 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- title: [sqlite3] Fix sqlite3_value_text() usage -> [sqlite3] Improve sqlite3_value_text() error handling ___ Python tracker ___

[issue44090] Add class binding to unbound super objects for allowing autosuper with class methods

2021-05-09 Thread Géry
New submission from Géry : A use case of one-argument `super` (aka unbound `super`) is Guido van Rossum’s autosuper described in his 2002 article [*Unifying types and classes in Python 2.2*](https://www.python.org/download/releases/2.2.3/descrintro/#cooperation). It works with functions, but

[issue44076] issue with list in Python 3.8.5

2021-05-09 Thread Andrei Kulakov
Andrei Kulakov added the comment: Hi Mohamed, you can try changing the following line: itemXid = assetinfo_lst[xrec][1] to: print('xrec',xrec) itemXid = assetinfo_lst[xrec] itemXid = itemXid[1] This will show you if the index error is caused by xrec or by [1] lookup. If caused by xrec

[issue40222] "Zero cost" exception handling

2021-05-09 Thread Ammar Askar
Ammar Askar added the comment: Seconded, also seeing the same ASAN failure on the fuzzers with a blame for this commit. -- nosy: +ammar2 ___ Python tracker ___

[issue32958] socket module calls with long host names can fail with idna codec error

2021-05-09 Thread Ben Darnell
Ben Darnell added the comment: [I'm coming here from https://github.com/tornadoweb/tornado/pull/3010) UnicodeError is a subclass of ValueError, so I don't see what value that change would provide. The thing that's surprising to me is that it's not a `socket.herror` (or `gaierror` for

[issue40222] "Zero cost" exception handling

2021-05-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: To reproduce with a modern gcc: % export ASAN_OPTIONS=detect_leaks=0:allocator_may_return_null=1:handle_segv=0 % ./configure --with-address-sanitizer --without-pymalloc % make -j -s % ./python -m test test_statistics

[issue40222] "Zero cost" exception handling

2021-05-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40222] "Zero cost" exception handling

2021-05-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This seems to have broken the address sanitizer buildbot: https://buildbot.python.org/all/#/builders/582/builds/116/steps/5/logs/stdio Example error: ==28597==ERROR: AddressSanitizer:

[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

[issue44089] csv.Error can't be subclassed

2021-05-09 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +petr.viktorin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44089] csv.Error can't be subclassed

2021-05-09 Thread Oleg Hoefling
New submission from Oleg Hoefling : Due to changes introduced in https://bugs.python.org/issue14935 the `csv.Error` can't be subclassed in 3.10. To reproduce: Python 3.9.4 (default, Apr 6 2021, 00:00:00) >>> import csv >>> class C(csv.Error): ... pass Python 3.10.0b1 (default, May 4

[issue44088] traced line number can be None

2021-05-09 Thread Ned Batchelder
New submission from Ned Batchelder : Mark, I'm not clear if the line number can still be None in some circumstances. With this code (from site.py in the stdlib): 545: def execsitecustomize(): 546: """Run custom site specific code, if available.""" 547: try: 548: try: 549:

[issue44083] problem with updated 3.9.5

2021-05-09 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32133] documentation: numbers module nitpick

2021-05-09 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.6 ___ Python tracker ___

[issue44083] problem with updated 3.9.5

2021-05-09 Thread Swarnila Chakma
Swarnila Chakma added the comment: Okay actually I managed to solve it. Thanks to both of you for helping me out. -- ___ Python tracker ___

[issue44083] problem with updated 3.9.5

2021-05-09 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: What is the input you're giving? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44083] problem with updated 3.9.5

2021-05-09 Thread Swarnila Chakma
Swarnila Chakma added the comment: I'm executing the code by the software PycharmEdu from jetbrains. I'm actually facing the problem, no matter what input I give in my console, it's automatically just printing empty strings. How can I solve this? --

[issue42454] Move slice creation to the compiler for constants

2021-05-09 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I've implemented a new revision that works without making slices hashable. Updating PR 23496 -- ___ Python tracker ___

[issue29468] zipfile should catch ValueError as well as OSError to detect bad seek calls

2021-05-09 Thread Irit Katriel
Irit Katriel added the comment: Maybe a better option is to change mmap's seek() to raise an OSError, because it's supposed to behave like a file object. -- nosy: +iritkatriel versions: +Python 3.11 -Python 3.6 ___ Python tracker

[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

[issue44080] Bias in random.choices(long_sequence)

2021-05-09 Thread Mark Dickinson
Mark Dickinson added the comment: This is similar to #9025 (for randrange), and in principle the random.choices case without explicit weights could be fixed similarly. But I'm not sure it's worth it, for a couple of reasons: - The problem only really affects "virtual" population sequences

[issue44076] issue with list in Python 3.8.5

2021-05-09 Thread Mohamed
Mohamed added the comment: I tried the following method: class MasterApp(object): def __init__(self, root): def fun_astinfo_add(self): ... assetinfo_lst.append(lst_values) ... MasterApp(root) ... if

[issue44087] [sqlite3] consider adding Py_TPFLAGS_DISALLOW_INSTANTIATION to sqlite3.Statement

2021-05-09 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Currently, the sqlite3.Statement type is not exposed in the module dict: >>> import sqlite3 >>> sqlite3.Statement Traceback (most recent call last): File "", line 1, in File

[issue22956] Improved support for prepared SQL statements

2021-05-09 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22956] Improved support for prepared SQL statements

2021-05-09 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22956] Improved support for prepared SQL statements

2021-05-09 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: As Gerhard said in msg233384, there is already a statement cache. sqlite3_prepare_v2() is only called if the statement is not found in the cache. Current behaviour: >>> import sqlite3 >>> cx = sqlite3.connect(":memory:") >>> cu = cx.cursor() >>>

[issue39228] traceback.FrameSummary does not handle exceptions from `repr()`

2021-05-09 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: -terry.reedy versions: +Python 3.11 -Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___

[issue44086] py.svg not found on search result page

2021-05-09 Thread Jürgen Gmach
New submission from Jürgen Gmach : repro: - go to docs (Python 3.11) - open dev console in browser - search for e.g ."xml rpc" -> 404 py.svg not found or open dev console and got to this URL directly: https://docs.python.org/3.11/search.html?q=xml+rpc P.S.: No 404 for the docs on 3.10

[issue44083] problem with updated 3.9.5

2021-05-09 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: What is the input are you expecting? int can only convert string with only numbers like "10" or "2" not "10 abc" or "2 abc". -- nosy: +shreyanavigyan ___ Python tracker

[issue44085] Remaining invalid rules in simplified grammar

2021-05-09 Thread Pierre Quentel
New submission from Pierre Quentel : In the simplified version of Python grammar at https://docs.python.org/3.10/reference/grammar.html, most 'invalid_' from the complete grammar at https://github.com/python/cpython/blob/3.10/Grammar/python.gram have been removed, but 2 of them remain :

[issue41730] Show deprecation warnings for tkinter.tix

2021-05-09 Thread miss-islington
miss-islington added the comment: New changeset c3eb3c18f1472b739db486c99f7f2125c4809680 by Miss Islington (bot) in branch '3.10': Revert test for Tix deprecation warning (GH-26005) https://github.com/python/cpython/commit/c3eb3c18f1472b739db486c99f7f2125c4809680 --

[issue44083] problem with updated 3.9.5

2021-05-09 Thread Eric V. Smith
Eric V. Smith added the comment: Also: How are you executing this code? From IDLE? From the command line? -- status: pending -> open ___ Python tracker ___

[issue44083] problem with updated 3.9.5

2021-05-09 Thread Eric V. Smith
Eric V. Smith added the comment: This is almost certainly not a bug in python. You're probably entering an empty string for "a". Try it without using input(). For example, replace lines 2 and 3 with: a = "3" b = "4" -- nosy: +eric.smith status: open -> pending

[issue41730] Show deprecation warnings for tkinter.tix

2021-05-09 Thread Zachary Ware
Zachary Ware added the comment: Fixed in GH-26005 and GH-26006, which just revert the test. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue44080] Bias in random.choices(long_sequence)

2021-05-09 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41730] Show deprecation warnings for tkinter.tix

2021-05-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +24658 pull_request: https://github.com/python/cpython/pull/26006 ___ Python tracker ___

[issue44084] Can't mark match, case, _ as keywords in docs

2021-05-09 Thread Tal Einat
New submission from Tal Einat : Beginning in Python 3.10, `match`, `case` and `_` are "soft keywords", i.e. they are considered keywords only in specific parts of the syntax. However, they cannot be tagged with a :keyword:`...` role in our docs. This appears to be due to not appearing in the

[issue41930] Wrap sqlite3_serialize API in sqlite3 module

2021-05-09 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: What would be the use case for this? -- nosy: +erlendaasland ___ Python tracker ___ ___

[issue41730] Show deprecation warnings for tkinter.tix

2021-05-09 Thread Zachary Ware
Change by Zachary Ware : -- pull_requests: +24657 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/26005 ___ Python tracker ___

[issue44083] problem with updated 3.9.5

2021-05-09 Thread Swarnila Chakma
New submission from Swarnila Chakma : the codes were running okay with the version 3.9.4. But yesterday after updating the new version 3.9.5, the same codes are showing error. For example, if I were to write a code about swapping numbers, i write the code: print('Enter two variables') a =