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

2021-05-04 Thread Seth Michael Larson
Seth Michael Larson added the comment: Leaving a thought here, I'm highlighting that we're now implementing two different standards, RFC 3986 with hints of WHATWG-URL. There are pitfalls to doing so as now a strict URL parser for RFC 3986 (like the one used by urllib3/requests) will give dif

[issue44033] Adding multiple keys of the same name to a dict doesn't raise an exception

2021-05-04 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Looks like a duplicate of https://bugs.python.org/issue16385 -- nosy: +xtreak ___ Python tracker ___ __

[issue44034] Incorrect type casting of float into int

2021-05-04 Thread Shreyan Avigyan
Change by Shreyan Avigyan : -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-li

[issue44033] Adding multiple keys of the same name to a dict doesn't raise an exception

2021-05-04 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I've read that issue but it seems that it actually was based on "Should there be a warning or error?". I actually suggest something different. I suggest that "Either raise an exception or just use the first key-value pair if the key is repeated during initi

[issue44034] Incorrect type casting of float into int

2021-05-04 Thread Tim Peters
Tim Peters added the comment: Please study the docs first: https://docs.python.org/3/tutorial/floatingpoint.html That will give you the background to understand why `int()` has nothing to do with this. >>> 1. 2.0 That is, `int()` was passed 2.0 to begin with, because the bi

[issue44025] Match doc: Clarify '_' as a soft keyword

2021-05-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: bedevere-bot malfunctioned. Lukasz merged PR 25873 into main, and I verified the change on the main branch. But the PR is listed above as closed, not merged, and commit 3b200b2aa648fcc8a2673871807c1463afe00195 is not listed. -- nosy: +Mariatta, luk

[issue44035] Regenerating the configure script fails even if dependencies are satisfied

2021-05-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Yep, I am also setting ACLOCAL_PATH to make sure it picks it up. To be honest I think this has to be something about the weird setup in this machine but I think more people may run into this so it may be worth to include this in the News entry and cl

[issue44035] Regenerating the configure script fails even if dependencies are satisfied

2021-05-04 Thread Christian Heimes
Christian Heimes added the comment: I got you covered: $ podman run -v.:/src:Z tiran/cpython_autoconf $ docker run -v.:/src tiran/cpython_autoconf -- ___ Python tracker ___ _

[issue44019] operator.call/operator.__call__

2021-05-04 Thread Shatabarto Bhattacharya
Change by Shatabarto Bhattacharya : -- nosy: +hrik2001 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue44035] Regenerating the configure script fails even if dependencies are satisfied

2021-05-04 Thread Christian Heimes
Christian Heimes added the comment: Container image definition is at https://github.com/tiran/cpython_autoconf I propose to test this a bit, get feedback, and then move the code and image to python infrastructure. I chose Alpine because it's the least controversial one. -- assignee:

[issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

2021-05-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: I realized after posting that looking for close matching is a performance issue and does not need to be done unless the exception is going to be displayed. But it is a shame to keep such great work away from many users. What would you think of either 1. ad

[issue44037] Broad performance regression from 3.10a7 to 3.10b1

2021-05-04 Thread Raymond Hettinger
New submission from Raymond Hettinger : Running Tools/scripts/var_access_benchmark.py on the production macOS builds on python.org shows a performance drop-off between alpha-7 and beta-1. Apple Silicon - read local4.1ns -> 4.5ns read non_local4.1ns -> 4.6ns re

[issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched

2021-05-04 Thread Irv Kalb
Irv Kalb added the comment: This is a quick follow up to the original issue. I am now running Mac OS X 11.2.3 with IDLE 3.9.1 (and pygame 2.0.1). In this environment, the issue of opening files is completely fixed and works perfectly. Thank you very much (and a big thank you from my student

[issue44037] Broad performance regression from 3.10a7 to 3.10b1

2021-05-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here's the screen shot for Intel silicon running the python dot org macOS build on Big Sur 11.3.1: https://www.dropbox.com/s/7lmf74osvq5seg2/Screen%20Shot%202021-05-03%20at%208.41.52%20PM.png?dl=0 Here are the results on M1 Apple silicon with Big Sure 11.

[issue44037] Broad performance regression from 3.10a7 to 3.10b1

2021-05-04 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +Jelle Zijlstra ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue44033] Adding multiple keys of the same name to a dict doesn't raise an exception

2021-05-04 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Looks like the same issue to me as the rejected issue that Karthikeyan mentioned. Changing it to use the first value is a non-starter because it would break compatibility. I'd suggest using a linter that warns about duplicate keys in literals; we implemented

[issue44033] Adding multiple keys of the same name to a dict doesn't raise an exception

2021-05-04 Thread Shreyan Avigyan
Change by Shreyan Avigyan : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pytho

[issue44033] Adding multiple keys of the same name to a dict doesn't raise an exception

2021-05-04 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Ok. I'm closing this then. (I wasn't aware that this was an intended behavior.) -- ___ Python tracker ___ __

[issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

2021-05-04 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Those are intesting options, I will think about this. I am still afraid of adding more APIs in this area as having arbitrary Python getting call in the middle of handling the exceptions it can be quite tricky: think that we are handling an exception a

[issue44027] Python 3.9 UWP does not create key in PythonCore

2021-05-04 Thread Steve Dower
Steve Dower added the comment: Correct. It does, however, write to the lookaside space, which Windows will map back if you access it. So reading HKLM\Software\Python\PythonCore\3.9 will return all the values that would be there. It's only enumeration that doesn't work. I've reported that to

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread Steve Dower
Steve Dower added the comment: The best option for restricting the import while still having it be a Python import is to find the file (if it's present in the expected location under sys.whatever), and then use importlib to import it: https://docs.python.org/3/library/importlib.html#importin

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread Steve Dower
Steve Dower added the comment: > I'd rather not have a new option here ... Perhaps what I'm suggesting here is that I don't see any reason for "sudo pip install ..." into a distro-installed Python to ever need to work, and would be quite happy for it to just fail miserably every time (which

[issue44038] In documentation Section 8.6, the definition of parameter_list need correcting

2021-05-04 Thread Webb Scales
New submission from Webb Scales : In Section 8.6 ("Function definitions"; https://docs.python.org/3/reference/compound_stmts.html#function-definitions), the definition of "parameter_list" looks slightly wrong: parameter_list ::= defparameter ("," defparameter)* "," "/" ["," [parameter_list_n

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

2021-05-04 Thread Mike Lissner
Mike Lissner added the comment: I haven't watched that Blackhat presentation yet, but from the slides, it seems like the fix is to get all languages parsing URLs the same as the browsers. That's what @orsenthil has been doing here and plans to do in https://bugs.python.org/issue43883. Shoul

[issue44026] IDLE doesn't offer "Did you mean?" for AttributeError and NameError

2021-05-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: Another idea: do what test_exceptions() does: try: f() except NameError as exc: with support.captured_stderr() as err: sys.__excepthook__(*sys.exc_info()) self.assertNotIn("a1", err.getvalue())

Re: [issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread M.-A. Lemburg
On 04.05.2021 22:07, Steve Dower wrote: > > Perhaps what I'm suggesting here is that I don't see any reason for "sudo pip > install ..." into a distro-installed Python to ever need to work, and would > be quite happy for it to just fail miserably every time (which is already the > case for the

[issue43942] RawDescriptionHelpFormatter seems to be ignored for argument descriptions

2021-05-04 Thread paul j3
paul j3 added the comment: You test with RawDescriptionHelpFormatter, but quote from the RawTextHelpFormatter. -- nosy: +paul.j3 ___ Python tracker ___ __

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread Steve Dower
Steve Dower added the comment: Would "pip install --user ..." in a Docker container also work, though? Presumably all the filesystem paths are being redirected anyway, so is there a difference? (My assumption is that "--user" would essentially become the default if you're using the OS provi

[issue40297] test_socket.CANTest is broken at HEAD on master

2021-05-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +24570 pull_request: https://github.com/python/cpython/pull/25902 ___ Python tracker _

[issue40297] test_socket.CANTest is broken at HEAD on master

2021-05-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +24571 pull_request: https://github.com/python/cpython/pull/25903 ___ Python tracker ___ __

[issue44024] Improve the error message for non-string second arguments passed to the built-in functions getattr and hasattr

2021-05-04 Thread Géry
Change by Géry : -- title: Use common TypeError message for built-in functions getattr and hasattr -> Improve the error message for non-string second arguments passed to the built-in functions getattr and hasattr ___ Python tracker

[issue44039] Duplicated assignment in Modules/_randommodule.c

2021-05-04 Thread Brad Larsen
New submission from Brad Larsen : In Modules/_randommodule.c:600, `longval` is used in its own initialization. This seems to be a typo introduced in commit cc0cd43c0f9 for bpo-1635741. 585 static int 586 _random_exec(PyObject *module) 587 { 588 _randomstate *state = get_random_sta

[issue44039] Duplicated assignment in Modules/_randommodule.c

2021-05-04 Thread Brad Larsen
Change by Brad Larsen : -- keywords: +patch pull_requests: +24572 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25904 ___ Python tracker ___

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 04.05.2021 22:29, Steve Dower wrote: > > Would "pip install --user ..." in a Docker container also work, though? > Presumably all the filesystem paths are being redirected anyway, so is there > a difference? > > (My assumption is that "--user" would

[issue43976] Allow Python distributors to add custom site install schemes

2021-05-04 Thread Steve Dower
Steve Dower added the comment: > "pip install as root" will need to continue to work and thus distros > need to get a way to make sure that it doesn't corrupt the system > installed packages Excuse my ignorance, but does "as root" imply that there's no user site-packages directory at all? I'

[issue40297] test_socket.CANTest is broken at HEAD on master

2021-05-04 Thread miss-islington
miss-islington added the comment: New changeset 7b4725a210bcfe3dc65f37cbada423cbd1e9f063 by Miss Islington (bot) in branch '3.10': bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-19548) https://github.com/python/cpython/commit/7b4725a210bcfe3dc65f37cbada423cbd1e9f063 -- __

[issue40297] test_socket.CANTest is broken at HEAD on master

2021-05-04 Thread miss-islington
miss-islington added the comment: New changeset df99532a05e4cfba8d9835375d4a3830b84472ad by Miss Islington (bot) in branch '3.9': bpo-40297: Fix test_socket.CANTest.testSendFrame (GH-19548) https://github.com/python/cpython/commit/df99532a05e4cfba8d9835375d4a3830b84472ad -- ___

[issue40297] test_socket.CANTest is broken at HEAD on master

2021-05-04 Thread Zachary Ware
Zachary Ware added the comment: Thanks for the thoroughly researched patch and your patience! Sorry it took so long to get it merged. -- nosy: +zach.ware resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11

[issue44037] Broad performance regression from 3.10a7 to 3.10b1 with python.org macOS binaries

2021-05-04 Thread Ned Deily
Ned Deily added the comment: Thanks for the report, Raymond, and for taking the time to check performance. I am able to reliably reproduce the slowdowns in the benchmark between the 3.10.0a7 and 3.10.0b1 versions provided by the macOS installers on python.org. A similar slowdown is seen on b

[issue43942] RawDescriptionHelpFormatter seems to be ignored for argument descriptions

2021-05-04 Thread Reuben Thomas
Reuben Thomas added the comment: D'oh! Sorry for the noise. And congratulations to the author/designer of `RawDescriptionHelpFormatter` for designing/implementing exactly what I wanted all along! -- resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue43192] Argparse complains argument required when default is provided

2021-05-04 Thread paul j3
paul j3 added the comment: To a large degree the Action parameters operate independently. That is, different parts of the code use the parameters for their own purposes. The composite behavior is a result of those individual actors, rather than some sort of overall coordinated plan. First

[issue43121] Incorrect SyntaxError message for missing comma (3.10.a5)

2021-05-04 Thread Alex Hall
Alex Hall added the comment: Pablo, check out https://github.com/aroberge/friendly/discussions/197, particularly the second bullet point which has a dataset of syntax errors. -- nosy: +alexmojaki ___ Python tracker

[issue44037] Broad performance regression from 3.10a7 to 3.10b1 with python.org macOS binaries

2021-05-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > There is no reason to suspect a general Python performance regression > on this benchmark between a7 and b1. Pablo just ran the same benchmarks on Arch Linux and did not observe the degradation, so this does seem specific to the macOS build. --

[issue44040] Update broken link in pathlib source

2021-05-04 Thread Kevin Follstad
New submission from Kevin Follstad : Update broken link (repeated in several places) in pathlib sources. - # (see https://bitbucket.org/pitrou/pathlib/issue/12/) + # (see http://web.archive.org/web/20200623061726/https://bitbucket.org/pitrou/pathlib/issues/12/ ) -- assignee: docs@pyt

[issue44031] python3.8.9, python3.9.2 test_embed test_tabnanny failed

2021-05-04 Thread Alexei S
Alexei S added the comment: the same issue also in https://bugs.python.org/issue43583 -- ___ Python tracker ___ ___ Python-bugs-lis

[issue44040] Update broken link in pathlib source

2021-05-04 Thread Kevin Follstad
Change by Kevin Follstad : -- keywords: +patch pull_requests: +24573 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25905 ___ Python tracker ___ _

[issue43583] make test failures, 2 tests failed: test_embed test_tabnanny

2021-05-04 Thread Alexei S
Alexei S added the comment: python3 -m ~/Загрузки/Python-3.8.9/Lib/test/test_embed -v /usr/bin/python3: Error while finding module specification for '/home/alexei/Загрузки/Python-3.8.9/Lib/test/test_embed' (ModuleNotFoundError: No module named '/home/alexei/Загрузки/Python-3') it doesn't reco

[issue43583] make test failures, 2 tests failed: test_embed test_tabnanny

2021-05-04 Thread Alexei S
Alexei S added the comment: i rename folder and tried python3 -m '~/Загрузки/Python-389/Lib/test/test_embed' -v /usr/bin/python3: No module named ~/Загрузки/Python-389/Lib/test/test_embed ??? -- ___ Python tracker

[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-05-04 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +24574 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/25906 ___ Python tracker ___ ___

[issue44041] [sqlite3] optimisation: only call sqlite3_column_count when needed

2021-05-04 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Pr. now, we call sqlite3_column_count() for every iteration in the _pysqlite_query_execute() loop. If detect_types is set, we call it twice for every loop. Suggesting to move it out of the loop and into the pysqlite_Statement object. In pysqlite_s

[issue44041] [sqlite3] optimisation: only call sqlite3_column_count when needed

2021-05-04 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +24575 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25907 ___ Python tracker _

[issue43192] Argparse complains argument required when default is provided

2021-05-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Specifying a 'default' with a positional doesn't make much sense. That was my thought as well. Perhaps that is worth a note in the docs but there is likely no real need to change the behavior. -- nosy: +rhettinger _

[issue44026] IDLE: print "Did you mean?" for AttributeError and NameError

2021-05-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Pablo, unless you are suggesting rewriting IDLE's custom exception handing in C, I don't see how making it a single function would be an improvement. As long as it is Python code, the problem is accessing the message supplement. After reading your comment,

[issue44042] [sqlite3] _pysqlite_connection_begin() optimisations

2021-05-04 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : The following optimisations can be applied to _pysqlite_connection_begin(): 1. Return an int instead of a PyObject pointer Per now, we do Py_RETURN_NONE and Py_DECREF(result) if _pysqlite_connection_begin() was successful (normally the case). Th

[issue44042] [sqlite3] _pysqlite_connection_begin() optimisations

2021-05-04 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- keywords: +patch pull_requests: +24576 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25908 ___ Python tracker _

[issue29842] Make Executor.map work with infinite/large inputs correctly

2021-05-04 Thread Leonard Lausen
Change by Leonard Lausen : -- nosy: +leezu ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue42367] Restore os.makedirs ability to apply mode to all directories created

2021-05-04 Thread JustAnotherArchivist
Change by JustAnotherArchivist : -- nosy: +JustAnotherArchivist ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue44026] IDLE: print "Did you mean?" for AttributeError and NameError

2021-05-04 Thread Dennis Sweeney
Dennis Sweeney added the comment: I unfortunately don't have the time/internet access this week to do a PR. -- ___ Python tracker ___ _

[issue43883] Making urlparse WHATWG conformant

2021-05-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: FWIW rather than implementing our own URL parsing at all... wrapping a library extracted from a compatible-license major browser (Chromium or Firefox) and keeping it updated would avoid disparities. Unfortunately, I'm not sure how feasible this really is.

[issue43933] Regression in python3.10 with traceback frame having lineno of -1

2021-05-04 Thread Ned Batchelder
Ned Batchelder added the comment: 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:

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

2021-05-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: Both Django and Botocore issues appear to be in the category of: "depending on invalid data being passed through our urlsplit API so that they could look for it later" Not much sympathy. We never guaranteed we'd pass invalid data through. They're depend

[issue44039] Duplicated assignment in Modules/_randommodule.c

2021-05-04 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44039] Duplicated assignment in Modules/_randommodule.c

2021-05-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Just curious, how did you find this? -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue25094] [EASY][Windows] test_tools fails on Windows when passing

2021-05-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +24577 pull_request: https://github.com/python/cpython/pull/25909 ___ Python tracker ___ __

[issue44039] Duplicated assignment in Modules/_randommodule.c

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

[issue14965] super() and property inheritance behavior

2021-05-04 Thread wyz23x2
Change by wyz23x2 : -- components: +Interpreter Core -Extension Modules versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7 ___ Python tracker ___ _

[issue44043] 3.10 b1 armhf Bus Error in hashlib test: test_gil

2021-05-04 Thread Anthony Sottile
New submission from Anthony Sottile : terribly sorry, I don't have much information to go off on this other than the build logs from deadsnakes. I retried this build twice and it seems it consistently fails in this position: https://launchpadlibrarian.net/537139233/buildlog_ubuntu-bionic-armh

[issue44039] Duplicated assignment in Modules/_randommodule.c

2021-05-04 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +24578 pull_request: https://github.com/python/cpython/pull/25909 ___ Python tracker _

[issue25094] [EASY][Windows] test_tools fails on Windows when passing

2021-05-04 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: -24577 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue44043] 3.10 b1 armhf Bus Error in hashlib test: test_gil

2021-05-04 Thread Christian Heimes
Christian Heimes added the comment: Are you able to get a C stack trace somehow, e.g. from a dump or by login into the build system interactively and running gdb? The Python traceback isn't much helpful. -- nosy: +christian.heimes ___ Python track

[issue44043] 3.10 b1 armhf Bus Error in hashlib test: test_gil

2021-05-04 Thread Christian Heimes
Christian Heimes added the comment: Have you already tried ./python -X faulthandler -m test ... ? Could you please also run tests with "./python -m test -j1 ..." in a new job? This executes every test module in a subprocess. I like to see if other tests are segfaulting, too. -- nosy

[issue43354] xmlrpc.client: Fault.faultCode erroneously documented to be a string, should be int

2021-05-04 Thread Jürgen Gmach
Jürgen Gmach added the comment: This was merged already. I did not know I have to manually close the issue, but here we go! -- stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue44044] ConfigParser: cannot link to ConfigParser.optionxform(option)

2021-05-04 Thread Jürgen Gmach
New submission from Jürgen Gmach : I wanted to copy a hyperlink to the documentation section for ConfigParser's optionxform method, but in https://docs.python.org/3/library/configparser.html you cannot link to this one section, as the paragraph was marked with `:noindex:` via https://github.co

[issue44045] canonicalize "upper-case" -> "uppercase"; "lower-case" -> "lowercase"

2021-05-04 Thread Jürgen Gmach
New submission from Jürgen Gmach : Yesterday, I was bitten by ConfigParser' default behavior to lowercase keys on reading. When I looked in the documentation and the source code, I found that lowercase was sometimes written as "lower-case", e.g. here https://docs.python.org/3/library/configpa

<    1   2