Skip to content

project inspect: pin one TOML 1.0 parser to match Lake across Python versions #80

Closed

Description

@Deicyde

Problem

project inspect uses tomllib on Python 3.11+ and tomli on Python 3.10. The lock currently resolves the fallback to tomli 2.4.1, which accepts TOML 1.1 syntax, while Lake 4.32.2 accepts TOML 1.0.

For example, with an otherwise catalog-matching project:

leanOptions = { autoImplicit = false, }
  • Python 3.10.20 + tomli 2.4.1 reports supported, ok: true.
  • Python 3.13.14 reports indeterminate with invalid-lakefile-toml.
  • Lake 4.32.2 rejects the file.

Multiline inline tables and the TOML 1.1 \e and \xHH escapes produce the same split. PR #79 still reproduces it.

Impact

The same project receives different machine-readable status and exit behavior on supported Python versions. Lake still fails when invoked, but inspection violates its documented rule that invalid project files make the result indeterminate.

Acceptance criteria

  • Use one TOML 1.0 parser on every supported Python version; tomli>=2.3.1,<2.4 is the current compatible range.
  • Use that parser consistently in project inspection and skeleton Lake-TOML parsing.
  • Regenerate the lock and update installed-wheel dependency assertions.
  • Test the trailing comma, multiline inline table, \e, and \xHH cases on both CI Python versions.

This should be folded into the project-inspection hardening work in #79.

Activity

  1. changed the title [-]project inspect: the TOML grammar depends on the Python version, so 3.10 reports supported for a lakefile.toml Lake rejects[/-] [+]project inspect: pin one TOML 1.0 parser to match Lake across Python versions[/+] on Oct 3, 2026
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions