Roadmap

The compiler core is in place. The next phase is breadth and definition: more of the standard library, and a strict mode developed into a fully realized dialect of Python.

Foundation

What is already in place: a Python 3 compiler that matches CPython on a real benchmark corpus.

Python 3, on its own parser done

  • Python 2.7 → 3 migration of grammar, AST and builtin library
  • DParser grammar replaces the dependency on CPython’s parser

The modern language done

  • Exceptions with CPython’s built-in hierarchy
  • Generators, yield from, send(); async/await
  • match/case, every PEP 634 pattern kind
  • Packages and relative imports

Two backends and a corpus done

  • LLVM backend with JIT and REPL alongside the C backend
  • 76 of 77 shedskin programs compile and run; every comparable one but one matches CPython
  • Demand-driven contour splitting, from minimum contours
  • pyc -x: #! scripts with a content-hashed compile cache

Language completeness

Close the remaining gaps in the Python 3 subset that can be typed statically.

Calls and properties next

  • **kwargs and keyword-only parameters (issues/182)
  • Property setters and deleters (issues/007)
  • Attribute access through cls in @classmethod (issues/184)

Numbers planned

  • complex
  • Integer overflow handled explicitly: trapped, or widened where the program demands it

The whole corpus, statically resolved planned

  • othello3 within the compile budget
  • Zero run-time dispatch: every call resolved statically

Libraries

Grow pyc_lib from 22 modules toward the part of the standard library real programs use.

Finish the modules that exist next

  • itertools: chain, islice, permutations, combinations, groupby, accumulate
  • functools: partial, lru_cache, cmp_to_key, total_ordering
  • collections: Counter, OrderedDict, namedtuple
  • re: findall, finditer, sub, split, named groups

The modern idioms planned

  • dataclasses
  • enum
  • typing (accepted, and checked under --strict)
  • bisect

Applications planned

  • json, pathlib
  • asyncio front end over pyc’s event loop
  • statistics, fractions, decimal
  • unittest, so the same tests run compiled and under CPython

Strict dialect

Turn --strict from a compiler mode into a specified, stable language.

The guarantee done

  • CPython semantics or a compile error
  • Every accommodation flagged, warned and off under --strict (issues/171)
  • Strict suite and strict corpus sweep checked against CPython

The definition next

  • A written specification of representable types and refusal rules
  • Diagnostics that point at the confluence and suggest the fix
  • The test suite and corpus published as a conformance suite

The language planned

  • Checked annotations
  • The whole standard library compiling under --strict
  • A stability promise: accepted once, accepted with the same output after

Tooling and distribution

Make pyc easy to get, and use what it knows about your program in your editor.

Getting pyc planned

  • Versioned releases
  • Binary packages for Linux and macOS
  • A container image

Working with pyc planned

  • A language server: inferred types on hover, refusals as live diagnostics
  • An online playground on pyc-lang.org

Detailed work items, with symptoms, root causes and verification plans, live in the repository's issues/ and ifa/issues/ directories. To help, see Community.