[issue46833] Installer Wizard is unclear and has redundant settings

2022-02-23 Thread Christian Buhtz
New submission from Christian Buhtz : Hello together, this is is about the installer of Python 3.9.10 on Windows 10 64bit. I have problems to interpret the installer wizard/dialog. And my argument is that no matter if there are good reasons for the current options some of the users are confus

[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-02-23 Thread Ofey Chan
Ofey Chan added the comment: Hello, I am new to cpython project and want to help. I dig into `follow_wrapper_chains` feature and found it really interesting. In `inspect.signature()`, the conversion of `functools.partial` object's signature is made when going down the unwrap chain. Relevant

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems a CancelledError message can be lost also in Condition.wait(). -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue46798] xml.etree.ElementTree: get() doesn't return default value, always ATTLIST value

2022-02-23 Thread padremayi
padremayi added the comment: IMHO if the developer doesn't manage the XML itself it is VERY unreasonable to use the document value and not the developer one. At the moment the developer must predict the future changes on XML structure. For my point of view if an attribute is not present get(

[issue46798] xml.etree.ElementTree: get() doesn't return default value, always ATTLIST value

2022-02-23 Thread padremayi
Change by padremayi : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue26832] ProactorEventLoop doesn't support stdin/stdout nor files with connect_read_pipe/connect_write_pipe

2022-02-23 Thread Min RK
Min RK added the comment: It appears that connect_read_pipe also doesn't accept pipes returned by `os.pipe`. If that's the case, what _does_ ProactorEventLoop.connect_read_pipe accept? I haven't been able to find any examples of `connect_read_pipe` that work on Windows, and every connect_rea

[issue46798] xml.etree.ElementTree: get() doesn't return default value, always ATTLIST value

2022-02-23 Thread padremayi
padremayi added the comment: Now: def get(self, key, default=None) Future: def get(self, key, default=None, double_value=False) No code break -- ___ Python tracker ___ _

[issue46329] Split up the CALL_NO_KW and CALL_KW instructions.

2022-02-23 Thread Mark Shannon
Mark Shannon added the comment: New changeset 424023efee5b21567b4725015ef143b627112e3c by Brandt Bucher in branch 'main': bpo-46329: Fix test failure when `Py_STATS` is enabled (GH-31511) https://github.com/python/cpython/commit/424023efee5b21567b4725015ef143b627112e3c -- _

[issue45885] Specialize COMPARE_OP

2022-02-23 Thread Mark Shannon
Mark Shannon added the comment: New changeset 375a56bd4015596c0cf44129c8842a1fe7199785 by Brandt Bucher in branch 'main': bpo-45885: Don't un-adapt `COMPARE_OP` when collecting stats (GH-31516) https://github.com/python/cpython/commit/375a56bd4015596c0cf44129c8842a1fe7199785 -- ___

[issue46798] xml.etree.ElementTree: get() doesn't return default value, always ATTLIST value

2022-02-23 Thread Stefan Behnel
Stefan Behnel added the comment: > IMHO if the developer doesn't manage the XML itself it is VERY unreasonable > to use the document value and not the developer one. I disagree. If the document says "this is the default if no explicit value if given", then I consider that just as good as pro

[issue46834] test_gdb started to fail on buildbot/s390x RHEL7

2022-02-23 Thread Nikita Sobolev
New submission from Nikita Sobolev : Log sample: ``` == FAIL: test_up_then_down (test.test_gdb.StackNavigationTests) -- Traceback (most recent call last): Fi

[issue46834] test_gdb started to fail on buildbot/s390x RHEL7

2022-02-23 Thread Nikita Sobolev
Nikita Sobolev added the comment: Sorry, wrong link. It started to fail after this commit: https://github.com/python/cpython/commit/66b3cd7063322a9f5c922a97bbd06fdb9830 -- ___ Python tracker ___

[issue46835] ImportError: bad magic number in ... does not indicate where is that file located

2022-02-23 Thread Miro Hrončok
New submission from Miro Hrončok : Recently I've been debugging a very nasty bug report that looked like this: Traceback (most recent call last): File "/usr/bin/jupyter-notebook", line 5, in from notebook.notebookapp import main File "/usr/lib/python3.10/site-packages/no

[issue46835] ImportError: bad magic number in ... does not indicate where is that file located

2022-02-23 Thread Miro Hrončok
Miro Hrončok added the comment: Apparently, the exception already contains a path attribute with exactly the kind of information I'd like to see. What if the message was: ImportError: bad magic number in '/usr/bin/six.pyc': b'\x03\xf3\r\n' Would that be accepted as a PR? Should I discuss thi

[issue45326] Unexpected TypeError with type alias+issubclass+ABC

2022-02-23 Thread burrito
Change by burrito : -- nosy: +burrito ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue46622] Add an async variant of lru_cache for coroutines.

2022-02-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: Thanks, Raymond. I agree that caching of iterators and generators is out of the issue scope. Also, I agree that a separate async cache decorator should be added. I prefer the `async_lru_cache` (and maybe `async_cache` for the API symmetry). We have `context

[issue46622] Add an async variant of lru_cache for coroutines.

2022-02-23 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: Another thing to point out is that existing third-party solutions (both alru_cache and cached_property) only work for asyncio, and the stdlib version (as implemented now) will be an improvement. And if the position is that the improvements should only be sub

[issue45459] Limited API support for Py_buffer

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29651 pull_request: https://github.com/python/cpython/pull/31527 ___ Python tracker ___ __

[issue45459] Limited API support for Py_buffer

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > Include/object.h:109:3: warning: redefinition of typedef 'PyObject' is a C11 > feature [-Wtypedef-redefinition] Oh. I already met this error :-( That's why I proposed in GH-31201 to move all forward declarations at the top of Python.h to solve such issue.

[issue45459] Limited API support for Py_buffer

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29652 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/31528 ___ Python tracker ___ __

[issue46833] Installer Wizard is unclear and has redundant settings

2022-02-23 Thread Steve Dower
Steve Dower added the comment: > I am not sure but would say that the first two options are related to the > py-launcher not the the python interpreter itself. You correctly read the options, so we'll need a suggestion on how to make it more clear without becoming impenetrable. Maybe changin

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-23 Thread Chris Jerdonek
Chris Jerdonek added the comment: For future reference, with Andrew's change merged above, the traceback for the example snippet in my message above: https://bugs.python.org/issue45390#msg403570 is now the following. Observe that (1) the call to sleep() continues to be present, but (2) withou

[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-02-23 Thread Ofey Chan
Change by Ofey Chan : -- keywords: +patch pull_requests: +29653 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/31529 ___ Python tracker ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
New submission from STINNER Victor : I propose to move the PyFrameObject structure to the internal C API. -- Between Python 3.10 and Python 3.11, the work on optimizing ceval.c modified deeply the PyFrameObject structure. Examples: * The f_code member has been removed by in bpo-44032 by th

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: By the way, Include/cpython/ceval.h uses the "struct _interpreter_frame*" type whereas this type is part of the internal C API: PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, struct _interpreter_frame *f, int exc); Maybe we should mo

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +29654 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31530 ___ Python tracker ___ _

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- ___ Python tracker ___ __

[issue44590] Create frame objects lazily when needed

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- nosy: +vstinner ___ Python tracker ___ __

[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- ___ Python tracker ___ __

[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- ___ Python tracker ___ __

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-40421 "[C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API". I added getter functions in recent Python versions: * PyFrame_GetBack(): Python 3.9 * PyFrame_GetCode(): Python 3.9 * PyFrame_GetLineNumbe

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-44800 "Code readability: rename InterpreterFrame to _Py_framedata". -- ___ Python tracker ___ __

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-45247: [C API] Add explicit support for Cython to the C API. -- ___ Python tracker ___ _

[issue45247] [C API] Add explicit support for Cython to the C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- ___ Python tracker ___ __

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I marked my PR as a draft since this change is an incompatible change. Even if PyFrameObject structure is excluded from the limited C API and not documented, it's used by a few projects. I plan to check how this change impacts these projects before merging t

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +Mark.Shannon, corona10, erlendaasland, petr.viktorin, scoder ___ Python tracker ___ ___ Python-

[issue45184] Add `pop` function to remove context manager from (Async)ExitStack

2022-02-23 Thread Andreas H.
Andreas H. added the comment: Inside the discussion an ExitPool class is sketched (https://mail.python.org/archives/list/python-id...@python.org/message/66W55FRCYMYF73TVMDMWDLVIZK4ZDHPD/), which provides this removal of context managers. What I learned is that this would have different clean

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also the bpo-39947: "[C API] Make the PyThreadState structure opaque (move it to the internal C API)". Recently, I also added helper functions: * PyThreadState_GetFrame(): Python 3.9 and limited C API version 3.10 * PyThreadState_GetID(): Python 3.9 and l

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: Serhiy is right, Condition.wait() has the following code: finally: # Must reacquire lock even if wait is cancelled cancelled = False while True: try: await self.acquire()

[issue46833] Installer Wizard is unclear and has redundant settings

2022-02-23 Thread Christian Buhtz
Christian Buhtz added the comment: Thank you very much for your quick replay and for taking my problems and thoughts into account. I have to dive deeper into the topic but still have some ideas how to re-design the wizard. IMHO the primary problem is that on the first page the decision betw

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-46836: "[C API] Move PyFrameObject to the internal C API". -- ___ Python tracker ___ __

[issue46813] Allow developer to resize the dictionary

2022-02-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm going to close this one. Making a new and previously rejected extension to one of Python's most import APIs requires broad discussion and buy-in. If you really want to push for this, please take it to the python-ideas list. -- resolution: -

[issue45107] Improve LOAD_METHOD specialization

2022-02-23 Thread Mark Shannon
Change by Mark Shannon : -- nosy: +Mark.Shannon nosy_count: 1.0 -> 2.0 pull_requests: +29655 pull_request: https://github.com/python/cpython/pull/31531 ___ Python tracker ___ _

[issue46771] Add some form of cancel scopes

2022-02-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: I have no good simple real-case scenario, sorry. There is a demonstration of my thoughts. Suppose we have a custom context manager that behaves similar to timeout() but is controlled not by timer but external event source (it could be an invalidation messa

[issue46806] Overlapping PYTHONPATH may cause import already imported module

2022-02-23 Thread Eric Snow
Eric Snow added the comment: FYI, a technical solution has been discussed before: bpo-13475 and PEP 395. However, that does not help so much if the default behavior isn't changed. That would require a PEP but I expect it would be rejected because so many scripts already rely on the current

[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-02-23 Thread Ofey Chan
Ofey Chan added the comment: I fix the problem. But sorry for my last message, because it totally miss the point ;) In `inspect.signature()`, the order of handle `follow_wrapper_chains` and `functools.partial` cause the problem. Relevant code: https://github.com/python/cpython/blob/288af84

[issue46835] ImportError: bad magic number in ... does not indicate where is that file located

2022-02-23 Thread Petr Viktorin
Petr Viktorin added the comment: I assume a PR review should be enough. -- components: +Library (Lib) -Interpreter Core ___ Python tracker ___

[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-02-23 Thread Ofey Chan
Change by Ofey Chan : Added file: https://bugs.python.org/file50639/update_wrapper.breaks.partial.signature.check.__wrapped__.py ___ Python tracker ___ ___

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29656 pull_request: https://github.com/python/cpython/pull/31532 ___ Python tracker ___ __

[issue46356] [C API] Enforce usage of PyFrame_GetBack()

2022-02-23 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue46754] Improve Python Language Reference based on [Köhl 2020]

2022-02-23 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue46736] Generate HTML 5 with SimpleHTTPRequestHandler.list_directory

2022-02-23 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue43311] bpo-43311: PyInterpreterState_New use thread-specific data tstate before key create .

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue46622] Add an async variant of lru_cache for coroutines.

2022-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that it would be simpler to add a decorator which wraps the result of an asynchronous function into an object which can be awaited more than once: def reawaitable(func): @wraps(func) def wrapper(*args, **kwargs): return CachedAwaitab

[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: But that example is made-up. Is there a real-world situation where you need to know the call site, and it wouldn't be obvious from other log messages? Directly cancelling a task without also somehow catching the cancellation (like in the timeout or task gr

[issue46833] Installer Wizard is unclear and has redundant settings

2022-02-23 Thread Christian Buhtz
Christian Buhtz added the comment: In the attachment you will find a PDF with variants A to D on each side. I tried to think into the design decisions made by the team who created the current installer. I am not sure of course but I tried to take this (assumed) decisions into account. Varian

[issue46736] Generate HTML 5 with SimpleHTTPRequestHandler.list_directory

2022-02-23 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +29657 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31533 ___ Python tracker ___

[issue46622] Add an async variant of lru_cache for coroutines.

2022-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: async_lru_cache() and async_cached_property() can be written using that decorator. The implementation of async_lru_cache() is complicated because the interface of lru_cache() is complicated. But it is simpler than using _lru_cache_wrapper(). def async_lru

[issue46771] Add some form of cancel scopes

2022-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: To make this cleanly interact with timeout, TaskGroup etc., the CancelOnEvent class should have a "did-I-cancel" flag which is set in the _cancel_on_event() callback. Then if that flag is set it should call .uncancel(), and if that returns a value > 0, it

[issue46829] Confusing CancelError message if multiple cancellations are scheduled

2022-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For reference, the msg parameter of Task.cancel() was added in issue31033. It seems that the initial use case was for debugging. I do not see how it differs from the following example: r = random.random() if r < 0.5: x = 0 else:

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > New changeset c0a5ebeb1239020f2ecc199053bb1a70d78841a1 by Kumar Aditya in > branch 'main': > bpo-46430: Intern strings in deep-frozen modules (GH-30683) This change introduced a memory leak at Python exit. Before: $ ./python -X showrefcount -c pass [0 re

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > This change introduced a memory leak at Python exit. It's regression related to bpo-1635741 which I fixed recently: https://mail.python.org/archives/list/python-...@python.org/thread/E4C6TDNVDPDNNP73HTGHN5W42LGAE22F/ --

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: _PyStaticCode_InternStrings() error handling is based on assert(): that's really bad. It can crash Python (exit with abort()) at the first memory allocation failure. Why not returning -1 on error? -- ___ Python tr

[issue46668] encodings: the "mbcs" alias doesn't work

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: commit ccbe8045faf6e63d36229ea4e1b9298572cda126 Author: Victor Stinner Date: Tue Feb 22 22:04:07 2022 +0100 bpo-46659: Fix the MBCS codec alias on Windows (GH-31218) -- resolution: -> fixed stage: patch review -> resolved status: open -> close

[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 9bbdde218005f552304d9954bb97e3f9185edded by Victor Stinner in branch 'main': bpo-45412: Add _PY_SHORT_FLOAT_REPR macro (GH-31171) https://github.com/python/cpython/commit/9bbdde218005f552304d9954bb97e3f9185edded -- ___

[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-46670: "Build Python with -Wundef: don't use undefined macros". -- ___ Python tracker ___ __

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread Petr Viktorin
Petr Viktorin added the comment: So, this will break Cython and gevent, but (unlike the optimization work that broke f_code/f_frame) it won't provide any value to users? I don't see how that's a good idea. -- ___ Python tracker

[issue46836] [C API] Move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: Petr Viktorin: > So, this will break Cython and gevent, This change doesn't break Cython and gevent: they are already broken. > but (unlike the optimization work that broke f_code/f_frame) it won't provide > any value to users? The problem is that the C AP

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Also Future.result() and Future.exception() can raise a CancelledError. So a CancelledError raised in a task may not contain a message passed to Task.cancel(). import asyncio import random async def main(): fut = asyncio.Future() fut.cancel()

[issue46837] lstrip and strip not working as expected

2022-02-23 Thread Jigar Gajjar
New submission from Jigar Gajjar : Code: my_string = 'Auth:AWS' print(my_string.lstrip('Auth:')) Actual Output: WS Excepted Output: AWS -- messages: 413831 nosy: jigar030 priority: normal severity: normal status: open title: lstrip and strip not working as expected type: behavior

[issue46837] lstrip and strip not working as expected

2022-02-23 Thread Jigar Gajjar
Change by Jigar Gajjar : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: Okay, let's change the error handling. @Kumar, can you handle that? @Victor, the refleak is unrelated to the error handling right? Presumably the leak is imaginary -- the deep-frozen interned strings should be accounted for somehow. @Kumar do you need help

[issue46835] ImportError: bad magic number in ... does not indicate where is that file located

2022-02-23 Thread Miro Hrončok
Change by Miro Hrončok : -- keywords: +patch pull_requests: +29658 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31534 ___ Python tracker ___

[issue46761] functools.update_wrapper breaks the signature of functools.partial objects

2022-02-23 Thread Larry Hastings
Larry Hastings added the comment: Ofey, I appreciate your enthusiasm, but you should probably slow down. Fixing the bug is probably going to be the easy part here. But we're not to that stage quite yet. First, we need to determine * why the code behaves like this--is this behavior a genui

[issue46771] Add some form of cancel scopes

2022-02-23 Thread Yves Duprat
Change by Yves Duprat : -- nosy: +yduprat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue46736] Generate HTML 5 with SimpleHTTPRequestHandler.list_directory

2022-02-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 0bb40a42d71873ea267aace8c92a02d66fe36dc2 by Dong-hee Na in branch 'main': closes bpo-46736: SimpleHTTPRequestHandler now uses HTML5. (GH-31533) https://github.com/python/cpython/commit/0bb40a42d71873ea267aace8c92a02d66fe36dc2 -- nos

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29659 pull_request: https://github.com/python/cpython/pull/31535 ___ Python tracker ___ __

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > The docs for PyFrame_GetCode say it's returning an "int". Oh. I missed your comment. I created GH-31535 to fix the return type in the documentation. -- ___ Python tracker

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-23 Thread Thomas Grainger
Thomas Grainger added the comment: there could be multiple messages here perhaps it could be: ``` finally: # Must reacquire lock even if wait is cancelled cancelled = [] while True: try: await self.acquire()

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > Presumably the leak is imaginary Well, you can check with your favorite memory debugger like Valgrind if you don't trust Python internal memory debugger :-) Not leaking memory at exit matters when Python is embedded in an application. I don't think that i

[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2022-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: We should really stop appending to a closed issue. Anyway, raising ExceptionGroup is backwards incompatible, since "except CancelledError" wouldn't cancel the group. -- ___ Python tracker

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: > Not leaking memory at exit matters when Python is embedded > in an application. Sure, but "leaks" caused by deep-freezing cannot be solved by freeing up the deep-frozen memory -- the solution must be to update the accounting somewhere. Where is the exist

[issue46771] Add some form of cancel scopes

2022-02-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: Clear, thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue46771] Add some form of cancel scopes

2022-02-23 Thread Guido van Rossum
Guido van Rossum added the comment: I will now merge GH-31513 (cancel counts). Once that's in you can merge main into your timeout PR (GH-31394) and then that can land soon (I'd like to review it once more). -- ___ Python tracker

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: Ned Batchelder: > I went ahead and changed the coverage.py code to this: (...) I proposed a coverage PR using PyObject_GetAttrString(frame, "f_lasti") which should works on all Python versions: https://github.com/nedbat/coveragepy/pull/1331 -- _

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29660 pull_request: https://github.com/python/cpython/pull/31536 ___ Python tracker ___ __

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: Mark Shannon: > The only purpose of `f_lasti` is to get the line number and that can be done > directly via `PyFrame_GetLineNumber(PyFrameObject *frame)` I found the uwsgi project on PyPI which uses f_lasti with PyCode_Addr2Line(). I wrote GH-31536 to sugges

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > I found the uwsgi project on PyPI which uses f_lasti with PyCode_Addr2Line(). Oh, plugins/python/profiler.c uses that to define PyFrame_GetLineNumber() on Python older than 2.7, Python 3.0 and Python 3.1. In 2022, it's no longer relevant. But well, there

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +29661 pull_request: https://github.com/python/cpython/pull/31537 ___ Python tracker _

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 78859e58e4e016286e648d1dc155e0f6cebfa6ff by Victor Stinner in branch 'main': bpo-40421: Fix PyFrame_GetCode() documentation (GH-31535) https://github.com/python/cpython/commit/78859e58e4e016286e648d1dc155e0f6cebfa6ff -- __

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread miss-islington
Change by miss-islington : -- pull_requests: +29662 pull_request: https://github.com/python/cpython/pull/31538 ___ Python tracker ___ __

[issue44337] Port LOAD_ATTR to adaptive interpreter

2022-02-23 Thread Brandt Bucher
Brandt Bucher added the comment: New changeset 281ea9c39146a00cdf3fa2b3d0be60e2a39278ce by Brandt Bucher in branch 'main': bpo-44337: Shrink the LOAD_ATTR/STORE_ATTR caches (GH-31517) https://github.com/python/cpython/commit/281ea9c39146a00cdf3fa2b3d0be60e2a39278ce -- _

[issue46430] intern strings in deepfrozen modules

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: > Sure, but "leaks" caused by deep-freezing cannot be solved by freeing up the > deep-frozen memory -- the solution must be to update the accounting somewhere. Python allocates memory (ex: with PyObject_Malloc()) which is not released at exit. Two examples f

[issue46754] Improve Python Language Reference based on [Köhl 2020]

2022-02-23 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue45107] Improve LOAD_METHOD specialization

2022-02-23 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue46823] Add LOAD_FAST__LOAD_ATTR_INSTACE_VALUE combined opcode

2022-02-23 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread miss-islington
miss-islington added the comment: New changeset b0de6299a840a397d4fe3e6c98159d9f258d3295 by Miss Islington (bot) in branch '3.10': bpo-40421: Fix PyFrame_GetCode() documentation (GH-31535) https://github.com/python/cpython/commit/b0de6299a840a397d4fe3e6c98159d9f258d3295 --

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread miss-islington
miss-islington added the comment: New changeset 763e23e11e785162f9d68f83539404af8e863748 by Miss Islington (bot) in branch '3.9': bpo-40421: Fix PyFrame_GetCode() documentation (GH-31535) https://github.com/python/cpython/commit/763e23e11e785162f9d68f83539404af8e863748 -- _

[issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API

2022-02-23 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8a716bc62c8205bb9deeda17422b7e69204b6897 by Victor Stinner in branch 'main': bpo-40421: What's New in Python 3.11: PyFrameObject.f_lasti (GH-31536) https://github.com/python/cpython/commit/8a716bc62c8205bb9deeda17422b7e69204b6897 -- _

[issue45459] Limited API support for Py_buffer

2022-02-23 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29663 pull_request: https://github.com/python/cpython/pull/31539 ___ Python tracker ___ __

  1   2   >