Skip to content

v6.13.5

Latest

Choose a tag to compare

@wallneradam wallneradam released this 14 Nov 11:31
· 6 commits to main since this release

Features

  • Python 3.15 support: the import hook accepts the fullname argument Python 3.15 passes to source_to_code, the Edge gate finds a lambda under its 3.15 symbol-table name, and the Python name tables include the 3.15 builtins and standard library modules. The native transform reads the 3.15 AST (is_lazy on imports, an optional DictComp.value). Wheels are built for cp315 as well.

Fixes

  • History in an else if condition (#118): a history reference in an else if condition (and in a later switch case, which compiles to the same chain) now advances on every bar the if statement runs, as on TradingView. It used to advance only on the bars that reached the condition. An if nested inside an else block keeps its gaps, as on TradingView.
  • History of arrays, matrices and maps (#118): a[1] of an array, matrix or map is now the object as it was when the previous bar closed, a shallow copy whose elements stay shared, as on TradingView. It used to be the live object, already holding the current bar's changes. This also holds for a history read of a function result (f()[1]) and inside functions called with a collection in some places and a scalar in others. The history of a user-defined object stays a reference.
  • Fields of an na object (#118): reading or writing a field of an na user-defined object or chart.point, and copying one, now stops the script with NaFieldError, as on TradingView. This covers a field read through a method, a nested field, na(t.v), an array.new<T>(1) element and an object history before its first bar. PyneCore used to answer na (and a write raised a raw AttributeError). A method called on the na itself still runs, and an na drawing still answers na through its getters. A field named type no longer collides with the na's own type.
  • ta.highest / ta.lowest with a non-positive length (#118): they and their bars forms now stop the script on a zero or negative length, also when the length is a series, like every other ta builtin and like TradingView. They used to return the source value.
  • Comparing infinities (#117): == and != are false whenever an operand is infinite, and two infinities of the same sign are neither equal nor ordered, as on TradingView; an infinity still orders against a finite value. array.indexof and array.includes no longer find an infinity.
  • request.security tuples unpacked into fewer names (#114): [a, b] = request.security(...) reading a three-value tuple now takes the first two values, also when the read is another function's return and for request.security_lower_tf. It used to raise "too many values to unpack". A tuple-valued lower-timeframe read in a function's return is now transposed into columns.
  • request.security tuple read through a function: a read whose expression calls a tuple-returning function, with the security call in another function's return, now defaults to one na per element. Unpacking it raised "na is not iterable" before the first higher-timeframe bar closed.
  • request.security with a gaps mode in a variable: a gaps value chosen at runtime (gapout = gap ? barmerge.gaps_on : barmerge.gaps_off) no longer raises NameError when the script loads; the mode is applied when the context first signals.
  • Live plots after a missing bar close: when a live bar opened before the previous one closed, the leftover plot ids made the new bar's plots appear as new plots ("Plot 1"). They are cleared at the bar open now.
  • Lib registry across machines: the generated lib_types.json no longer records routes for standard-library callables, whose route depended on how the interpreter was built.

Performance

  • Native transform data: the native transform no longer embeds and parses its JSON data files at run time; a build script compiles them in as static tables.

Project

  • A contributing guide and a pull request template state the rules for issues and pull requests: one problem per issue, one fix per PR, a failing repro and a test. A daily job flags and later closes pull requests that no longer merge into main. Issues must be opened from the issue forms; issues created without one are closed automatically.