[issue45171] stacklevel handling in logging module is inconsistent

2021-11-08 Thread Jouke Witteveen
Jouke Witteveen added the comment: I would expect the opposite. Since the issue is visible only in certain cases (shortcut calls such as `logging.info` over `logger.info`, or redirected calls such as `logger.warn` which adds a stack frame for redirecting to `logger.warning`), any code that

[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-08 Thread Tangellapalli Sai Hanuma Rahul
Tangellapalli Sai Hanuma Rahul added the comment: There is a new function submit_with_name in _base.Executor that can accept name parameters before args and kwargs, submit can continue to be used as before. submit internally calls submit_with_name with name as None. Calling submit_with_name

[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-08 Thread Irit Katriel
Irit Katriel added the comment: We should also verify that the interpreter doesn’t have its own version of the dis bug. -- ___ Python tracker ___

[issue45743] Cleanup and simplify setup.py

2021-11-08 Thread Ned Deily
Ned Deily added the comment: >> 1) __APPLE_USE_RFC_3542 should have been in socketmodule.c from the start, >> not sure why it was added in setup.py. > FTR, it was added by me in bpo-35569, GH-19526. I moved the check to setup.py > because Ned made me do it :P Yeah, well, it seemed like a

[issue45759] non-matching `elif`/`else` statements with uninformative errors

2021-11-08 Thread theeshallnotknowethme
theeshallnotknowethme added the comment: I'd like to expand this to more than just `elif`/`else statements inside `if` statement blocks and make an error for other cases as well. I currently have a PR that has a general error to accommodate those cases. -- title: `elif` inside `if`

[issue45748] "import ctypes" segfaults on Python 3.6 and Ubuntu 21.10

2021-11-08 Thread Ned Deily
Ned Deily added the comment: > Python 3.6 is in security-fix only mode. And besides that, it's not clear what problem you are reporting without more context. As far as I can tell, neither the "good" nor the "bad" commit ids you reference are in or were backported to the 3.6 branch. Without

[issue45755] Mock spec with a specialized generic class does not mock class attributes

2021-11-08 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45171] stacklevel handling in logging module is inconsistent

2021-11-08 Thread Andrei Kulakov
Andrei Kulakov added the comment: The stacklevel arg was added 3+ years ago, wouldn't fixing this break a lot of code in a way that's hard to detect? That is to say, logs will look just fine, but when you try to debug an issue, you will realise it's pointing to an unhelpful location?

[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-11-08 Thread Andrei Kulakov
Andrei Kulakov added the comment: Martin: I have a couple of concerns: - Generally (AFAIK) Python is very conservative about silencing arbitrary exceptions. There are a few functions with args like `ignore_errors`, but those are for errors in the logic of respective functions. I don't

[issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP

2021-11-08 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +27733 pull_request: https://github.com/python/cpython/pull/29482 ___ Python tracker ___

[issue45760] Remove "PyNumber_InMatrixMultiply"

2021-11-08 Thread theeshallnotknowethme
theeshallnotknowethme added the comment: Also with this, could anyone also remove the unused `VISIT_SLICE` macro in 'Python/compile.c'? Thanks. -- nosy: +February291948 ___ Python tracker

[issue45760] Remove "PyNumber_InMatrixMultiply"

2021-11-08 Thread Brandt Bucher
New submission from Brandt Bucher : Here's a weird one: for the last 8 years, we've defined a function called "PyNumber_InMatrixMultiply" in abstract.c. It's a pretty clear misspelling of "PyNumber_InPlaceMatrixMultiply", which is *also* defined in that file. There's no documentation or

[issue45759] `elif` inside `if` block is a `SyntaxError`

2021-11-08 Thread theeshallnotknowethme
Change by theeshallnotknowethme : -- keywords: +patch pull_requests: +27732 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29481 ___ Python tracker

[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-08 Thread Brandt Bucher
Brandt Bucher added the comment: I have a hunch that this is caused in optimize_basic_block. In general, we don't bother clearing the oparg when peepholing instructions into NOPs. We could either start becoming more principled about that and fix all of the existing NOPs, or just update

[issue45759] `elif` inside `if` block is a `SyntaxError`

2021-11-08 Thread theeshallnotknowethme
New submission from theeshallnotknowethme : While fixing errors in a program, I encountered this: if a == b + 2: c = sqrt(b) + a**2 elif a == b + 3: SyntaxError: Invalid syntax It should be giving an `IndentationError` or a better error message at least. --

[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-08 Thread Rok Mandeljc
Rok Mandeljc added the comment: The EXTENDED_ARG + NOP sequence seems to be specific to python 3.10; we could not reproduce the original bug (dis failing on telegram.message) with earlier python versions. The combination makes little sense, so perhaps it is a bug on its own? --

[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-08 Thread Irit Katriel
Irit Katriel added the comment: + Mark for FYI. The behaviour of dis is not new, I wonder if generating code with EXTENDED_ARG + NOP is new? -- nosy: +Mark.Shannon ___ Python tracker

[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

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

[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-08 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45758] Crash on Py_DecRef'ing builtin object from previous run

2021-11-08 Thread Victor Milovanov
New submission from Victor Milovanov : Trying to Py_DecRef owned reference to builtin "iter" crashes if the reference was alive when runtime was reinitialized. Py_Initialize(); PyObject* builtins = PyEval_GetBuiltins(); PyObject* iter = PyDict_GetItemString(builtins, "iter");

[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-08 Thread Irit Katriel
Irit Katriel added the comment: Thanks for the report. This should fix it, I'll create a patch: @@ -428,6 +428,7 @@ def _unpack_opargs(code): extended_arg = (arg << 8) if op == EXTENDED_ARG else 0 else: arg = None +extended_arg = 0 yield

[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2021-11-08 Thread Alex Waygood
Change by Alex Waygood : -- pull_requests: +27730 pull_request: https://github.com/python/cpython/pull/29479 ___ Python tracker ___

[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence

2021-11-08 Thread Rok Mandeljc
New submission from Rok Mandeljc : dis module incorrectly handles the instruction sequence where EXTENDED_ARG is followed by NOP, e.g.,: EXTENDED_ARG 0x01 NOP EXTENDED_ARG 0x01 LOAD_CONST 0x29 The above sequence loads the constant from index 0x0129, whereas dis attempts to load it from

[issue33927] Allow json.tool to have identical infile and outfile

2021-11-08 Thread Chris Wesseling
Change by Chris Wesseling : -- nosy: +CharString nosy_count: 6.0 -> 7.0 pull_requests: +27728 pull_request: https://github.com/python/cpython/pull/29478 ___ Python tracker ___

[issue45644] Make json.tool soak up input before opening output for writing

2021-11-08 Thread Chris Wesseling
Change by Chris Wesseling : -- pull_requests: +27729 pull_request: https://github.com/python/cpython/pull/29478 ___ Python tracker ___

[issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12

2021-11-08 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +27727 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29477 ___ Python tracker ___

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2021-11-08 Thread Neil Schemenauer
Neil Schemenauer added the comment: Closing since I believe the bug is fixed and there is an appropriate unit test. -- assignee: -> nascheme resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue42109] Use hypothesis for testing the standard library, falling back to stubs

2021-11-08 Thread Aaron Meurer
Change by Aaron Meurer : -- nosy: +asmeurer ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length

2021-11-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I'm leaning towards alt 1. It is also easy to test all paths with that option. But I also think alt 3 is ok. It makes for easier code to maintain. Alt 2 is, as you say, the weakest alternative. > What happens if set SQLITE_LIMIT_SQL_LENGTH to 0 or

[issue45756] mock raises exception when using a spec with an attribute that raises exception on access

2021-11-08 Thread Kevin Jamieson
New submission from Kevin Jamieson : In Python 3.8 and later creating a mock with a spec specifying an object containing a property that happens to raise an exception when accessed will fail, because _mock_add_spec calls getattr() on every attribute of the spec. This did not happen in Python

[issue45755] Mock spec with a specialized generic class does not mock class attributes

2021-11-08 Thread Kevin Jamieson
New submission from Kevin Jamieson : This worked in Python 3.6, but in Python 3.7 and later creating a mock with a spec specifying a subscripted generic class does not mock any of the attributes of the class, because those attributes are not returned by dir(). For example: # cat test.py

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2021-11-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Are we missing something here? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length

2021-11-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In alternative 1 we control the type and the message of exception. In alternative 3 we left this to the SQLite3 engine. It is difficult to keep consistency in alternative 2, errors raised for sizes less and larger than INT_MAX can be different. I think

[issue2771] Test issue

2021-11-08 Thread Berker Peksag
Change by Berker Peksag : -- nosy: -berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45723] Improve and simplify configure.ac checks

2021-11-08 Thread Christian Heimes
Christian Heimes added the comment: New changeset cbab997efb3ba5123dc8d9f706184fa8e634b3ec by Christian Heimes in branch 'main': bpo-45723: Prepare support for autoconf 2.71 (GH-29441) https://github.com/python/cpython/commit/cbab997efb3ba5123dc8d9f706184fa8e634b3ec --

[issue45723] Improve and simplify configure.ac checks

2021-11-08 Thread Christian Heimes
Christian Heimes added the comment: New changeset 9bd0cf5970997b63d296e30d51e7bb9a15dcabaf by Erlend Egeberg Aasland in branch 'main': bpo-45723: Add macro for disabling/enabling CC warnings (GH-29466) https://github.com/python/cpython/commit/9bd0cf5970997b63d296e30d51e7bb9a15dcabaf

[issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length

2021-11-08 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : In Modules/_sqlite/statement.c pysqlite_statement_create() and Modules/_sqlite/cursor.c pysqlite_cursor_executescript_impl(), we incorrectly use SQLITE_LIMIT_LENGTH to check statement length. However, the correct limit is *SQLITE_LIMIT_SQL_LENGTH*.

[issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length

2021-11-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: BTW, this only affects the code in main. -- components: +Extension Modules type: -> behavior versions: +Python 3.11 ___ Python tracker

[issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12

2021-11-08 Thread Steve Dower
Steve Dower added the comment: I guess I've actually got to fix my build process now :) -- ___ Python tracker ___ ___

[issue45753] Further speed up Python-to-Python calls.

2021-11-08 Thread Mark Shannon
New submission from Mark Shannon : There are three things we want to do: 1. Speed up pushing and popping frames. See https://github.com/faster-cpython/ideas/issues/111 for details. 2. Avoid tracing and other admin overhead on entering and leaving. See

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

2021-11-08 Thread STINNER Victor
STINNER Victor added the comment: greenlet now uses PyThreadState_EnterTracing() and PyThreadState_LeaveTracing() rather than accessing directly use_tracing: https://github.com/python-greenlet/greenlet/commit/9b49da5c7e4808bd61b992e40f5b5243bfa9be6f On Python 3.10, it implements these

[issue45712] Typo in "control flow" documentation

2021-11-08 Thread miss-islington
miss-islington added the comment: New changeset 2c4792264f9218692a1bd87398a60591f756b171 by Miss Islington (bot) in branch '3.10': Closes bpo-45712: Add missing word in control flow tutorial (GH-29460) https://github.com/python/cpython/commit/2c4792264f9218692a1bd87398a60591f756b171

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-11-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 80580f5ab85e3c45c8c5e863a891598d10bf by Miss Islington (bot) in branch '3.9': bpo-40170: Update What's New in Python 3.9 (GH-29470) (GH-29472) https://github.com/python/cpython/commit/80580f5ab85e3c45c8c5e863a891598d10bf --

[issue45688] stdlib_module_names.h is missing _scproxy

2021-11-08 Thread STINNER Victor
STINNER Victor added the comment: On Python 3.11.0a2+, I now get: $ ./python -c 'import sys; print(len(sys.stdlib_module_names))' 304 One more module ;-) -- ___ Python tracker

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-11-08 Thread miss-islington
miss-islington added the comment: New changeset 69b3de65adc691cc5ad66e70e5c7caf61c202c79 by Miss Islington (bot) in branch '3.10': bpo-40170: Update What's New in Python 3.9 (GH-29470) https://github.com/python/cpython/commit/69b3de65adc691cc5ad66e70e5c7caf61c202c79 --

[issue45688] stdlib_module_names.h is missing _scproxy

2021-11-08 Thread STINNER Victor
STINNER Victor added the comment: Oh right, Tools/scripts/generate_stdlib_module_names.py runs "./python setup.py -q build --list-module-names" which skips modules which are only built on specific platforms. On the Python CI, generate_stdlib_module_names.py is run on Linux. Nicely spotted,

[issue13703] Hash collision security issue

2021-11-08 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17239] XML vulnerabilities in Python

2021-11-08 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45319] Possible regression in __annotations__ descr for heap type subclasses

2021-11-08 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45752] copy module doc wrongly says it doesn't copy arrays

2021-11-08 Thread Stefan Pochmann
New submission from Stefan Pochmann : The doc https://docs.python.org/3/library/copy.html says: "This module does not copy types like module, method, stack trace, stack frame, file, socket, window, array, or any similar types." But it does copy arrays just fine: import copy, array a =

[issue45712] Typo in "control flow" documentation

2021-11-08 Thread Zachary Ware
Zachary Ware added the comment: New changeset 7484a5c82a2dfc106bb1e4b060cad2df00521bfd by 180909 in branch 'main': Closes bpo-45712: Add missing word in control flow tutorial (GH-29460) https://github.com/python/cpython/commit/7484a5c82a2dfc106bb1e4b060cad2df00521bfd -- nosy:

[issue45712] Typo in "control flow" documentation

2021-11-08 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +27726 pull_request: https://github.com/python/cpython/pull/29473 ___ Python tracker

[issue22097] Linked list API for ordereddict

2021-11-08 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45751] "SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets

2021-11-08 Thread Jose Ville
New submission from Jose Ville : https://docs.python.org/3/library/asyncio-task.html#asyncio.wait has the following two code snippets both of which fail with ""SyntaxError: 'await' outside function" when I run them in Python 3.9.7 Snippet 1: ``` async def foo(): return 42 coro = foo()

[issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

2021-11-08 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2771] Test issue

2021-11-08 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-11-08 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45750] "SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets

2021-11-08 Thread Jose Ville
New submission from Jose Ville : https://docs.python.org/3/library/asyncio-task.html#asyncio.wait has the following two code snippets both of which fail with ""SyntaxError: 'await' outside function" when I run them in Python 3.9.7 Snippet 1: ``` async def foo(): return 42 coro = foo()

[issue45749] Silently fails to build hashlib if openssl has disabled algorithms

2021-11-08 Thread Christian Heimes
Christian Heimes added the comment: Out of curiosity, which vendor / platform provides OpenSSL builds without scrypt? -- ___ Python tracker ___

[issue45749] Silently fails to build hashlib if openssl has disabled algorithms

2021-11-08 Thread Ross Burton
Ross Burton added the comment: Cool, glad to see the additional checks. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-11-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +27724 pull_request: https://github.com/python/cpython/pull/29471 ___ Python tracker ___

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-11-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +27725 pull_request: https://github.com/python/cpython/pull/29472 ___ Python tracker ___

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-11-08 Thread STINNER Victor
STINNER Victor added the comment: New changeset 99c7e9853fa13af414168f179213e3d2fae03a45 by Victor Stinner in branch 'main': bpo-40170: Update What's New in Python 3.9 (GH-29470) https://github.com/python/cpython/commit/99c7e9853fa13af414168f179213e3d2fae03a45 --

[issue45749] Silently fails to build hashlib if openssl has disabled algorithms

2021-11-08 Thread Christian Heimes
Christian Heimes added the comment: This is by design. As of PEP 644, Python 3.10 requires a full OpenSSL 1.1.1 build. See bpo-45627 for a discussion why we need a full build. Traditionally we also don't fail the entire build if one or more optional modules fail to build. You only get error

[issue45749] Silently fails to build hashlib if openssl has disabled algorithms

2021-11-08 Thread Ross Burton
Change by Ross Burton : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45749] Silently fails to build hashlib if openssl has disabled algorithms

2021-11-08 Thread Ross Burton
New submission from Ross Burton : If my openssl is built with no-scrypt then the Python build of hashlib fails (as EVP_PBE_scrypt isn't present), but the overall compile succeeds. -- components: Build messages: 405954 nosy: rossburton2 priority: normal severity: normal status: open

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2021-11-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +27723 pull_request: https://github.com/python/cpython/pull/29470 ___ Python tracker ___

[issue45747] Detect dbm and gdbm dependencies in configure.ac

2021-11-08 Thread Christian Heimes
Christian Heimes added the comment: Thanks Ronald. I was not aware that macOS has dbm_open in libc. AC_CHECK_LIB() always tries to link with an external library. The macro should skip the symbol from libc. Could you please run the PR locally and upload your config.log? --

[issue45748] "import ctypes" segfaults on Python 3.6 and Ubuntu 21.10

2021-11-08 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +ned.deily -serhiy.storchaka status: pending -> open ___ Python tracker ___ ___

[issue45748] "import ctypes" segfaults on Python 3.6 and Ubuntu 21.10

2021-11-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Python 3.6 is in security-fix only mode. I'm sorry, but I don't think this counts as a security issue. -- nosy: +erlendaasland status: open -> pending ___ Python tracker

[issue45748] "import ctypes" segfaults on Python 3.6 and Ubuntu 21.10

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

[issue23041] csv needs more quoting rules

2021-11-08 Thread Skip Montanaro
Skip Montanaro added the comment: Note to @samwyse and @krypten: I updated the patches and created a pull request on GitHub, but I have no way of knowing if at least krypten has signed a CLA for Python. Since you're the author of the original patches, we need to verify that you have.

[issue23041] csv needs more quoting rules

2021-11-08 Thread Skip Montanaro
Change by Skip Montanaro : -- pull_requests: +27722 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29469 ___ Python tracker ___

[issue45748] "import ctypes" segfaults on Python 3.6 and Ubuntu 21.10

2021-11-08 Thread Thomas Trummer
New submission from Thomas Trummer : 3.7 and later are all working fine. First good commit: 55fe1ae9708d81b902b6fe8f6590e2a24b1bd4b0 First bad commit: fdbd01151dbd5feea3e4c0316d102db3d2a2a412 git checkout v3.6.15 #0 0x76cc52a0 in PyCFuncPtr_new (type=0x559157f8,

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-11-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Unless I am missing something it should be 3.11 non-silent warning and 3.12 syntax error -- ___ Python tracker ___

[issue44439] stdlib wrongly uses len() for bytes-like object

2021-11-08 Thread Ma Lin
Ma Lin added the comment: Serhiy Storchaka: Sorry, I found `zipfile` module also has this bug, fixed in PR29468. This bug was reported & fixed by GitHub user `marcoffee` firstly, so I list him as a co-author, his work: https://github.com/animalize/pyzstd/issues/4 The second commit fixes an

[issue45745] ./python -m test --help output for refleaks seems wrong

2021-11-08 Thread Skip Montanaro
Skip Montanaro added the comment: Thanks, I get that. My issue is with the apparent mismatch between the English meaning of "find leaks" and "fail env changed." It seems to me that the help message(s) for one or both of those options is probably incorrect and needs to be changed.

[issue45747] Detect dbm and gdbm dependencies in configure.ac

2021-11-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: dbm_open is in libc on macOS. likely due to being in SUSv2. The implementation in libc appears to be suboptimal (for example: issue33074), although I wouldn't teach configure.ac to ignore the system version of the library. -- nosy: +ronaldoussoren

[issue44439] stdlib wrongly uses len() for bytes-like object

2021-11-08 Thread Ma Lin
Change by Ma Lin : -- pull_requests: +27721 pull_request: https://github.com/python/cpython/pull/29468 ___ Python tracker ___ ___

[issue21644] Optimize bytearray(int) constructor to use calloc()

2021-11-08 Thread STINNER Victor
STINNER Victor added the comment: I abandonned the issue because I didn't have time to work on it. If you want, you can open a new issue for that. -- ___ Python tracker ___

[issue45743] Cleanup and simplify setup.py

2021-11-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > 1) __APPLE_USE_RFC_3542 should have been in socketmodule.c from the start, > not sure why it was added in setup.py. FTR, it was added by me in bpo-35569, GH-19526. I moved the check to setup.py because Ned made me do it :P

[issue45743] Cleanup and simplify setup.py

2021-11-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: 1) __APPLE_USE_RFC_3542 should have been in socketmodule.c from the start, not sure why it was added in setup.py. 2) as you and Ned noticed -search_paths_first has been the default for a long while, we can just drop it and anyone building on ancient

[issue45743] Cleanup and simplify setup.py

2021-11-08 Thread Christian Heimes
Christian Heimes added the comment: New changeset 24af9a40a8f85af813ea89998aa4e931fcc78cd9 by Christian Heimes in branch 'main': bpo-45743: Move __APPLE_USE_RFC_3542 into socketmodule.c (GH-29456) https://github.com/python/cpython/commit/24af9a40a8f85af813ea89998aa4e931fcc78cd9 --

[issue45747] Detect dbm and gdbm dependencies in configure.ac

2021-11-08 Thread Christian Heimes
Christian Heimes added the comment: Pablo's macOS ARM64 buildbot does not find libdb-5.3 although it has db.h: https://buildbot.python.org/all/#/builders/721/builds/97/steps/2/logs/stdio macOS X86-64 buildbot has libdb-5.3:

[issue45747] Detect dbm and gdbm dependencies in configure.ac

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

[issue45747] Detect dbm and gdbm dependencies in configure.ac

2021-11-08 Thread Christian Heimes
New submission from Christian Heimes : setup.py jumps through hoops to detect gdbm, gdbm_compat, ndbm, and bdb (libdb) build dependencies. I propose to simplify our support matrix and detect all dependencies in configure.ac. gdbmmodule.c uses gdbm_open() API, which is provided by gdbm.h and

[issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators

2021-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: Do we have a plan for when this will be turned into a non-silent warning and when into an error? -- ___ Python tracker ___

[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-08 Thread Mark Dickinson
Mark Dickinson added the comment: > previously one could write .submit(function_name, *args, **kwargs) > but now one should write > .submit(function_name, name_of_thread, *args, **kwargs) > name_of_thread can be None This approach can't work, I'm afraid: it would be a backwards-incompatible

[issue45723] Improve and simplify configure.ac checks

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

[issue45723] Improve and simplify configure.ac checks

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

[issue45644] Make json.tool soak up input before opening output for writing

2021-11-08 Thread Chris Wesseling
Chris Wesseling added the comment: @Remi I left the current behaviour for --json-lines untouched, on purpose. My reasoning was that the json-lines format is often seen in JSON streaming, and I didn't want to break the case where the input is an endless stream from stdin or a named pipe. And

[issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor

2021-11-08 Thread Alex Waygood
Change by Alex Waygood : -- title: Custom Name for ThreadPoolExecutor -> Add the ability to give custom names to threads created by ThreadPoolExecutor ___ Python tracker ___

[issue45512] [sqlite3] simplify "isolation level"

2021-11-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: IMO, GH-29053 improves readability, mainly because of these factors: - Argument Clinic now takes care of the ref count dance, and as a bonus, it is more self-documenting (stating clearly that it accepts str and None) - Begin statement validation has been

[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-11-08 Thread Martin
Martin added the comment: I see two scenarious discussed here: Scenario 1 (Offline / Batch-Mode): A system runs user-supplied jobs that may fail. In the case of an error, the system shouldn't crash but rather store a maximally helpful message and carry on with the next job. Most likely, the

[issue45743] Cleanup and simplify setup.py

2021-11-08 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +27718 pull_request: https://github.com/python/cpython/pull/29464 ___ Python tracker ___