GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PEP-657 enhanced error locations in pytest tracebacks · Issue #10224 · pytest-dev/pytest

PEP-657 enhanced error locations in pytest tracebacks #10224

New issue
Copy link
New issue
Copy link
Open
Open
PEP-657 enhanced error locations in pytest tracebacks#10224
Copy link
Labels
status: help wanteddevelopers would like help from experts on this topictopic: tracebacksrelated to displaying and handling of tracebackstype: enhancementnew feature or API change, should be merged into features branch

Description

@davidszotten
davidszotten
opened on Aug 16, 2022
Issue body actions

Hi. Are there any plans to support PEP-657 style enhanced tracebacks when on py 3.11? with some pointers i'd be happy to look at implemetation

Activity

  1. nicoddemus commented on Aug 16, 2022

    @nicoddemus
    nicoddemus
    on Aug 16, 2022
    Member
    More actions

    Hi @davidszotten,

    There's #10209 open to at least fall back to native traceback printing temporarily, #9159 tracks the full support.

  2. davidszotten commented on Aug 16, 2022

    @davidszotten
    davidszotten
    on Aug 16, 2022
    ContributorAuthor
    More actions

    hi @nicoddemus , thanks for the quick reply. just to be clear, i'm talking about

    https://docs.python.org/3.11/whatsnew/3.11.html#enhanced-error-locations-in-tracebacks

    Traceback (most recent call last):
      File "distance.py", line 11, in <module>
        print(manhattan_distance(p1, p2))
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "distance.py", line 6, in manhattan_distance
        return abs(point_1.x - point_2.x) + abs(point_1.y - point_2.y)
                               ^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'x'
    

    not exception groups. or are the two tied together?

  3. nicoddemus commented on Aug 16, 2022

    @nicoddemus
    nicoddemus
    on Aug 16, 2022
    Member
    More actions

    🤦 Sorry indeed they are not related, sorry for the confusion.

    I don't think we have any plans regarding that (a quick search did not turn out much), but this is something we should definitely look into.

  4. nicoddemus commented on Aug 16, 2022

    @nicoddemus
    nicoddemus
    on Aug 16, 2022
    Member
    More actions

    Btw you asked for pointers: the traceback printing code starts in ExceptionRepr.toterminal, it should be possible to figure out/understand the code from there.

  5. Zac-HD
    changed the title [-]PEP-657 enhanced tracebacks[/-] [+]PEP-657 enhanced error locations in Pytest tracebacks[/+] on Aug 17, 2022
  6. Zac-HD
    added
    type: enhancementnew feature or API change, should be merged into features branch
    topic: tracebacksrelated to displaying and handling of tracebacks
    on Aug 17, 2022
  7. Zac-HD commented on Aug 17, 2022

    @Zac-HD
    Zac-HD
    on Aug 17, 2022
    Member
    More actions

    You can of course get the native representation with pytest --tb=native, but it would indeed be good to support the more precise locations in long, short, and auto modes too 🙂

    Reacted by Thibaut Decombe
  8. nicoddemus
    changed the title [-]PEP-657 enhanced error locations in Pytest tracebacks[/-] [+]PEP-657 enhanced error locations in pytest tracebacks[/+] on Aug 17, 2022
  9. bluetech
    added
    status: help wanteddevelopers would like help from experts on this topic
    on Jan 4, 2024
  10. ammaraskar commented on Jan 4, 2025

    @ammaraskar
    ammaraskar
    on Jan 4, 2025
    Contributor
    More actions

    Made a draft pull request with a proof of concept implementation #13102

    There's a few issues that need to be ironed out that I pointed out in there if anyone feels like driving it to completion.

  11. luketainton
    added a commit that references this issue on Jan 5, 2026

    chore(deps): update dependency pytest to v9 (#305)

    4b75154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: help wanteddevelopers would like help from experts on this topictopic: tracebacksrelated to displaying and handling of tracebackstype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.