[issue42384] Inconsistent sys.path between python and pdb

2021-01-24 Thread Andrey Bienkowski
Change by Andrey Bienkowski : -- pull_requests: +23139 pull_request: https://github.com/python/cpython/pull/24320 ___ Python tracker ___

[issue42960] resources module, FreeBSD update adding RLIMIT_KQUEUES constant

2021-01-24 Thread Kubilay Kocak
New submission from Kubilay Kocak : Thank you for the PR David. If there's anything I can do to help support you with respect to Python on FreeBSD (such as accounts on the official freebsd python buildbot workers) let me know :) -- ___ Python

[issue25567] shlex.quote doesn't work on bytestrings

2021-01-24 Thread techfixya
techfixya added the comment: How to Install Brother mfc-l2740dw driver on Windows https://techfixya.com/how-to-install-brother-mfc-l2740dw-driver-on-windows/ -- nosy: +techfixya ___ Python tracker

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Interesting. I would prefer to make fewer changes per pre-PR branch commit, but I see from the doc that I could split changes into at least 4 batches from the existing options. Has this been run/tested on projects better tested than IDLE? Anyway 7. Run

[issue43020] str.lower method with "İ" character

2021-01-24 Thread Emir
New submission from Emir : In Turkish there is a character when you capitalize "i" and it's written as "İ". When I use str.lower method, it seems like it works just fine because it prints the character I expected(i). But the problem is when I compare it to normal "i" character (without

[issue43019] wait_for(to_thread)) does not work as expected. Extra documentation or fix needed.

