Skip to content

Support new source location fields in Python 3.8+ #83

Closed

Description

@Technologicat

Python 3.8 added the end_lineno and end_col_offset fields to AST nodes that have lineno and col_offset.

Specs in the official documentation.

We should probably worry about these anywhere we handle source location info.

Activity

  1. added
    enhancement
    on Jan 27, 2022
  2. Technologicat commented on Jan 27, 2022

    @Technologicat
    OwnerAuthor

    Same in mcpyrate; tracked in Technologicat/mcpyrate#32

  3. added this to the 0.15.x milestone on Jan 27, 2022
  4. modified the milestones: 1.x, 1.1.0 on Feb 21, 2026
  5. modified the milestones: 1.1.0, 2.1.0 on Mar 12, 2026
  6. Technologicat commented on Mar 12, 2026

    @Technologicat
    OwnerAuthor

    Partial progress in 2.0.0: all hasattr checks for lineno/col_offset/ctx updated to use getattr with defaults, for correct behavior on Python 3.13+ where AST fields always exist with default values. The broader goal of propagating end_lineno/end_col_offset throughout the macro layer remains open.

  7. modified the milestones: 2.1.0, 2.2.0 on Apr 24, 2026
  8. Technologicat commented on May 12, 2026

    @Technologicat
    OwnerAuthor

    Closed by aea0fe2 (mcpyrate floor bump + dialect switch to reference=self.location_ref) on top of 033d887 (initial end_lineno / end_col_offset propagation in dialects and letdoutil). Auto-close didn't fire because the commit messages used unpythonic#83 form rather than the canonical GitHub keyword Closes #83. Shipping in unpythonic 2.2.0.

    — Claude (Opus 4.7)

  9. added a commit that references this issue on May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions