Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: juliandolby/jython3
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: ponder-lab/jython3
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 16 commits
  • 16 files changed
  • 4 contributors

Commits on May 22, 2023

  1. Configuration menu
    Copy the full SHA
    dee508b View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2023

  1. Changing grammar for decorators that don't have parenthesis

    Tatiana Castro-Vélez committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    ce7c78d View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. Merge pull request jython#1 from tatianacv/master

    Changing grammar for decorators that don't have parenthesis
    khatchad authored Aug 15, 2023
    Configuration menu
    Copy the full SHA
    05365a7 View commit details
    Browse the repository at this point in the history
  2. Revert "Progress towards f-string processing."

    This reverts commit dee508b.
    Tatiana Castro-Vélez committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    3e06a60 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2025

  1. Upgrade Guava to 33.4.8-jre.

    khatchad committed Jun 30, 2025
    Configuration menu
    Copy the full SHA
    d2028be View commit details
    Browse the repository at this point in the history
  2. Fix compilation errors.

    khatchad committed Jun 30, 2025
    Configuration menu
    Copy the full SHA
    580ea6b View commit details
    Browse the repository at this point in the history

Commits on May 27, 2026

  1. Compile tests/java to a separate test-classes directory.

    Test fixtures (e.g. `ProxyDeserialization.class` at the default package)
    were previously compiled into `${compile.dir}` and bundled into
    `${jython.dev.jar}`, breaking downstream OSGi bundle wrapping in
    consumers that pull `jython3` as a transitive Maven dependency.
    See wala/ML#557.
    
    Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
    khatchad and claude committed May 27, 2026
    Configuration menu
    Copy the full SHA
    6609474 View commit details
    Browse the repository at this point in the history
  2. Merge pull request jython#2 from ponder-lab/fix-557-test-class-leak

    Compile `tests/java` to a separate `test-classes` directory
    khatchad authored May 27, 2026
    Configuration menu
    Copy the full SHA
    b81600d View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2026

  1. Support PEP-526 variable annotations (AnnAssign).

    The grammar parsed an annotated assignment `name: type [= value]` as either a
    plain `Assign` (dropping the annotation) or, for the annotation-only form, as a
    bare `Expr` holding just the annotation expression with the target name thrown
    away. There was no `AnnAssign` AST node at all (only function-argument
    annotations, PEP-3107, were modeled).
    
    Add the `AnnAssign(expr target, expr annotation, expr? value, int simple)` node
    to the ASDL and the generated AST (via `asdl_antlr.py`), register it in the
    visitor interface/base and `AstModule`, and rewrite the `expr_stmt` annotation
    branch to build an `AnnAssign` that retains the target, annotation, and optional
    value. This lets downstream consumers recover annotated class fields (notably
    `NamedTuple`/dataclass declarations) and their declaration order.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    khatchad and claude committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    330703b View commit details
    Browse the repository at this point in the history
  2. Refine the AnnAssign grammar: simple flag, yield RHS, target check.

    Address review on the PEP-526 `expr_stmt` branch:
    - Compute `simple` from the target (1 for a bare `Name`, else 0) instead of
      hard-coding 1.
    - Restore `yield_expr` on the right-hand side (`x: int = yield y`), which the
      prior assignment branch accepted and the first cut dropped.
    - Validate the target via a new `GrammarActions.checkAnnAssign`: a single
      `Name`/`Attribute`/`Subscript` may be annotated; tuple, list, and starred
      targets are rejected, matching CPython.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    khatchad and claude committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    a2ab0c5 View commit details
    Browse the repository at this point in the history
  3. Accept a Python int in AstAdapters.py2int.

    `py2int` returned null for anything but a Java `Integer`, so constructing an AST
    node from Python with an integer field (`AnnAssign.simple`, `ImportFrom.level`,
    `FormattedValue.conversion`) silently stored null and threw a
    `NullPointerException` on read via unboxing. Accept a `PyObject` integer (via
    `asInt()`); `None` and other non-integer objects still map to null.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    khatchad and claude committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    76a5468 View commit details
    Browse the repository at this point in the history
  4. Parse the AnnAssign annotation in Load context; distinct list error.

    Two review follow-ups:
    - The annotation expression was parsed with a null context, so its `Name` nodes
      had no `ctx`. Now that the annotation is preserved (rather than dropped),
      parse it in `Load` context so annotation names read as references rather than
      being treated as bound.
    - `checkAnnAssign` reported "not tuple" for an AST `List` target; give a distinct
      "not list" message, matching CPython.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    khatchad and claude committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    3ef7871 View commit details
    Browse the repository at this point in the history
  5. Make py2int leniency explicit via integer type checks.

    The asInt-based version threw `TypeError` for non-integer objects rather than
    mapping them to null, so the comment was inaccurate. Convert only `PyInteger`/
    `PyLong` (the Python int types) and map everything else — including `None` and
    non-integer objects — to null, matching the prior lenient contract.
    khatchad committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    1e99589 View commit details
    Browse the repository at this point in the history
  6. Compile AnnAssign to bytecode in CodeCompiler.

    Now that the parser emits `AnnAssign`, the bytecode compiler needs a
    `visitAnnAssign`: without it the node fell through to `VisitorBase`'s
    unhandled-and-traverse default, which walks the `Store` target and emits
    incorrect bytecode, and `x: T = v` no longer performed its assignment.
    
    Emit the assignment when a value is present (evaluate the value, store to the
    target, mirroring `visitAssign`); an annotation-only `x: T` binds nothing. The
    annotation is not evaluated and `__annotations__` is not updated, consistent
    with this compiler's existing limited annotation support. `ScopesCompiler`/
    `ArgListCompiler` need no change: they don't override `visitAssign` and record
    bindings via `visitName` during the default traversal, which handles `AnnAssign`
    the same way (the annotation parses in Load context, so it isn't mis-bound).
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    khatchad and claude committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    0ca77b6 View commit details
    Browse the repository at this point in the history
  7. Reject all non-storeable annotation targets in checkAnnAssign.

    Previously `checkAnnAssign` only flagged tuple, list, and starred targets.
    `checkGenericAssign` covers numbers, strings, calls, operators, and
    comprehensions, but not dict/set literals or `True`/`False`, so those built an
    `AnnAssign` with a non-storeable target that broke later at
    `CodeCompiler.visitAnnAssign`'s `set(target)`. Replace the trailing
    target-specific checks with a positive allow-list of `Name`/`Attribute`/`Subscript`,
    matching CPython's "illegal target for annotation".
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    khatchad and claude committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    c4a8458 View commit details
    Browse the repository at this point in the history
  8. Merge pull request jython#3 from ponder-lab/pep526-annassign

    Support PEP-526 variable annotations (`AnnAssign`)
    khatchad authored Jun 17, 2026
    Configuration menu
    Copy the full SHA
    e435950 View commit details
    Browse the repository at this point in the history
Loading