Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 1, 2025

This PR removes backward compatibility and restructures the package to use pandas_ta_classic as the Python package name, aligning with the PyPI package name pandas-ta-classic.

Key Changes

Package Structure

  • Renamed Python package from pandas_ta to pandas_ta_classic
  • Updated setup.py to use new package structure (pandas_ta_classic.* modules)
  • Removed backward compatibility - old import syntax no longer works

Import Syntax Change

  • New required import: import pandas_ta_classic as ta
  • Old import (no longer works): import pandas_ta as ta
  • PyPI package name remains pandas-ta-classic

Updated Documentation

  • All README examples now use import pandas_ta_classic as ta
  • GitHub issue templates updated with new import syntax
  • Examples and custom indicator documentation updated
  • Installation command remains: pip install pandas-ta-classic

Breaking Change

This is a breaking change that requires users to update their import statements:

# Before (no longer works)
import pandas_ta as ta

# After (required)
import pandas_ta_classic as ta

# Usage remains the same
df.ta.sma(length=20)
ta.rsi(df.close)

Validation

  • ✅ Package installs successfully as pandas-ta-classic
  • ✅ New import syntax import pandas_ta_classic as ta works correctly
  • ✅ Old import syntax fails as expected (no backward compatibility)
  • ✅ Core functionality (SMA, RSI, MACD, DataFrame extension) works properly
  • ✅ All internal package imports updated and functional

This change establishes a clear naming convention where both the PyPI package name and Python package name use the pandas-ta-classic identifier.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits August 1, 2025 10:36
Co-authored-by: xgboosted <1528712+xgboosted@users.noreply.github.com>
Co-authored-by: xgboosted <1528712+xgboosted@users.noreply.github.com>
Copilot AI changed the title [WIP] Project Planning: pandas-ta-classic Rebranding and OSS Maintenance Complete pandas-ta to pandas-ta-classic rebranding Aug 1, 2025
Copilot AI requested a review from xgboosted August 1, 2025 10:39
Copilot finished work on behalf of xgboosted August 1, 2025 10:39
@xgboosted
Copy link
Owner

@copilot

No need for backward compatibility: import pandas_ta_classic as ta

Change PyPI package name from pandas_ta to pandas_ta_classic

…ta_classic

Co-authored-by: xgboosted <1528712+xgboosted@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 1, 2025

@copilot

No need for backward compatibility: import pandas_ta_classic as ta
...

✅ Implemented: Removed backward compatibility and changed package structure.

Changes made (commit 2c3c561):

  • Renamed pandas_ta directory to pandas_ta_classic
  • Updated PyPI package name remains pandas-ta-classic
  • Users now must import as: import pandas_ta_classic as ta
  • Old import syntax import pandas_ta as ta no longer works
  • Updated all documentation, examples, and issue templates

Verified working:

  • Package installs as pandas-ta-classic
  • Import pandas_ta_classic as ta works correctly
  • Core indicators (SMA, RSI, MACD) function properly
  • DataFrame extension works as expected

Copilot AI changed the title Complete pandas-ta to pandas-ta-classic rebranding Remove backward compatibility and change package structure to pandas_ta_classic Aug 1, 2025
Copilot finished work on behalf of xgboosted August 1, 2025 11:07
@xgboosted xgboosted marked this pull request as ready for review August 1, 2025 11:08
Copilot AI review requested due to automatic review settings August 1, 2025 11:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a breaking change that restructures the package from pandas_ta to pandas_ta_classic, aligning the Python package name with the PyPI package name pandas-ta-classic. The change removes backward compatibility and requires users to update their import statements.

  • Renamed Python package from pandas_ta to pandas_ta_classic
  • Updated all internal imports throughout the codebase to use the new package structure
  • Modified setup.py to reflect the new package structure and updated URLs to point to the new repository

Reviewed Changes

Copilot reviewed 179 out of 193 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
setup.py Updated package name to "pandas-ta-classic" and all module paths to use "pandas_ta_classic" prefix
pandas_ta_classic/init.py Updated package name references and import paths
All indicator modules Updated internal imports to use "pandas_ta_classic" instead of "pandas_ta"
Test files Updated imports to use new package structure
Documentation files Updated references to use new package naming
Examples Updated import statements to use pandas_ta_classic

def _camelCase2Title(x: str):
"""https://stackoverflow.com/questions/5020906/python-convert-camel-case-to-space-delimited-using-regex-and-taking-acronyms-in"""
return re_.sub("([a-z])([A-Z])","\g<1> \g<2>", x).title()
return re_.sub("([a-z])([A-Z])", r"\g<1> \g<2>", x).title()
Copy link

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex replacement uses a raw string with extra escaping. The pattern should be r"\g<1> \g<2>" or the original "\g<1> \g<2>" but not both. The current format r"\g<1> \g<2>" will produce literal backslashes in the output.

Suggested change
return re_.sub("([a-z])([A-Z])", r"\g<1> \g<2>", x).title()
return re_.sub("([a-z])([A-Z])", "\g<1> \g<2>", x).title()

Copilot uses AI. Check for mistakes.
"""Chande Momentum Oscillator (CMO) Patch
For some reason: from pandas_ta.momentum import cmo causes
For some reason: from pandas_ta_classic.momentum import cmo causes
pandas_ta.momentum.coppock to not be able to import it's
Copy link

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment references the old package name in the explanation. It should be updated to reflect the new package structure consistently.

Suggested change
pandas_ta.momentum.coppock to not be able to import it's
pandas_ta_classic.momentum.coppock to not be able to import its

Copilot uses AI. Check for mistakes.
Comment on lines +19 to 22
For some reason: from pandas_ta_classic.momentum import cmo causes
pandas_ta.momentum.coppock to not be able to import it's
wma like from pandas_ta.overlap import wma?
wma like from pandas_ta_classic.overlap import wma?
Weird Circular TypeError!?!
Copy link

Copilot AI Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This comment line is part of the same docstring and maintains consistency with the package name update, but the explanation could be clearer about what the circular import issue actually is.

Copilot uses AI. Check for mistakes.
@xgboosted xgboosted merged commit 307f80d into main Aug 1, 2025
@xgboosted xgboosted deleted the copilot/fix-1 branch August 1, 2025 11:31
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.

2 participants