[issue47178] Improve the implementations of Sequence.index and MutableSequence.extend in collections.abc

2022-03-30 Thread Géry
New submission from Géry : This P.R. will make the following changes to the `collections.abc` module: - simplify the implementation with slicing in function `Sequence.index`. - remove an unnecessary copy of `self` when a sequence extends itself in function `MutableSequence.extend`. --

[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads

2022-03-30 Thread Hood Chatham
Change by Hood Chatham : -- versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads

2022-03-30 Thread Hood Chatham
Change by Hood Chatham : -- versions: -Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads

2022-03-30 Thread Hood Chatham
Change by Hood Chatham : -- keywords: +patch pull_requests: +30284 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32209 ___ Python tracker ___

[issue46775] [Windows] OSError should unconditionally call winerror_to_errno

2022-03-30 Thread Dong-hee Na
Change by Dong-hee Na : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue47166] Dataclass transform should ignore TypeAlias variables

2022-03-30 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: >From a typing perspective this is reasonable. See this thread about type >aliases in class scopes: >https://mail.python.org/archives/list/typing-...@python.org/thread/CGOO7GPPECGMLFDUDXSSXTRADI4BXYCS/ > However, it's a niche use case and we could decide

[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-30 Thread Enji Cooper
Enji Cooper added the comment: Grégory: good question. I would personally advocate for doing it out of selfish interests. I'm working with middleware based on 3.8 (moving to 3.9+ is non-trivial), and we have a common fault scenario where the system breaks if logging.handlers.SysLogHandler

[issue46775] [Windows] OSError should unconditionally call winerror_to_errno

2022-03-30 Thread miss-islington
miss-islington added the comment: New changeset d04a21344ae69c66f5a6df69ee6fa6988a69b89d by Miss Islington (bot) in branch '3.9': bpo-46775: OSError should call winerror_to_errno unconditionally on Windows (GH-32179)

[issue46775] [Windows] OSError should unconditionally call winerror_to_errno

2022-03-30 Thread miss-islington
miss-islington added the comment: New changeset 1f2ec4cef1804cda9d2df99a318373b2982919e9 by Miss Islington (bot) in branch '3.10': bpo-46775: OSError should call winerror_to_errno unconditionally on Windows (GH-32179)

[issue47166] Dataclass transform should ignore TypeAlias variables

2022-03-30 Thread Jelle Zijlstra
Change by Jelle Zijlstra : -- nosy: +AlexWaygood, GBeauregard, JelleZijlstra ___ Python tracker ___ ___ Python-bugs-list mailing

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-30 Thread Eric Snow
Eric Snow added the comment: New changeset db4dada5108dd49ebca23e4559a53630a2df8447 by Eric Snow in branch 'main': bpo-47146: Avoid Using make Recursively (gh-32206) https://github.com/python/cpython/commit/db4dada5108dd49ebca23e4559a53630a2df8447 --

[issue47177] Frames should store next_instr instead of lasti

2022-03-30 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +30283 pull_request: https://github.com/python/cpython/pull/32208 ___ Python tracker ___

[issue47177] Frames should store next_instr instead of lasti

2022-03-30 Thread Brandt Bucher
New submission from Brandt Bucher : Rather than maintaining the offset of the "last instruction" (`f_lasti`), interpreter frames should instead just maintain a pointer to the true next instruction. This has several benefits, most notably reducing the register pressure associated with loading

[issue14911] generator.throw() documentation inaccurate

2022-03-30 Thread David Goncalves
Change by David Goncalves : -- nosy: +dpg nosy_count: 6.0 -> 7.0 pull_requests: +30282 pull_request: https://github.com/python/cpython/pull/32207 ___ Python tracker ___

[issue47145] Improve graphlib.TopologicalSort by removing the prepare step

2022-03-30 Thread Tim Peters
Tim Peters added the comment: I believe I'm elaborating on your "footgun". It doesn't matter to me whether we pick some scheme and document it, _if_ that scheme is incoherent, impossible to remember, error-prone, etc. That's how, e.g., regular expression syntax was designed. "I know!

[issue47166] Dataclass transform should ignore TypeAlias variables

2022-03-30 Thread Ned Deily
Change by Ned Deily : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47158] logging.handlers.SysLogHandler doesn't get cleaned up properly on exit if it throws an exception

2022-03-30 Thread Ned Deily
Change by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-30 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +30281 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32206 ___ Python tracker ___

[issue47145] Improve graphlib.TopologicalSort by removing the prepare step

2022-03-30 Thread Larry Hastings
Larry Hastings added the comment: I'm not sure I follow you. What do you suggest graphlib is guessing at? I thought we were discussing what graphlib's (documented, intentional) behavior should be; if there was any guessing going on, it was us doing it, guessing at what behavior the user

[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-03-30 Thread Logan Jones
Logan Jones added the comment: Ok I now have a PR up with the features requested. Let me know if you need anything else! -- ___ Python tracker ___

[issue47150] HTTPRedirectHandler fails on POST for 307 and 308

2022-03-30 Thread Ned Deily
Change by Ned Deily : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47145] Improve graphlib.TopologicalSort by removing the prepare step

2022-03-30 Thread Tim Peters
Tim Peters added the comment: Various kinds of tasks: - "Power switch must be on." Needs to done the first time. _May_ need to be done again later (if some later task turns the power off again). Can be done any number of times without harm (beyond the expense of checking), so long as the

[issue46841] Inline bytecode caches

2022-03-30 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +30280 pull_request: https://github.com/python/cpython/pull/32205 ___ Python tracker ___

[issue47145] Improve graphlib.TopologicalSort by removing the prepare step

2022-03-30 Thread Larry Hastings
Larry Hastings added the comment: Having slept on it, I think the footgun is slightly bigger than I gave it credit for. Also the problem of nodes lingering forever is easily solved: give the user control. My next iteration will keep the done nodes around, but I'll also add a forget()

[issue47173] test_launcher fails on win-arm64 buildbot

2022-03-30 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ ___

[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads

2022-03-30 Thread Hood Chatham
New submission from Hood Chatham : In Pyodide, we need to patch the interpreter to allow keyboard interrupts. We build Python without pthreads support because Emscripten doesn't currently support using pthreads and dynamic linking in the same build. It is still possible to handle UI at the

[issue44090] Add class binding to unbound super objects for allowing autosuper with class methods

2022-03-30 Thread Géry
Géry added the comment: Alright, thanks. Raymond, any objections before I propose the removal of one-argument super? -- ___ Python tracker ___

[issue47175] Allow applications to tune the condition that triggers a GIL release and implementation choice in hashlib

2022-03-30 Thread Gregory P. Smith
New submission from Gregory P. Smith : ## Background All `hashlib` computations and `binascii.crc32` and `zlib.crc32` release the GIL around their computational core. But they use a hard coded length check to determine when to do so, or always do it. That already accomplishes the larger

[issue22260] Rearrange tkinter tests, use test discovery

2022-03-30 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> out of date stage: patch review -> resolved status: pending -> closed ___ Python tracker ___

[issue17733] Add tests to test__header_value_parser for RFC 2231 parsing code

2022-03-30 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32754] feature request: asyncio.gather/wait cancel children on first exception

2022-03-30 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue47173] test_launcher fails on win-arm64 buildbot

2022-03-30 Thread Steve Dower
Steve Dower added the comment: Looks like that probably fixed it. Will let the buildbot run again to be sure: https://buildbot.python.org/all/#/builders/729/builds/1191 https://buildbot.python.org/all/#/builders/730/builds/4322 -- ___ Python

[issue47171] Enable py.exe install in Windows ARM64 installer

2022-03-30 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46566] Support -3.11-arm64 in py.exe launcher

2022-03-30 Thread Steve Dower
Steve Dower added the comment: New changeset f3d5715492195fd2532fc1a5d73be07923cdf2e1 by Steve Dower in branch 'main': bpo-46566: Make test_launcher more robust to a variety of installs (GH-32204) https://github.com/python/cpython/commit/f3d5715492195fd2532fc1a5d73be07923cdf2e1 --

[issue47148] sys.path.append before import the module causing module don't have doc-string?

2022-03-30 Thread Zachary Ware
Zachary Ware added the comment: Also cannot reproduce on Windows: D:\issue47148_test\parent\another folder>type ..\a.py def multiply(): """multiply stuff""" return 2 * 4 D:\issue47148_test\parent\another folder>type b.py import sys sys.path.append('..') import a

[issue47171] Enable py.exe install in Windows ARM64 installer

2022-03-30 Thread Steve Dower
Steve Dower added the comment: New changeset 2ab609dd614045f3b112ede0b0883339de784f2a by Steve Dower in branch 'main': bpo-47171: Enable installing the py.exe launcher on Windows ARM64 (GH-32203) https://github.com/python/cpython/commit/2ab609dd614045f3b112ede0b0883339de784f2a --

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-30 Thread Christian Heimes
Christian Heimes added the comment: The problem is likely a recursive make call "$(MAKE)" in combination with parallel execution. As far as I understand it, GNU make cannot track dependencies properly, which can lead to partial or invalid dependency graphs. One make process can modify a

[issue47173] test_launcher fails on win-arm64 buildbot

2022-03-30 Thread Steve Dower
Steve Dower added the comment: The fix in PR 32204 also clears out VIRTUAL_ENV, so that may be enough. It's running on buildbots to see whether it helps. -- ___ Python tracker

[issue46566] Support -3.11-arm64 in py.exe launcher

2022-03-30 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +30279 pull_request: https://github.com/python/cpython/pull/32204 ___ Python tracker ___

Re: calling a function asynchronously

2022-03-30 Thread Kirill Ratkin via Python-list
Hi 30.03.2022 21:44, Larry Martell пишет: On Wed, Mar 30, 2022 at 2:40 PM Kirill Ratkin via Python-list wrote: Hi again, I changed a bit your example and it works as you expected I hope. import asyncio async def long(): for i in range(100): await asyncio.sleep(10)

[issue47162] Add call trampoline to work around bad fpcasts on Emscripten

2022-03-30 Thread miss-islington
miss-islington added the comment: New changeset 581c4434de62d9d36392f10e65866c081fb18d71 by Christian Heimes in branch 'main': bpo-47162: Add call trampoline to mitigate bad fpcasts on Emscripten (GH-32189) https://github.com/python/cpython/commit/581c4434de62d9d36392f10e65866c081fb18d71

[issue47162] Add call trampoline to work around bad fpcasts on Emscripten

2022-03-30 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46775] [Windows] OSError should unconditionally call winerror_to_errno

2022-03-30 Thread Steve Dower
Steve Dower added the comment: I'm still not convinced we should backport. Has anyone looked through to see whether this will actually affect any high valued error codes today? -- ___ Python tracker

[issue47174] Define behavior of descriptor-typed fields on dataclasses

2022-03-30 Thread Erik De Bonte
New submission from Erik De Bonte : Recent discussions about PEP 681 (dataclass_transform) have focused on support for descriptor-typed fields. See the email thread here: https://mail.python.org/archives/list/typing-...@python.org/thread/BW6CB6URC4BCN54QSG2STINU2M7V4TQQ/ Initially we were

[issue47171] Enable py.exe install in Windows ARM64 installer

2022-03-30 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +30278 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32203 ___ Python tracker ___

Re: calling a function asynchronously

2022-03-30 Thread Larry Martell
On Wed, Mar 30, 2022 at 2:40 PM Kirill Ratkin via Python-list wrote: > > Hi again, > > I changed a bit your example and it works as you expected I hope. > > import asyncio > > > async def long(): > for i in range(100): > await asyncio.sleep(10) > print("long is done") > > >

Re: calling a function asynchronously

2022-03-30 Thread Kirill Ratkin via Python-list
Hi again, I changed a bit your example and it works as you expected I hope. import asyncio async def long():     for i in range(100):     await asyncio.sleep(10)     print("long is done") loop = asyncio.get_event_loop() task = loop.create_task(long()) print('after asyncio.run')

Re: Add a method to list the current named logging levels

2022-03-30 Thread Mats Wichmann
On 3/30/22 10:39, Chris Angelico wrote: > New in 3.11: > > https://docs.python.org/3.11/library/logging.html#logging.getLevelNamesMapping > > I'd say it's reasonable to use this, and then to backport it to older > versions by monkeypatching it in (by referencing the internal). You > potentially

[issue44090] Add class binding to unbound super objects for allowing autosuper with class methods

2022-03-30 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, I see no description of what you can do with an unbound super object in the docs (https://docs.python.org/3/library/functions.html#super), and experimentation with it does not reveal any useful functionality. You may want to open a new issue for

[issue47172] Make virtual opcodes in the compiler > 256 and is_jump() identify only proper jumps

2022-03-30 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47173] test_launcher fails on win-arm64 buildbot

2022-03-30 Thread Steve Dower
Steve Dower added the comment: Oh, I wonder if the VIRTUAL_ENV environment variable is interfering with search (as it's meant to, but the tests weren't written expecting to be run inside a venv). -- ___ Python tracker

[issue47173] test_launcher fails on win-arm64 buildbot

2022-03-30 Thread Steve Dower
New submission from Steve Dower : Test failures: https://buildbot.python.org/all/#/builders/730/builds/4307 == FAIL: test_filter_to_company (test.test_launcher.TestLauncher)

[issue47172] Make virtual opcodes in the compiler > 256 and is_jump() identify only proper jumps

2022-03-30 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +30277 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32200 ___ Python tracker ___

[issue47168] Improvements for stable ABI definition files

2022-03-30 Thread Oleg Iarygin
Oleg Iarygin added the comment: Probably, `regen-limited-abi` needs to be called from `regen-all` so 'Check if generated files are up to date' CI job will become aware of it. -- ___ Python tracker

[issue46775] [Windows] OSError should unconditionally call winerror_to_errno

2022-03-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +30276 pull_request: https://github.com/python/cpython/pull/32199 ___ Python tracker ___

[issue46775] [Windows] OSError should unconditionally call winerror_to_errno

2022-03-30 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +30275 pull_request: https://github.com/python/cpython/pull/32198 ___ Python tracker

[issue46775] [Windows] OSError should unconditionally call winerror_to_errno

2022-03-30 Thread Steve Dower
Steve Dower added the comment: New changeset d0c67ea0645b7ad37b867c167882a346a24de641 by Dong-hee Na in branch 'main': bpo-46775: OSError should call winerror_to_errno unconditionally on Windows (GH-32179) https://github.com/python/cpython/commit/d0c67ea0645b7ad37b867c167882a346a24de641

[issue47172] Make virtual opcodes in the compiler > 256 and is_jump() identify only proper jumps

2022-03-30 Thread Irit Katriel
New submission from Irit Katriel : There are a few "virtual opcodes" which are internal to the compiler. They can have values > 256. This way we don't waste any valid opcodes on them, and it is easier to detect when one of them escapes the compiler into the assemble stage. In addition, there

Re: Add a method to list the current named logging levels

2022-03-30 Thread Tim Chase
On 2022-03-30 16:37, Barry wrote: > Is logging.getLevelNamesMapping() what you are looking for? Is this in some version newer than the 3.8 that comes stock on my machine? $ python3 -q >>> import logging >>> logging.getLevelNamesMapping() Traceback (most recent call last): File "",

[issue47168] Improvements for stable ABI definition files

2022-03-30 Thread Oleg Iarygin
Change by Oleg Iarygin : -- nosy: +arhadthedev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47171] Enable py.exe install in Windows ARM64 installer

2022-03-30 Thread Steve Dower
New submission from Steve Dower : Currently the launcher is not installed by the installer. We need to reenable it. -- assignee: steve.dower components: Windows messages: 416385 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title:

[issue47170] py launcher on windows opens new terminal window when parsing python script with shebang

