Skip to content

Migrate to Python 3.9+ and modernize dependencies - #392

Merged
Hironsan merged 1 commit into
Hironsan:masterfrom
natyavidhan:master
Oct 21, 2025
Merged

Migrate to Python 3.9+ and modernize dependencies#392
Hironsan merged 1 commit into
Hironsan:masterfrom
natyavidhan:master

Conversation

@natyavidhan

Copy link
Copy Markdown
Contributor

Migrates HateSonar from Python 2.7/3.4-3.6 to Python 3.9+.

Key Changes

  • Removed Python 2 compatibility code (from __future__ imports, object base class)
  • Fixed deprecated sklearn APIs (sklearn.externals.joblib, get_feature_names())
  • Updated dependencies to modern versions (scikit-learn 0.24+, numpy 1.19+, pandas 1.1+)
  • Updated LogisticRegression solver to saga (removed deprecation warning)
  • Retrained model files with scikit-learn 1.7.1 (required for pickle compatibility)
  • Added python_requires='>=3.9' in setup.py
  • Version bump: 0.0.7 → 0.0.8

Testing

  • All tests passing on Python 3.13
  • Model accuracy maintained at ~91%
  • No deprecation warnings

Breaking Changes

  • Python 3.9+ required
  • Models retrained (incompatible with v0.0.7)

@Hironsan
Hironsan merged commit 8a82c8d into Hironsan:master Oct 21, 2025
2 checks passed
@Hironsan

Copy link
Copy Markdown
Owner

Thank you.

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