[issue41114] "TypeError: unhashable type" could often be more clear

2021-11-15 Thread drakebohan
drakebohan added the comment: The problem is that you can't use a list as the key in a dict, since dict keys need to be immutable. This means that when you try to hash an unhashable object it will result an error. For ex. when you use a list as a key in the dictionary , this cannot be done

[issue44295] self.assertDictContainsSubset warning is unhelpful

2021-11-15 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45582] Rewrite getpath.c in Python

2021-11-15 Thread Steve Dower
Steve Dower added the comment: I have tests passing now, so reviews would be appreciated. There's definitely scope for optimising this algorithm both for speed and clarity, but I'd prefer to get the main translation in first so that any further changes have a reliable baseline (especially

[issue43526] Programmatic management of BytesWarning doesn't work for native triggers.

2021-11-15 Thread STINNER Victor
STINNER Victor added the comment: > If this is intended behaviour, which seems to be the case according to > ncoghlan's comment https://bugs.python.org/issue32230#msg307721, it should be > clearly documented, as it's rather frustrating. The -b command line documentation is not explicitly

[issue43526] Programmatic management of BytesWarning doesn't work for native triggers.

2021-11-15 Thread STINNER Victor
STINNER Victor added the comment: While you should not do that at home ;-), it's now *technically* possible to change the BytesWarning flag at runtime using a a *private* *internal* API: $ ./python Python 3.11.0a2+ (heads/remove_asyncore:010015d2eb, Nov 11 2021, >>> "unicode" == b"bytes"

[issue45812] SystemError when using code.interact

2021-11-15 Thread Andre Roberge
New submission from Andre Roberge : In the following, I execute a single invalid statement in the Python interpreter, which gives the correct error message. Afterwards, I repeat this example using code.interact(), generating a different traceback. This issue affects IDLE differently as shown

[issue45811] Improve error message when source code contains invisible control characters

2021-11-15 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure

2021-11-15 Thread STINNER Victor
STINNER Victor added the comment: Gaige Paulsen: "I'll try to check that in the next day or two." Thanks. Did you have the opportunity to give it a try? -- ___ Python tracker

[issue45811] Improve error message when source code contains invisible control characters

2021-11-15 Thread Steven D'Aprano
New submission from Steven D'Aprano : Invisible control characters (aside from white space) are not permitted in source code, but the syntax error we get is confusing and lacks information: >>> s = 'print\x17("Hello")' >>> eval(s) Traceback (most recent call last): File "", line 1, in

[issue30514] test_poplib replace asyncore

2021-11-15 Thread STINNER Victor
STINNER Victor added the comment: I removed asyncore in bpo-28533: New changeset 9bf2cbc4c498812e14f20d86acb61c53928a5a57 by Victor Stinner in branch 'main': bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)

[issue28533] Remove asyncore, asynchat and smtpd modules

2021-11-15 Thread STINNER Victor
STINNER Victor added the comment: asyncore, asynchat, smtpd modules have been removed. I close this issue. > asyncore is still used in several tests and should be replaced This issue is not solved. My PR only copied asyncore as a private module in test.support (test.support._asyncore). If

[issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup

2021-11-15 Thread Brett Cannon
Brett Cannon added the comment: > Is traditional cross-compiling work still useful these days anyway? Yes for things like WebAssembly where there is no equivalent of an emulated CPU under QEMU. -- ___ Python tracker

[issue45677] [doc] improve sqlite3 docs

2021-11-15 Thread Carol Willing
Carol Willing added the comment: New changeset a40d066e8ef548b52eca2b0e27c219ddd7e11592 by Miss Islington (bot) in branch '3.9': bpo-45677: Reword first section of `sqlite3` docs (GH-29326) (GH-29567) https://github.com/python/cpython/commit/a40d066e8ef548b52eca2b0e27c219ddd7e11592

[issue45677] [doc] improve sqlite3 docs

2021-11-15 Thread Carol Willing
Carol Willing added the comment: New changeset 94dad5e41e5863e03972f3f3646087fb591f73f9 by Miss Islington (bot) in branch '3.10': bpo-45677: Reword first section of `sqlite3` docs (GH-29326) (GH-29566) https://github.com/python/cpython/commit/94dad5e41e5863e03972f3f3646087fb591f73f9

[issue28533] Remove asyncore, asynchat and smtpd modules

2021-11-15 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9bf2cbc4c498812e14f20d86acb61c53928a5a57 by Victor Stinner in branch 'main': bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521) https://github.com/python/cpython/commit/9bf2cbc4c498812e14f20d86acb61c53928a5a57 --

[issue38748] 32 bit ctypes stdcall callback fails to restore stack pointer

2021-11-15 Thread Michael Curran
Michael Curran added the comment: PR: https://github.com/python/cpython/pull/26204 Looks like a maintainer needs to allow a workflow to run for the remaining checks. -- ___ Python tracker

[issue45810] Prohibit invisible control characters in string literals and comments

2021-11-15 Thread Steven D'Aprano
New submission from Steven D'Aprano : Currently invisible control characters aside from whitespace (tabs, newlines, formfeeds, carriage returns) are prohibited outside of comments and string literals. As discussed in this thread:

[issue38748] 32 bit ctypes stdcall callback fails to restore stack pointer

2021-11-15 Thread Michael Curran
Michael Curran added the comment: As requested, I created a pr which adds a test to show the crash. It is marked as expected failure on 32 bit (x86) and runs successfully as expected on x64. What would be the next steps in moving this issue forward? I don't think I have the knowledge to be

[issue25381] Update doc of three C exception values.

2021-11-15 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue25381] Update doc of three C exception values.

2021-11-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset b0bdc093c2c15c352c5bede060117790705f5db0 by Miss Islington (bot) in branch '3.9': bpo-25381: Update explanation of exceptions in C. (GH-26838) (GH-29569) https://github.com/python/cpython/commit/b0bdc093c2c15c352c5bede060117790705f5db0

[issue25381] Update doc of three C exception values.

2021-11-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 0320cf1a250b025f2ef25637851384bf8b61d207 by Miss Islington (bot) in branch '3.10': bpo-25381: Update explanation of exceptions in C. (GH-26838) (GH-29568) https://github.com/python/cpython/commit/0320cf1a250b025f2ef25637851384bf8b61d207

[issue45806] Cannot Recover From StackOverflow in 3.9 Tests

2021-11-15 Thread Jeremy Kloth
Jeremy Kloth added the comment: I'll note that it also fails on first run on the Windows 11 builder: https://buildbot.python.org/all/#/builders/737/builds/65 -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python

[issue45806] Cannot Recover From StackOverflow in 3.9 Tests

2021-11-15 Thread Jeremy Kloth
Change by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43225] Add missing value returned by methods on cookiejar

2021-11-15 Thread Carol Willing
Carol Willing added the comment: New changeset 3352834f59531dfa42dbef00ada4fb95ded2ae3a by Emmanuel Arias in branch 'main': bpo-43225: [DOC] Add missing value returned by methods on cookiejar (GH-24522) https://github.com/python/cpython/commit/3352834f59531dfa42dbef00ada4fb95ded2ae3a

[issue25381] Update doc of three C exception values.

2021-11-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +27817 pull_request: https://github.com/python/cpython/pull/29569 ___ Python tracker ___

[issue25381] Update doc of three C exception values.

2021-11-15 Thread Carol Willing
Carol Willing added the comment: New changeset ad43dc0b54994e7e7d06e3d4896ade188b36ee12 by Terry Jan Reedy in branch 'main': bpo-25381: Update explanation of exceptions in C. (GH-26838) https://github.com/python/cpython/commit/ad43dc0b54994e7e7d06e3d4896ade188b36ee12 -- nosy:

[issue25381] Update doc of three C exception values.

2021-11-15 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +27816 pull_request: https://github.com/python/cpython/pull/29568 ___ Python tracker

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-11-15 Thread Sam Gross
Sam Gross added the comment: The `pthread_exit` behavior has been a problem for PyTorch and related libraries since Python 3.9. The PyTorch team has tried working around the problems without success (i.e. they keep getting bug reports involving crashes in PyEval_SaveThread/RestoreThread).

[issue45677] [doc] improve sqlite3 docs

2021-11-15 Thread miss-islington
Change by miss-islington : -- pull_requests: +27815 pull_request: https://github.com/python/cpython/pull/29567 ___ Python tracker ___

[issue45677] [doc] improve sqlite3 docs

2021-11-15 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +27814 pull_request: https://github.com/python/cpython/pull/29566 ___ Python tracker

[issue45677] [doc] improve sqlite3 docs

2021-11-15 Thread Carol Willing
Carol Willing added the comment: New changeset 6c5a312fb6d92e879bf4c570b94e18bb9ffe5970 by Erlend Egeberg Aasland in branch 'main': bpo-45677: Reword first section of `sqlite3` docs (#29326) https://github.com/python/cpython/commit/6c5a312fb6d92e879bf4c570b94e18bb9ffe5970 --

[issue43526] Programmatic management of BytesWarning doesn't work for native triggers.

2021-11-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: clarification after poking around: s/all/a lot/ - YouTube used it to help their Python 3 migration. Regardless, the env. var has been useful. -- ___ Python tracker

[issue43526] Programmatic management of BytesWarning doesn't work for native triggers.

2021-11-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: fwiw, at work we modified our interpreter to treat PYTHONBYTESWARNING=1 or 2 as if -b or -bb were passed. All of our tests run by default with a PYTHONBYTESWARNING=2 in their environment. -- nosy: +gregory.p.smith

[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP

2021-11-15 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +27813 pull_request: https://github.com/python/cpython/pull/29565 ___ Python tracker ___

[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-11-15 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42540] Debug pymalloc crash when using os.fork() [regression]

2021-11-15 Thread Sam Gross
Change by Sam Gross : -- keywords: +patch nosy: +colesbury nosy_count: 2.0 -> 3.0 pull_requests: +27812 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29564 ___ Python tracker

[issue45807] Strange SyntaxError message / suggestions for "@x = 123"

2021-11-15 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-11-15 Thread Steve Dower
Steve Dower added the comment: > instead of manually defining RT_MANIFEST, try including "winresrc.h" in the > resource definition files I just wish it were documented... we can keep it in mind if another one of these pops up. -- ___ Python

[issue45809] Race condition in WeakKeyDictionary/WeakKeyDictionary

2021-11-15 Thread Sam Gross
Sam Gross added the comment: The attached patch (issue45809-repro.patch) introduces artificial delays to make reproduction of the underlying issue easier. To reproduce the issue: patch -p1 < issue45809-repro.patch ./python -m test test_weakref -m test_threaded_weak_value_dict_deepcopy

[issue45809] Race condition in WeakKeyDictionary/WeakKeyDictionary

2021-11-15 Thread Sam Gross
New submission from Sam Gross : The issue described issue7105 (and maybe issue7060) still exists due to a race condition in WeakKeyDictionary. This shows up as test failure that looks like: test test_weakref failed -- Traceback (most recent call last): File "Lib/test/test_weakref.py",

[issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors

2021-11-15 Thread Steve Dower
Steve Dower added the comment: New changeset 32d14b262d6d914f63485f8d6e7859df58cd2089 by Miss Islington (bot) in branch '3.9': bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files (GH-29501)

[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP

2021-11-15 Thread Brandt Bucher
Brandt Bucher added the comment: New changeset ec382fac0db6d9159c2d3496a70b7a605545957e by Brandt Bucher in branch 'main': bpo-45636: Remove the old %-formatting fast-path (GH-29532) https://github.com/python/cpython/commit/ec382fac0db6d9159c2d3496a70b7a605545957e --

[issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC)

2021-11-15 Thread Brandt Bucher
Brandt Bucher added the comment: The total size of the main interpreter loop was recently reduced somewhat by an unrelated change: https://github.com/python/cpython/commit/9178f533ff5ea7462a2ca22cfa67afd78dad433b I wonder if this issue still exists? --

[issue45808] configure check for HAVE_CRYPT_R is wrong

2021-11-15 Thread Christian Heimes
Christian Heimes added the comment: https://www.freebsd.org/cgi/man.cgi?crypt(3) LIBRARY Crypt Library (libcrypt, -lcrypt) SYNOPSIS #include char * crypt(const char *key, const char *salt); -- ___ Python tracker

[issue45808] configure check for HAVE_CRYPT_R is wrong

2021-11-15 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +27811 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29563 ___ Python tracker

[issue45808] configure check for HAVE_CRYPT_R is wrong

2021-11-15 Thread Christian Heimes
New submission from Christian Heimes : The configure check for HAVE_CRYPT_R assumes that all platforms have . Some platforms like FreeBSD don't have at all. Instead the crypt_r() prototype is defined in . -- messages: 406352 nosy: christian.heimes priority: normal severity: normal

[issue45807] Strange SyntaxError message / suggestions for "@x = 123"

2021-11-15 Thread Evan
Change by Evan : -- nosy: +schmave ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45807] Strange SyntaxError message / suggestions for "@x = 123"

2021-11-15 Thread Pierre Quentel
New submission from Pierre Quentel : In CPython 3.10 : Python 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> @x = 123 File "", line 1 @x = 123 ^^^ SyntaxError:

[issue45512] [sqlite3] simplify "isolation level"

2021-11-15 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +27810 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/29562 ___ Python tracker ___

[issue45512] [sqlite3] simplify "isolation level"

2021-11-15 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset 822c3dcce3996e411c1ff5c432c6ac7d2845cfd6 by Erlend Egeberg Aasland in branch 'main': bpo-45512: Raise exception if sqlite3.Connection.__init__ is called with bad isolation level (#29561)

[issue45795] urllib http client vulnerable to DOS attack

2021-11-15 Thread Muhammad Farhan
Muhammad Farhan added the comment: Is any one going to respond? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-11-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 15.11.2021 10:54, STINNER Victor wrote: > > I don't understand what you are trying to prove about compilers not inlining > when you explicitly ask them... not to inline. I'm not trying to prove anything, Victor. I'm only stating the fact that by

[issue45512] [sqlite3] simplify "isolation level"

2021-11-15 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Need to amend GH-29053, so I'm opening until the fix is merged. -- resolution: fixed -> status: closed -> open ___ Python tracker ___

[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-11-15 Thread STINNER Victor
STINNER Victor added the comment: I don't understand what you are trying to prove about compilers not inlining when you explicitly ask them... not to inline. The purpose of the -O0 option is to minimize the build time, with a trade-off: don't expect the built executable to be fast. If you

[issue45512] [sqlite3] simplify "isolation level"

2021-11-15 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +27809 pull_request: https://github.com/python/cpython/pull/29561 ___ Python tracker ___

[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-11-15 Thread STINNER Victor
STINNER Victor added the comment: I wrote PEP 670 "Convert macros to functions in the Python C API" for this issue: https://www.python.org/dev/peps/pep-0670/ -- ___ Python tracker

[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-11-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 15.11.2021 08:54, Oleg Iarygin wrote: > > Oleg Iarygin added the comment: > > Marc-Andre: >> Inlining is something that is completely under the control of the > used compilers. Compilers are free to not inline function marked for > inlining [...] >

[issue45512] [sqlite3] simplify "isolation level"

2021-11-15 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___