2022-03-30 Thread Christian Ascia
Christian Ascia added the comment: Thanks, it works now! -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue47170] py launcher on windows opens new terminal window when parsing python script with shebang

2022-03-30 Thread Paul Moore
Paul Moore added the comment: This is Windows (shell) behaviour. To avoid this, you need to add the .py extension to the PATHEXT environment variable. -- ___ Python tracker

[issue47170] py launcher on windows opens new terminal window when parsing python script with shebang

2022-03-30 Thread Christian Ascia
Christian Ascia added the comment: It happens when i run "my-script.py". I checked all terminal emulators on my system, it happens on PowerShell 7, in all Windows Terminal profiles (including cmd profile), in integrated terminals on vscode but not in cmd. --

[issue47170] py launcher on windows opens new terminal window when parsing python script with shebang

2022-03-30 Thread Steve Dower
Steve Dower added the comment: Are you saying this happens when you run "py.exe my-script.py"? Or only when you run "my-script.py" (without the py.exe)? -- ___ Python tracker

Re: Add a method to list the current named logging levels

2022-03-30 Thread Chris Angelico
On Thu, 31 Mar 2022 at 03:33, Edward Spencer wrote: > > 在 2022年3月30日星期三 UTC+1 16:38:26, 写道: > > > On 30 Mar 2022, at 16:11, Edward Spencer wrote: > > > > > > 在 2021年9月3日星期五 UTC+1 18:50:51, 写道: > > On 2 Sep 2021, at 23:38, Dieter Maurer wrote: > > >>> > > >>> Edward Spencer wrote at

Re: Add a method to list the current named logging levels

2022-03-30 Thread Edward Spencer
在 2022年3月30日星期三 UTC+1 16:38:26, 写道: > > On 30 Mar 2022, at 16:11, Edward Spencer wrote: > > > > 在 2021年9月3日星期五 UTC+1 18:50:51, 写道: > On 2 Sep 2021, at 23:38, Dieter Maurer wrote: > >>> > >>> Edward Spencer wrote at 2021-9-2 10:02 -0700: > Sometimes I like to pass the logging

[issue47170] py launcher on windows opens new terminal window when parsing python script with shebang

2022-03-30 Thread Christian Ascia
New submission from Christian Ascia : Hi, as the title describes, i noticed this unfornutate behavior preventing me to run directly python scripts in terminal without using the py command. I searched in the documentation but i couldn't find flags to prevent py launcher from opening a new

Re: calling a function asynchronously

2022-03-30 Thread Kirill Ratkin via Python-list
Hi, You can use asyncio.create_task and gather results. See docs - https://docs.python.org/3/library/asyncio-task.html But think twice what you want to do in async task. Do you use synchronous requests to database? If yes it will blocks eventloop... If you use Django it makes sense to use

[issue47146] PR check "Check if generated files are up to date" failing intermittently

2022-03-30 Thread Eric Snow
Eric Snow added the comment: Looks like this is still an intermittent problem: * https://github.com/python/cpython/pull/32195 + failed: https://github.com/python/cpython/runs/5756616733 + failed: https://github.com/python/cpython/runs/5753267869 + failed:

calling a function asynchronously

2022-03-30 Thread Larry Martell
I have a django app, and for a certain request I need to kick off a long running task. I want to do this asynchronously and immediately return a response. I tried using subprocess.Process() but the forked process does not have a django database connection. I then tried posting a request using ajax

[issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported on Unix

2022-03-30 Thread Petr Viktorin
Petr Viktorin added the comment: > Ah, sorry, I could have described the issue better. It's not a problem with > exporting, PyThread_get_thread_native_id() isn't available on Solaris (and > possibly other platforms) at all. Jakub, does this mean test_stable_abi_ctypes fails on Solaris? Are

[issue47169] Stable ABI: Some optional (#ifdef'd) functions aren't handled correctly

2022-03-30 Thread Petr Viktorin
New submission from Petr Viktorin : - PyThread_get_thread_native_id is only available when PY_HAVE_THREAD_NATIVE_ID is defined. The test currently always expects it to be available. - PyOS_CheckStack is only available when USE_STACKCHECK is defined (i.e. on Windows). It should be exported

[issue47168] Improvements for stable ABI definition files

2022-03-30 Thread Petr Viktorin
New submission from Petr Viktorin : This issue groups together a few changes I'd like to make: - Rename Doc/data/stable_abi.dat to *.csv, so it gets syntax highlighting. (The only user of that file should be the Sphinx extension) - Mark autogenerated files as such in .gitattributes - Convert

[issue24837] await process.wait() does not work with a new_event_loop

2022-03-30 Thread Guido van Rossum
Guido van Rossum added the comment: Okay let's close it then. :-) -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

Re: Add a method to list the current named logging levels

2022-03-30 Thread Barry
> On 30 Mar 2022, at 16:11, Edward Spencer wrote: > > 在 2021年9月3日星期五 UTC+1 18:50:51, 写道: On 2 Sep 2021, at 23:38, Dieter Maurer wrote: >>> >>> Edward Spencer wrote at 2021-9-2 10:02 -0700: Sometimes I like to pass the logging level up to the command line params so my user

[issue47168] Improvements for stable ABI definition files

2022-03-30 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +30274 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32195 ___ Python tracker ___

[issue47167] Allow overriding future-task compliance check in asyncio

2022-03-30 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +30273 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32197 ___ Python tracker ___

[issue47167] Allow overriding future-task compliance check in asyncio

2022-03-30 Thread Andrew Svetlov
New submission from Andrew Svetlov : Now asyncio.Task has a strict hardcoded check for futures processes on task's step. Sometimes third-party library [1] wants to replace it with custom logic. Currently it is impossible without implementing the full asyncio.Task replacement from scratch.

Re: Python Qualification?

2022-03-30 Thread Barry
> On 30 Mar 2022, at 15:40, alister.ware wrote: > > OK > > where do you work & are there any vacancies (a junior position would suffice) At the moment we are only hiring in India and for senior rolls. Barry > >> On 30/03/2022 14:52, Barry wrote: >> On 29 Mar 2022, at 20:37, alister

[issue46964] The global config should not be stored on each interpreter

2022-03-30 Thread STINNER Victor
STINNER Victor added the comment: > If the invariant bits are moved out, then it clearly indicates when code can > safely assume that every interpreter will be seeing the same value. What is the benefit of that? Do you have an example? -- ___

[issue47115] Documentation inconsistency with the stable ABI

2022-03-30 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch pull_requests: +30272 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32196 ___ Python tracker ___

Re: Python Qualification?

2022-03-30 Thread alister via Python-list
On Tue, 29 Mar 2022 20:49:53 -0400, Dennis Lee Bieber wrote: > On Tue, 29 Mar 2022 19:26:03 - (UTC), alister > declaimed the following: > >>I'm currently considering a career change (not much choice actually just >>been made redundant). >>I'd like to be able to turn my interest in python to

[issue47099] Replace with_traceback() with exception chaining and reraising

2022-03-30 Thread Oleg Iarygin
Change by Oleg Iarygin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

Re: Add a method to list the current named logging levels

2022-03-30 Thread Edward Spencer
在 2021年9月3日星期五 UTC+1 18:50:51, 写道: > > On 2 Sep 2021, at 23:38, Dieter Maurer wrote: > > > > Edward Spencer wrote at 2021-9-2 10:02 -0700: > >> Sometimes I like to pass the logging level up to the command line params > >> so my user can specific what level of logging they want. However there

[issue47164] [C API] Add private "CAST" macros to clean up casts in C code

2022-03-30 Thread STINNER Victor
STINNER Victor added the comment: > I've had to debug a segfault before only because the inline function > implicitly cast its arguments, and it was accessing a non-existent member. If > it were a macro it would access the struct member directly, and the compiler > would be able to catch

[issue47092] [C API] Add PyFrame_GetVar(frame, name) function

2022-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: Mark's suggested frame stack API makes sense to me, but being able to get/set specific values through the full frame API seems like it would be useful even if the lower level API existed - if we don't get one of the proxy PEPs in shape to land in 3.11, trace

[issue47115] Documentation inconsistency with the stable ABI

2022-03-30 Thread Petr Viktorin
Petr Viktorin added the comment: So. According to PEP 384 (which added all structs in the stable ABI, except Py_buffer), some structs are opaque and others have a few members exposed: https://peps.python.org/pep-0384/#structures I will split the latter into 1) structs that have a few fields

[issue46337] urllib.parse: Allow more flexibility in schemes and URL resolution behavior

2022-03-30 Thread Ethan Furman
Ethan Furman added the comment: Éric Araujo wrote on PR30520: > No, we should not redefine the behavior of urlparse. > > I was always talking about adding another function. Yes it can be a one-liner, > but my point is that I don’t see the usefulness of having the

[issue47161] pathlib method relative_to doesnt work with // in paths

2022-03-30 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +30271 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32193 ___ Python tracker ___

[issue47166] Dataclass transform should ignore TypeAlias variables

2022-03-30 Thread Thomas MK
New submission from Thomas MK : The dataclass transformation ignores attributes that are annotated as ClassVar. I think it should also ignore attributes that are annotated as TypeAlias. Specifically, I have this usecase in mind: class RunMode(Enum): release = auto() debug = auto()

[issue36692] Unexpected stderr output from test_sys_settrace

2022-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: I'm not, so I assume this got cleaned up somewhere along the way. -- resolution: -> out of date stage: needs patch -> resolved status: pending -> closed ___ Python tracker

[issue46964] The global config should not be stored on each interpreter

2022-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: I agree the status quo has its benefits. However, it has the distinct downside that because each interpreter has its own storage for copied settings, other code has to assume the settings *might* be different in each interpreter, even if they're currently

[issue47164] [C API] Add private "CAST" macros to clean up casts in C code

2022-03-30 Thread Ken Jin
Ken Jin added the comment: @Victor, I'm not against (A) or any of the PRs you proposed. They look fine to me. My concern was with certain static inline functions (there are none here :). The _CAST macros have genuinely helped me debug code before. --

[issue47135] Allow decimal.localcontext to accept keyword arguments to set context attributes

2022-03-30 Thread Nick Coghlan
Nick Coghlan added the comment: Seems reasonable to me, but I think a full implementation would want to throw an error for keyword args that don't already exist as context attributes (otherwise typos would fail silently) -- ___ Python tracker

[issue47164] [C API] Add private "CAST" macros to clean up casts in C code

2022-03-30 Thread STINNER Victor
STINNER Victor added the comment: GH-32192 "Add _PyCFunction_CAST() macro" is special. It's used to define functions in PyTypeObject.tp_methods or PyModuleDef.m_methods. Casting a function pointer can cause issues with Control Flow Integrity (CFI) implemented in LLVM. The _thread module has

[issue47164] [C API] Add private "CAST" macros to clean up casts in C code

2022-03-30 Thread STINNER Victor
STINNER Victor added the comment: Hum, there are two things and maybe we are not talking about the same thing. * (A) Modifying macros defined in the Python C API (Include/ header files) doing cast on their arguments to use CAST macros * (B) Modify C code doing casts to use CAST macros I

[issue47164] [C API] Add private "CAST" macros to clean up casts in C code

2022-03-30 Thread STINNER Victor
STINNER Victor added the comment: > By the way, the current Python C API is not fully compatible with C++. (...) I created bpo-47165 "[C API] Test that the Python C API is compatible with C++". -- ___ Python tracker

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2022-03-30 Thread STINNER Victor
STINNER Victor added the comment: Follow-up issue: bpo-47165 "[C API] Test that the Python C API is compatible with C++". -- ___ Python tracker ___

[issue47165] [C API] Test that the Python C API is compatible with C++

2022-03-30 Thread STINNER Victor
New submission from STINNER Victor : There are more and more popular projects using the Python C API. The first big player is pybind11: "Seamless operability between C++11 and Python" https://pybind11.readthedocs.io/ Recently, I proposed a PR to add Python 3.11 support to the datatable

  1   2   >