[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-06-01 Thread STINNER Victor
STINNER Victor added the comment: I made sure that it's no longer possible to create a type with Py_TPFLAGS_HAVE_GC flag set but with no traverse function (tp_traverse=NULL). I close again the issue. -- components: +C API, Interpreter Core resolution: -> fixed stage: patch review

[issue44281] Links on top of collections doc not in the order of sections

2021-06-01 Thread Raymond Hettinger
Change by Raymond Hettinger : -- priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44281] Links on top of collections doc not in the order of sections

2021-06-01 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger versions: -Python 3.9 ___ Python tracker ___

[issue44281] Links on top of collections doc not in the order of sections

2021-06-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: ISTM that the table order doesn't need to match because the links take you directly to the section of interest. They make it so that you don't need to know the order of sections below. Currently, they have a "logical" grouping with the two

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

2021-06-01 Thread Brandt Bucher
Brandt Bucher added the comment: Hm. I’m not sure if the HAMT makes much sense. We don’t really care about efficient mutation or copies... constant-time lookups seem to be overwhelmingly the most valuable factor here. I personally think that creating some sort of hashable dict and teaching

[issue44263] Better explain the GC contract for PyType_FromSpecWithBases

2021-06-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset ee7637596d8de25f54261bbeabc602d31e74f482 by Victor Stinner in branch 'main': bpo-44263: Py_TPFLAGS_HAVE_GC requires tp_traverse (GH-26463) https://github.com/python/cpython/commit/ee7637596d8de25f54261bbeabc602d31e74f482 --

[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-01 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +25078 pull_request: https://github.com/python/cpython/pull/26481 ___ Python tracker ___

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

2021-06-01 Thread Dennis Sweeney
New submission from Dennis Sweeney : Anecdotally, a few people I've talked to have expected that match-case statements would improve performance in the same way that switch-cases sometimes do in C-like languages. While this is impossible in general without changing semantics (since, for

[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-01 Thread Irit Katriel
Irit Katriel added the comment: New changeset 6563ea5c60be2e4896df52eff777aa93743f1551 by Irit Katriel in branch '3.10': [3.10] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26480) https://github.com/python/cpython/commit/6563ea5c60be2e4896df52eff777aa93743f1551

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

2021-06-01 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44276] Replace if-elif-else structure with match-case (PEP634)

2021-06-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: If the json.encoder code does get updated, it doesn't need two levels of matching. It can be flattened by eliminating the *chunks* variable. match value: case str(): yield _encoder(value) case None: yield

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

2021-06-01 Thread Dennis Sweeney
Dennis Sweeney added the comment: At first I thought of matches with only the int/str/None cases and then I saw the easy generalization, but yeah, each contiguous block seems better. One solution to the code hashability/lookup speed apparent dilemma: writing the equivalent of this in C:

[issue44284] Python references wrong line but correct line number in traceback

2021-06-01 Thread helpimnotdrowning
New submission from helpimnotdrowning : To reproduce (at least on Windows 10 w/ Python 3.9.4): 1) Make a python file: while True: print('hello') 2) Run the file via cmd 3) Edit the file (while it is still running): while True: print('goodbye') print('hello') then save it 4)

[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-01 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +25077 pull_request: https://github.com/python/cpython/pull/26480 ___ Python tracker ___

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Inada Naoki
Inada Naoki added the comment: >> PS > $OutputEncoding = [System.Text.Encoding]::GetEncoding("UTF-8") > FYI, $OutputEncoding in PowerShell has nothing to do with the python.exe and > more.com processes, nor the console session to which they're attached. >> PS >

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

2021-06-01 Thread Brandt Bucher
Brandt Bucher added the comment: Seems like a good idea as long as we're careful about the implementation. I've just jotted down a few notes here: - We should probably break the table upon encountering a guard. - We probably can't get away with storing a dictionary in the code object's

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Eryk Sun
Eryk Sun added the comment: > Now many people want to use Python with UTF-8 mode in PowerShell > in Windows Terminal. And they don't want to care about legacy > encoding at all. Windows Terminal isn't relevant to the encoding issue. Applications interact with the console session to which

[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-01 Thread Irit Katriel
Irit Katriel added the comment: New changeset 9a688624973a2b753b84f892b65268543c7ff67d by Irit Katriel in branch '3.9': [3.9] bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) (GH-26481) https://github.com/python/cpython/commit/9a688624973a2b753b84f892b65268543c7ff67d

[issue44279] doc: contextlib.suppress documentation is imprecise

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

[issue43654] IDLE: Fix tab completion after settings and some keys

2021-06-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Currently, the keys that define certain pseudoevents and invoke the associated event handlers are fixed: tab, '.', and within strings, '/' and '\' for completions, '(' and ')' for calltip open and close, and ')', ']', and '}' for opener matching. Note that

