[issue38535] Incorrect col_offset for decorators with zero arguments (empty parentheses)

2019-10-20 Thread Alex Hall
New submission from Alex Hall : In a decorator such as `@a()`, the ast.Call node has a col_offset starting from the @ symbol. This doesn't happen for decorators without arguments (e.g. `@a`) or with some arguments (e.g. `@a(x)`). -- components: Interpreter Core files

[issue38535] Incorrect col_offset for decorators with zero arguments (empty parentheses)

2019-10-20 Thread Alex Hall
Alex Hall added the comment: I assume this also happens on 3.9, it's just a bit hard for me to test that now. -- ___ Python tracker <https://bugs.python.org/issue38

[issue39810] Generic script for finding bugs in get_source_segment

2020-03-01 Thread Alex Hall
New submission from Alex Hall : Attached is a script which: - Gets all the source code it can find from sys.modules - Looks at every node in the parsed source - Gets source text for that node using ast.get_source_segment - Parses the source text again - Compares the original node

[issue39816] More descriptive error message than "too many values to unpack"

2020-03-01 Thread Alex Hall
New submission from Alex Hall : Based on the discussion in https://mail.python.org/archives/list/python-id...@python.org/thread/C6QEAEEAELUHMLB23OBRSQK2UYU3AF5O/ When unpacking fails with an error such as: ValueError: too many values to unpack (expected 2) the name of the type

[issue33997] multiprocessing Pool hangs in terminate()

2020-01-27 Thread Alex Hall
Alex Hall added the comment: I'm also experiencing hanging on terminate. I haven't made a debug build or anything but it's happening to me consistently on 3.8, although I haven't managed to create a small example to reproduce. Replacing pool.py with https://raw.githubusercontent.com/python

[issue33997] multiprocessing Pool hangs in terminate()

2020-01-27 Thread Alex Hall
Alex Hall added the comment: Sorry, I should have looked around more, I think my problem is https://bugs.python.org/issue22393 -- ___ Python tracker <https://bugs.python.org/issue33

[issue13672] Add co_qualname attribute in code objects

2020-02-19 Thread Alex Hall
Alex Hall added the comment: I think this would be very useful in tracebacks. If a traceback line had a more useful name like `MyClass.__init__` instead of just `__init__` or `my_decorator..wrapper` instead of just `wrapper` it would provide useful context to the frame. -- nosy

[issue39316] settrace skips lines when chaining methods without arguments

2020-01-12 Thread Alex Hall
New submission from Alex Hall : When stepping through a multiline expression like this: ``` print(slug .replace("_", " ") .title() .upper() .replace("a", "b") .lower() .replace("The ", "the ")) ```

[issue41614] Items put on Queue in thread in child process sometimes not seen by parent process

2020-08-22 Thread Alex Hall
New submission from Alex Hall : See attached file. The summary is that I start a Process, which starts a Thread, which puts some values on a Queue which was originally created by the parent process and passed down. Usually this works but occasionally the parent process doesn't see the items

[issue44393] segfault with sys.setrecursionlimit

2021-06-11 Thread Alex Hall
New submission from Alex Hall : Found on: Python 3.9.5 GCC 11.1 on Linux (x86_64) Reproduced on: Python 3.9.5 Clang 9.0.8 Linux (arm) When setting the recursion limit to a high enough amount, trying to reach that recursion limit ends in a segmentation fault (stack overflow?) code: ```py

[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Alex Hall
Alex Hall added the comment: (meant to say "so I'm pulling in @Mark.Shannon) -- ___ Python tracker <https://bugs.python.org/issue44576> ___ ___ Pytho

[issue44576] AttributeError: incorrect line identified in Python 3.10

2021-07-07 Thread Alex Hall
Alex Hall added the comment: I believe this is the outcome of https://bugs.python.org/issue39316 which I filed, so I'm pulling in . Naturally I think the new behaviour is not a bug but a feature. I think it's more important for the traceback to show the attribute access (`two`) than

[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 <https://bugs.python.

[issue39316] settrace skips lines when chaining methods without arguments

2021-03-14 Thread Alex Hall
Change by Alex Hall : -- nosy: +Mark.Shannon ___ Python tracker <https://bugs.python.org/issue39316> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39316] settrace skips lines when chaining methods without arguments

2021-03-14 Thread Alex Hall
Alex Hall added the comment: I just came across https://www.python.org/dev/peps/pep-0626/, seems like this would need to be fixed to satisfy the PEP, but on the latest CPython it's not: ``` ➜ ~ python3.10 ~/Downloads/trace_skipping_lines_bug.py 14 slug = "doing_the_thing" 15 pri

[issue45108] frame.f_lasti points at DICT_MERGE instead of CALL_FUNCTION_EX in Windows only

2021-09-05 Thread Alex Hall
New submission from Alex Hall : In this script: import inspect import dis def foo(**_): frame = inspect.currentframe().f_back print(frame.f_lasti) dis.dis(frame.f_code) d = {'a': 1, 'b': 2} foo(**d) dis shows these instructions for `foo