Skip to content

fix(func): SUPERTREND's outputs are supertrend and trend - #764

Merged
mario4tier merged 1 commit into
devfrom
fix/supertrend-output-names
Sep 14, 2026
Merged

mario4tier merged 1 commit into
devfrom
fix/supertrend-output-names

Conversation

@mario4tier

Copy link
Copy Markdown
Member

TA-Lib C 0.8.1 released SUPERTREND with outputs outSupertrend and outTrend. _func.pxi was generated against a pre-release C that still called them outReal and outInteger, so v0.8.0 shows the old names in two places:

>>> help(talib.SUPERTREND)          # and abstract.pyi
    Outputs:
        real
        integer
>>> abstract.Function('SUPERTREND').output_names
['supertrend', 'trend']             # runtime metadata, already correct

Change

  • _func.pxi: regenerated with tools/generate_func.py against the released 0.8.1 header. This changes only SUPERTREND, in its docstring and local variable names.
  • abstract.pyi: regenerated with tools/generate_abstract_stub.py. It reads the compiled docstring, so it follows _func.pxi.
  • _ta_lib.pxd: the only hand edit. The TA_SUPERTREND declaration now uses the header's parameter names.
  • _ta_lib.c: regenerated with Cython 3.3.0 and numpy 2.2.0, the pair that reproduces v0.8.0's _ta_lib.c byte for byte. The diff is the renamed identifiers and the compressed docstring tables.
  • CHANGELOG: one [FIX] line under 0.8.1.

Return values, dtypes and argument order are unchanged.

Checks

Built against TA-Lib C v0.8.1 compiled from the v0.8.1 tag:

  • pytest tests/: 1696 passed.
  • help(talib.SUPERTREND) lists supertrend and trend; talib.SUPERTREND(h, l, c) still returns (float64, int32).
  • Regenerating _stream.pxi and stream.pyi produces no diff.
  • All 406 declarations shared by _ta_lib.pxd and the 0.8.1 ta_func.h were compared by parameter name. TA_SUPERTREND was the only real mismatch; the others differ only in () vs (void) spelling.

https://claude.ai/code/session_01TuVjx2Q5urdmwi5opzfCp8

TA-Lib C 0.8.1 released SUPERTREND with outputs outSupertrend and outTrend.
_func.pxi was generated against a pre-release C that still called them
outReal and outInteger, so help(talib.SUPERTREND) and the abstract stub
listed "real" and "integer", while abstract.Function('SUPERTREND').output_names
already reported the released names at runtime.

_ta_lib.pxd now declares the header's parameter names, and _func.pxi,
abstract.pyi and _ta_lib.c are regenerated against the released 0.8.1
header. Return values, dtypes and argument order do not change.

Claude-Session: https://claude.ai/code/session_01TuVjx2Q5urdmwi5opzfCp8
@mario4tier
mario4tier merged commit 1d30499 into dev Sep 14, 2026
6 checks passed
@mario4tier
mario4tier deleted the fix/supertrend-output-names branch September 15, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant