Skip to content

Conversation

@sr-favrev
Copy link

Summary

This PR relaxes the strict version pins in requirements.txt to allow jugaad-data to be installed alongside modern Python packages.

Changes

  • click==7.1.2click>=7.1.2 (compatible with click 8.x)
  • appdirs==1.4.4appdirs>=1.4.4
  • beautifulsoup4==4.9.3beautifulsoup4>=4.9.3
  • Added lxml>=4.6.0 as explicit dependency
  • Updated minimum Python version to 3.9 (Python 3.6-3.8 are EOL)

Problem

Currently, jugaad-data cannot be installed in environments with modern packages like Flask 2.x, Black, or other tools that require click>=8.0. The error looks like:

ERROR: Cannot install jugaad-data and flask because these package versions have conflicting dependencies.
The conflict is caused by:
    flask 2.3.3 depends on click>=8.1.3
    jugaad-data 0.29 depends on click==7.1.2

Solution

The code uses standard click APIs that are backward compatible:

  • @click.group(), @click.command(), @click.option() decorators
  • click.progressbar(), click.echo()

These APIs haven't changed between click 7.x and 8.x, so the strict version pin is unnecessary.

Testing

Tested with:

  • Python 3.12
  • click 8.3.1
  • beautifulsoup4 4.14.3

All imports and basic functionality working:

from jugaad_data.nse import NSELive, stock_df
from jugaad_data.rbi import RBI
# All imports successful

Backward Compatibility

This change is backward compatible - users with older versions of these packages can still install jugaad-data since we use >= instead of ==.

…ility

- Change click==7.1.2 to click>=7.1.2 (compatible with click 8.x)
- Change appdirs==1.4.4 to appdirs>=1.4.4
- Change beautifulsoup4==4.9.3 to beautifulsoup4>=4.9.3
- Add lxml>=4.6.0 as explicit dependency
- Update minimum Python version to 3.9 (3.6-3.8 are EOL)

The code uses standard click APIs (@click.group, @click.command,
@click.option, click.progressbar, click.echo) that are backward
compatible across click 7.x and 8.x.

This allows jugaad-data to be installed alongside modern packages
like Flask 2.x and Black which require click>=8.0.

Tested with:
- Python 3.12
- click 8.3.1
- beautifulsoup4 4.14.3
- All imports and basic functionality working
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