[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think the old wording was better. Code can explicitly raise an exception, but other exceptions just occur when calling builtin functions or with a keyboard interrupt. -- nosy: +eric.smith, rhettinger ___

[issue44276] Replace if-elif-else structure with match-case (PEP634)

2021-06-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: In difflib, there's an example where it would be easy to run performance tests. match tag: case 'replace': g = self._fancy_replace(a, alo, ahi, b, blo, bhi) case 'delete':

[issue40395] Scripts folder is Empty in python 3.8.2 for Windows 7.

2021-06-01 Thread Pooja Warhekar
Pooja Warhekar added the comment: I tried following things. 1. Clearing registry. 2. Web installation 3. Installation in E drive. However problem remains same. Please find the attached log files. Also I couldn't install Microsoft Visual C++ 2015 Redistributable. Could this cause any problem?

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

2021-06-01 Thread Dennis Sweeney
Dennis Sweeney added the comment: I agree that we should benchmark for what the value of "two" should be ;) . Maybe only match statements with >=20 consecutive simple cases end up being worth it. I would assume that if "case 1, case 2, ..., case 20" are all in a row then "case 1" wouldn't

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

2021-06-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Big +1 from me. This would make use of match-case more compelling. -- nosy: +rhettinger ___ Python tracker ___

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-06-01 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker ___

[issue44276] Replace if-elif-else structure with match-case (PEP634)

2021-06-01 Thread Kshitiz Arya
Kshitiz Arya added the comment: Pardon my ignorance here but can I start working on this issue? I am a new contributor therefore I am unsure about how to proceed from here -- ___ Python tracker

[issue34219] distutils: build_ext -D wrongly assume defining a symbol with no value

2021-06-01 Thread Steve Dower
Steve Dower added the comment: distutils is deprecated and no further bugs will be fixed (other than newly discovered release blockers). You will want to report this to setuptools instead. -- resolution: -> out of date stage: patch review -> resolved status: open -> closed

[issue34219] distutils: build_ext -D wrongly assume defining a symbol with no value

2021-06-01 Thread Steve Dower
Change by Steve Dower : -- nosy: -steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44278] Improve syntax error message for assigning to "..."

2021-06-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Assigning to Ellipsis should be the same as assigning to __debug__ ___ Python tracker

[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-06-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch nosy: +serhiy.storchaka nosy_count: 2.0 -> 3.0 pull_requests: +25072 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26477 ___ Python tracker

[issue44278] Improve syntax error message for assigning to "..."

2021-06-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Some users can be confused by syntax error message for assigning to ellipsis [1]: >>> ... = 1 File "", line 1 ... = 1 ^^^ SyntaxError: cannot assign to Ellipsis here. Maybe you meant '==' instead of '='? because Ellipsis is a name of a

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Steve Dower
Steve Dower added the comment: > If changing the console input codepage to UTF-8 fixes the mojibake problem, > then probably you're running Python in UTF-8 mode. I forget where I saw them, but there are some places where we incorrectly use stdin encoding for writing to stdout (I suppose

[issue44079] [sqlite3] remove superfluous statement weak ref list from connection object

2021-06-01 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Also, note that if identical SQL statements are created in multiple cursors belonging to the same connection, they will currently _not_ be added to the connection weak ref list. See the if (self->statement->in_use) in the middle of

[issue44276] Replace if-elif-else structure with match-case (PEP634)

2021-06-01 Thread Steven D'Aprano
Steven D'Aprano added the comment: match-case has not even reached a stable version of Python yet, it is only available in Python 3.10 which is still in beta. Are we sure that it is faster in all cases and how do you know it is more intuitive when the vast majority of Python users have

[issue44265] Create an MSI Package

2021-06-01 Thread Steve Dower
Steve Dower added the comment: Thanks, Eric. Anyone may feel free to create and release their own MSI distro of CPython. I don't even mind if you use the binaries from our releases, as those are signed and your users will be able to know that they aren't modified (it's a little harder to

[issue25957] sockaddr_l2 lacks CID, address type (AF_BLUETOOTH sockets)

2021-06-01 Thread Steve Dower
Change by Steve Dower : -- nosy: -steve.dower ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44278] Improve syntax error message for assigning to "..."

2021-06-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +25071 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26477 ___ Python tracker

[issue44278] Improve syntax error message for assigning to "..."

2021-06-01 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I think this is a duplicate of issue 44273. -- nosy: +BTaskaya ___ Python tracker ___ ___

[issue44278] Improve syntax error message for assigning to "..."

2021-06-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44276] Replace if-elif-else structure with match-case (PEP634)

2021-06-01 Thread Kshitiz Arya
Kshitiz Arya added the comment: This is a relatively simple example of how this will improve readability of the code. (This example is form Lib/json/encoder.py) Original - if isinstance(value, str): yield

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

2021-06-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset fffa0f92adaaed0bcb3907d982506f78925e9052 by Erlend Egeberg Aasland in branch 'main': bpo-42972: Track sqlite3 statement objects (GH-26475) https://github.com/python/cpython/commit/fffa0f92adaaed0bcb3907d982506f78925e9052 --

[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-01 Thread Irit Katriel
New submission from Irit Katriel : "suppresses any of the specified exceptions if they occur in the body of a with statement" Should be: "suppresses any of the specified exceptions if they are raised in the body of a with statement" -- assignee: docs@python components:

[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-06-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 39dd141a4ba68bbb38fd00a65cdcff711acdafb5 by Serhiy Storchaka in branch 'main': bpo-44273: Improve syntax error message for assigning to "..." (GH-26477) https://github.com/python/cpython/commit/39dd141a4ba68bbb38fd00a65cdcff711acdafb5

[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-06-01 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +25073 pull_request: https://github.com/python/cpython/pull/26478 ___ Python tracker ___

[issue44276] Replace if-elif-else structure with match-case (PEP634)

2021-06-01 Thread Kshitiz Arya
Kshitiz Arya added the comment: I guess we will have to wait until Python 3.10 is released and we have more conclusive data about speed and readability of match-case before we can go ahead with this issue. -- ___ Python tracker

[issue44273] Assigning to Ellipsis should be the same as assigning to __debug__

2021-06-01 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue40395] Scripts folder is Empty in python 3.8.2 for Windows 7.

2021-06-01 Thread Pooja Warhekar
Pooja Warhekar added the comment: Similar issue on windows 8.1 with Python 3.9.5. Repairing also did not work. -- nosy: +poojawarhekar2012 ___ Python tracker ___

[issue40395] Scripts folder is Empty in python 3.8.2 for Windows 7.

2021-06-01 Thread Steve Dower
Steve Dower added the comment: Pooja, could you share your install logs? Details are in my post directly above yours. -- ___ Python tracker ___

[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-06-01 Thread Petr Viktorin
Change by Petr Viktorin : -- pull_requests: +25074 pull_request: https://github.com/python/cpython/pull/26479 ___ Python tracker ___

[issue44277] cpython forks are spammed with dependabot PRs

2021-06-01 Thread Zachary Ware
Zachary Ware added the comment: This seems like a Dependabot bug; is there anything we can even do about it? -- nosy: +zach.ware ___ Python tracker ___

[issue29086] Document C API that is not part of the limited API

2021-06-01 Thread Petr Viktorin
Petr Viktorin added the comment: PEP 652 is now in, and with it a list of everything that *is* in the stable ABI: https://docs.python.org/3.10/c-api/stable.html#contents-of-limited-api I'm closing the issue. -- resolution: -> fixed stage: patch review -> resolved status: open ->

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Jesse Silverman
Jesse Silverman added the comment: Thank you so much Inada and Eryk and Steve! I was one of the people who mistakenly thought that Python 3 operating in the new Windows Terminal was going to magically leave us sitting happily in completely UTF-8 compatible territory on Windows, not realizing

[issue23903] Generate PC/python3.def by scraping headers

2021-06-01 Thread Petr Viktorin
Petr Viktorin added the comment: PEP 652 (bpo-43795) is now in; I'm closing this issue. A cross-platform C parser/checker would still be an improvement, but the constraints (no external dependencies in CPython) and benefits (not many compared to the goal of strict separation of

[issue40395] Scripts folder is Empty in python 3.8.2 for Windows 7.

2021-06-01 Thread Pooja Warhekar
Pooja Warhekar added the comment: Please find the attached log files. -- Added file: https://bugs.python.org/file50079/Python log files.zip ___ Python tracker ___

[issue37766] IDLE autocomplete: revise fetch_completions, add htest

2021-06-01 Thread E. Paine
Change by E. Paine : -- nosy: +epaine versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8 ___ Python tracker ___ ___

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Eryk Sun
Eryk Sun added the comment: > I was one of the people who mistakenly thought that Python 3 operating > in the new Windows Terminal was going to magically leave us sitting > happily in completely UTF-8 compatible territory on Windows, not > realizing the complex long-term dependencies and

[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-01 Thread MapleCCC
Change by MapleCCC : -- keywords: +patch nosy: +MapleCCC nosy_count: 2.0 -> 3.0 pull_requests: +25075 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26428 ___ Python tracker

[issue44280] unittest filters out too many assertion stack frames from context/cause chains

2021-06-01 Thread Peter Hawkins
New submission from Peter Hawkins : Example repro: ``` import unittest def d(): assert 2 == 3 def c(): d() def b(): c() def a(): try: b() except Exception as e: assert 1 == 2 class MyTest(unittest.TestCase): def testException(self): a() if __name__ ==

[issue44262] tarfile: some content different output

2021-06-01 Thread Filipe Laíns
Change by Filipe Laíns : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue40395] Scripts folder is Empty in python 3.8.2 for Windows 7.

2021-06-01 Thread Steve Dower
Steve Dower added the comment: It still seems like pyexpat is not installing properly. My best guess is that some virus scanner is silently blocking that file from being installed. Do you know what scanner you have enabled? If you can disable it, can you try doing an uninstall/reinstall

[issue44280] unittest filters out too many assertion stack frames from context/cause chains

2021-06-01 Thread Peter Hawkins
Change by Peter Hawkins : -- components: +Library (Lib) type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44279] doc: contextlib.suppress documentation is imprecise

2021-06-01 Thread Irit Katriel
Irit Katriel added the comment: New changeset 87272b70f157af76cb14ff90d73dfc5d9bfb945a by MapleCCC in branch 'main': bpo-44279: [doc] reword contextlib.suppress documentation (GH-26428) https://github.com/python/cpython/commit/87272b70f157af76cb14ff90d73dfc5d9bfb945a --

[issue44281] Links on top of collections doc not in the order of sections

2021-06-01 Thread Andrei Kulakov
New submission from Andrei Kulakov : https://docs.python.org/3.11/library/collections.html Links are not in the same order as the sections below. It creates some dissonance for the reader to first read the section names above and then continue reading expecting them to be in the same order

[issue44238] Unable to install Python 3.9.5 - Windows Server

2021-06-01 Thread Steve Dower
Steve Dower added the comment: Unfortunately, I've got no idea whether it's failing to uninstall the MSI or if it's specific to removing the PATH environment variable. If you've still got the rest (no more than 2-3 I'd expect) of the uninstall log files in your %TEMP% directory that may

[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Followup to PR-26404, which added the tests. -- ___ Python tracker ___ ___ Python-bugs-list

[issue44275] Is there a mojibake problem rendering interactive help in the REPL on Windows?

2021-06-01 Thread Jesse Silverman
Jesse Silverman added the comment: "more.com" uses the console input codepage to decode the file, so a workaround is to run `chcp.com 65001` and run Python in UTF-8 mode, e.g. `py -X utf8=1`. Since reading non-ASCII UTF-8 is broken, you'll have to switch back to the old input codepage if

[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-01 Thread Tal Einat
Change by Tal Einat : -- keywords: +patch pull_requests: +25076 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/26404 ___ Python tracker

[issue44282] IDLE: ColorDelegatorTest test_incremental_editing failures

2021-06-01 Thread Terry J. Reedy
New submission from Terry J. Reedy : idlelib.idle_test.test_colordelagator.ColorDelegatorTest.test_incremental_editing has failed on at least on the following machines. Pip32 CI Pipelines Win32 Gen3x https://buildbot.python.org/all/#/builders/464 x86 Gentoo Installed with X 3.x GenPR