2021-01-24 Thread Felipe Faria
New submission from Felipe Faria : Consider the following: ``` import asyncio import time async def async_test(): while True: await asyncio.sleep(1) print("in here - async") def sync_test(): while True: time.sleep(1) print("in here - sync") async def

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread Anthony Sottile
Anthony Sottile added the comment: just noticed this PR -- you might be interested in pyupgrade which automates some of these things -- here's (for example) `git ls-files -- Lib/idlelib | grep '\.py$' | xargs pyupgrade --py36-plus ```diff diff --git a/Lib/idlelib/calltip_w.py

[issue42977] Tkinter Optionmenu Too Narrow on Mac

2021-01-24 Thread DDavid
DDavid added the comment: Thanks for your help! I agree that it is probably a Tk issue. I will contact them and back with more information. -- ___ Python tracker ___

[issue42948] bytearray.copy is undocumented

2021-01-24 Thread wim glenn
wim glenn added the comment: Oh, I've missed that part. Although the note (5) seems to indicate that the copy method refers to sequence types which don't support slicing, it still seems adequately documented under the mutable sequence operations. I'll close this. -- stage: ->

[issue41962] Make threading._register_atexit public?

2021-01-24 Thread Ben Darnell
Ben Darnell added the comment: > IMO, a better practice would be providing those potentially infinite running > tasks a direct method of escape and invoking it before calling > executor.shutdown(), it would be a more reliable approach. Agreed, but the problem is that I'm in a library (so I

[issue35523] Remove old ctypes callback workaround: creating the first instance of a callback

2021-01-24 Thread Campbell Barton
Campbell Barton added the comment: Note, this bug is something we ran into in Blender, see: https://developer.blender.org/T84752 -- ___ Python tracker ___

[issue35523] Remove old ctypes callback workaround: creating the first instance of a callback

2021-01-24 Thread Campbell Barton
Campbell Barton added the comment: Could this fix be applied to Python 3.7x? Currently the visual effects platform for 2021 is using Python 3.7.x, see: https://vfxplatform.com Which means anyone using the VFX platform can run into this bug. -- nosy: +ideasman42

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread miss-islington
miss-islington added the comment: New changeset ff06957710aa849f3402b082a7ddd34b0325d6de by Miss Islington (bot) in branch '3.9': bpo-43013: Update idlelib code to 3.x (GH-24315) https://github.com/python/cpython/commit/ff06957710aa849f3402b082a7ddd34b0325d6de --

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +23138 pull_request: https://github.com/python/cpython/pull/24319 ___ Python tracker ___

[issue42916] Support for DICOM image file format in imghdr module

2021-01-24 Thread Berker Peksag
Berker Peksag added the comment: Copying my comment from GitHub: > I think DICOM is too specific to be added to the stdlib. I'd prefer > improving documentation of imghdr.tests to make adding custom file > types clearer. -- nosy: +berker.peksag

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 63ebba0d9430a0bc18fd8551ad27b9b25709a4be by Miss Islington (bot) in branch '3.8': bpo-43013: Update idlelib code to 3.x (GH-24315) (#24317) https://github.com/python/cpython/commit/63ebba0d9430a0bc18fd8551ad27b9b25709a4be --

[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2021-01-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +23137 pull_request: https://github.com/python/cpython/pull/24318 ___ Python tracker ___

[issue43018] unwanted label showing up in ttk.LabeledScale

2021-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It has already been fixed in issue40219. Just wait next bugfix release. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed superseder: -> ttk LabeledScale: label covered by hidden element

[issue43018] unwanted label showing up in ttk.LabeledScale

2021-01-24 Thread Akuli
New submission from Akuli : import tkinter from tkinter import ttk root = tkinter.Tk() ttk.LabeledScale(root).pack() root.mainloop() Run this code and move the slider to center. You see something in front of the number. The problem is this line in ttk.py: tmp =

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

2021-01-24 Thread Éric Araujo
Éric Araujo added the comment: Senthil, what is your opinion here? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41962] Make threading._register_atexit public?

2021-01-24 Thread Kyle Stanley
Kyle Stanley added the comment: > I'm dealing with a subtle deadlock involving > concurrent.futures.ThreadPoolExecutor, and my solution that worked in Python > 3.8 broke with 3.9. I'm running some long-running (possibly infinite) tasks > in the thread pool, and I cancel them in an `atexit`

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 8dfe15625e6ea4357a13fec7989a0e6ba2bf1359 by Terry Jan Reedy in branch 'master': bpo-43013: Update idlelib code to 3.x (GH-24315) https://github.com/python/cpython/commit/8dfe15625e6ea4357a13fec7989a0e6ba2bf1359 --

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +23136 pull_request: https://github.com/python/cpython/pull/24317 ___ Python tracker ___

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23135 pull_request: https://github.com/python/cpython/pull/24316 ___ Python tracker

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +23134 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24315 ___ Python tracker ___

[issue43013] IDLE: update code, mostly by cleanups of 2.x or 2to3 artifacts

2021-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: Delete 2. 'list' is needed if for-suite mutates the dict all 6 either directly or maybe indirectly do so. Not worth checking unless otherwise editing the function. 6. N unneeded .keys() (out of 13 occurrences) when iterating dict. Low priority. First

[issue43017] Improve error message in the parser when using un-parenthesised tuples in comprehensions

2021-01-24 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +23133 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24314 ___ Python tracker

[issue43017] Improve error message in the parser when using un-parenthesised tuples in comprehensions

2021-01-24 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +lys.nikolaou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43017] Improve error message in the parser when using un-parenthesised tuples in comprehensions

2021-01-24 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : I have seen this confusion many users over the years. Instead of showing: ❯ python -c '[x,z for x,y in something]' File "", line 1 [x,z for x,y in something] ^ SyntaxError: invalid syntax We can show: ❯ ./python -c '[x,z for x,y in

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal nosy_count: 4.0 -> 5.0 pull_requests: +23132 pull_request: https://github.com/python/cpython/pull/24313 ___ Python tracker

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

2021-01-24 Thread Adam Goldschmidt
Adam Goldschmidt added the comment: > The difference is that semicolon is defined in a previous specification. I understand, but this will limit us in the future if the spec changes - though I don't have strong feelings regarding this one. > Dear all, now that Adam has signed the CLA, I have

[issue41962] Make threading._register_atexit public?

2021-01-24 Thread Irit Katriel
Change by Irit Katriel : -- components: +Library (Lib) nosy: +aeros, vstinner ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42647] Unable to use concurrent.futures in atexit hook

2021-01-24 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +aeros ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42647] Unable to use concurrent.futures in atexit hook

2021-01-24 Thread Irit Katriel
Irit Katriel added the comment: b61b818d916942aad1f8f3e33181801c4a1ed14b is the first bad commit commit b61b818d916942aad1f8f3e33181801c4a1ed14b Author: Kyle Stanley Date: Fri Mar 27 15:31:22 2020 -0400 bpo-39812: Remove daemon threads in concurrent.futures (GH-19149) Remove

[issue43016] Improve tests for curses

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

[issue43016] Improve tests for curses

2021-01-24 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently tests for curses mainly call different functions and methods in random order. Not all argument combinations are covered by tests and results are not checked. I also ran tests with 1750 different values of TERM supported by ncurses, and some

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

2021-01-24 Thread Ken Jin
Ken Jin added the comment: Dear all, now that Adam has signed the CLA, I have closed my PR in favor of Adam's because I think 2 open PRs might split everyone's attention. Instead, I'll focus on reviewing Adam's PR. Sorry for any inconvenience caused. --

[issue43015] Add str.replaceall?

2021-01-24 Thread Nathaniel Manista
New submission from Nathaniel Manista : Chained str.replace calls can sometimes be pretty unattractive; what are the chances that we could have an str.replaceall method? Of type Callable[[Mapping[str, str]], str]? Check out absl::StrReplaceAll

[issue42565] Traceback (most recent call last): File "", line 1, in NameError: name 'python' is not defined

2021-01-24 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug stage: -> resolved status: pending -> closed ___ Python tracker ___ ___

[issue42743] pdb vanishing breakpoints

2021-01-24 Thread Irit Katriel
Irit Katriel added the comment: Daniel, can you provide a recipe to reproduce what you are seeing? There are different ways to enter pdb, and different ways to set breakpoints. If you provide accurate instructions it will help to be sure that the issue has indeed been fixed. --

[issue42992] Tkinter bbox coordinates incorrectly drawn

2021-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Even if there is something wrong with the returned values, Tkinter is just mostly a thin wrap around Tk. It does not change the returned value, it just converts it to appropriate Python type (a tuple of 4 integers (4, 4, 101, 101) instead of a string "4 4

[issue42977] Tkinter Optionmenu Too Narrow on Mac

2021-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with E. Paine that you should use pack(fill="x") if you want to stretch a widget. And in any case Tkinter itself does not manage layout, it is just a wrapper around Tk, so if you think that the default layout of a button is wrong on some

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: re.compile() already uses caching. But it is less efficient for some reasons. To Steven: the time is *reduced* by 28%, but the speed is *increased* by 39%. -- nosy: +serhiy.storchaka ___ Python tracker

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Steven D'Aprano
Steven D'Aprano added the comment: Just for the record: > The optimization takes the execution from ~6300ms to ~4500ms on my machine > (representing a 28% - 39% improvement depending on how you calculate it) The correct answer is 28%, which uses the initial value as the base:

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: New changeset 15bd9efd01e44087664e78bf766865a6d2e06626 by Anthony Sottile in branch 'master': bpo-43014: Improve performance of tokenize.tokenize by 20-30% https://github.com/python/cpython/commit/15bd9efd01e44087664e78bf766865a6d2e06626 -- nosy:

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Anthony Sottile
Anthony Sottile added the comment: attached out3.pstats / out3.svg which represent the optimization using lru_cache instead -- Added file: https://bugs.python.org/file49764/out3.svg ___ Python tracker

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Anthony Sottile
Change by Anthony Sottile : Added file: https://bugs.python.org/file49763/out3.pstats ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Anthony Sottile
Anthony Sottile added the comment: admittedly anecdotal but here's another data point in addition to the profiles attached test.test_tokenize suite before: $ ./python -m test.test_tokenize ..

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +23130 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24311 ___ Python tracker ___

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Anthony Sottile
Change by Anthony Sottile : Added file: https://bugs.python.org/file49762/out2.svg ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Anthony Sottile
Change by Anthony Sottile : Added file: https://bugs.python.org/file49761/out2.pstats ___ Python tracker ___ ___ Python-bugs-list mailing

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Anthony Sottile
Change by Anthony Sottile : Added file: https://bugs.python.org/file49760/out.svg ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Anthony Sottile
New submission from Anthony Sottile : I did some profiling (attached a few files here with svgs) of running this script: ```python import io import tokenize # picked as the second longest file in cpython with open('Lib/test/test_socket.py', 'rb') as f: bio = io.BytesIO(f.read()) def