Skip to content

TypedPython: replace '# typedpython: parallel' comment with @compiled(parallel=True) #358

Closed

Description

@b-re-w

Per maintainer decision (2026-10-30), @compiled is the only compilation mark. Replace the # typedpython: parallel comment marker for SPEC N-15 parallel loops with @compiled(parallel=True) and remove all comment-marker recognition (PARALLEL_MARKER, _parallel_marked).

Scope:

  • Update docs/SPEC.md (L-8, N-8, N-15) and docs/design/typedpython-parallel-loops.md (decision 5).
  • Make builtins.compiled (.pth shim, Python3.installBuiltinCompiled in python-multiplatform, __builtins__.pyi stub, __main__.py, and test COMPILED_SHIM) accept both @compiled (compiled(f)) and @compiled(**opts) (compiled(**opts)(f)), aligning with the @compiled(fastmath=True) shape (TypedPython: per-function fastmath opt-in (@compiled(fastmath=True)), not CPython-identical #332).
  • Update typedpython/frontend.py to recognise @compiled and @compiled(parallel=True) / @compiled(parallel=False), reject unknown or non-literal arguments with a clear skip reason, and drop # typedpython: parallel comment parsing.
  • Convert tests (test_parallel_loops.py, test_builtin_compiled.py, test_frontend.py, BuiltinCompiledTest.kt) and benchmark helpers.

Done when: test_builtin_compiled.py, test_frontend.py, test_parallel_loops.py, :python-multiplatform:desktopTest --tests python.multiplatform.ffi.BuiltinCompiledTest, and the TypedPython suite pass.

Activity

  1. added a commit that references this issue on Oct 31, 2026
  2. b-re-w commented on Oct 31, 2026

    @b-re-w
    MemberAuthor

    Landed in develop via #359

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions