Skip to main content

Tool for checking deprecated dependencies in Python projects and suggesting alternatives

Project description

Deprecated Checker

Tool for checking deprecated dependencies in Python projects and suggesting alternatives.

Features

  • Dynamic Repository Analysis: Automatically analyzes repository dependencies and builds database based on actual project packages
  • Comprehensive Database Updates: Updates database with all known deprecated packages from multiple sources
  • Automatic detection of deprecated packages from requirements.txt, setup.py, pyproject.toml
  • Smart alternatives suggestion with migration guides
  • Beautiful reports with Rich library
  • Fast CLI interface for quick checks
  • Automatic update scheduler for keeping database current
  • Data export in JSON, YAML, and CSV formats
  • Cross-Python version compatibility (3.10, 3.12, 3.12.10)
  • Repository-specific analysis - only checks packages actually used in your project

Installation

From PyPI

pip install deprecated-checker

From Source

git clone https://github.com/yourusername/deprecated-checker.git
cd deprecated-checker
pip install -r requirements.txt

Usage

CLI Interface (Recommended)

# Check current directory
deprecated-checker check

# Check specific project
deprecated-checker check --path /path/to/project

# Export to JSON
deprecated-checker check --export json --output report.json

# Verbose output
deprecated-checker check --verbose

# View database statistics
deprecated-checker stats

# Search for package information
deprecated-checker search requests

# Update database from all sources
deprecated-checker update-db --source all

# Comprehensive database update (checks hundreds of packages)
deprecated-checker update-db --comprehensive

# Analyze repository dependencies
deprecated-checker analyze-repository

# List all deprecated packages in database
deprecated-checker list-db

# Validate database
deprecated-checker validate-db

# Export database
deprecated-checker export-db --format json --output db_export.json

# Scheduler management
deprecated-checker scheduler start --interval 24
deprecated-checker scheduler status
deprecated-checker scheduler force-update

Repository Analysis

The tool now automatically analyzes your repository's dependencies and builds a dynamic database:

# Analyze current repository
deprecated-checker analyze-repository

# Analyze specific repository
deprecated-checker analyze-repository --path /path/to/project

# Save analysis results
deprecated-checker analyze-repository --save

Comprehensive Database Updates

Update the database with all known deprecated packages:

# Update with comprehensive data (may take several minutes)
deprecated-checker update-db --comprehensive

This will check hundreds of packages and save results to data/comprehensive_deprecated_packages.yaml.

Demonstration

# Run demonstration of all capabilities
python demo_cli.py

Legacy method (deprecated_checker.py)

# Check current directory
python deprecated_checker.py

# Check specific directory
python deprecated_checker.py --path /path/to/project

# Export to JSON
python deprecated_checker.py --export json

# Export to YAML
python deprecated_checker.py --export yaml

Example Output

Repository Analysis

✓ Analysis complete! Found 3 deprecated packages

┌─────────────┬──────────────────┬─────────────────────┬─────────────────┐
│ Package     │ Deprecated since │ Reason              │ Source          │
├─────────────┼──────────────────┼─────────────────────┼─────────────────┤
│ pycrypto    │ 2020-01-01       │ Package deprecated  │ pypi_analysis   │
│ bottle      │ 2021-01-01       │ Package deprecated  │ pypi_analysis   │
│ six         │ 2022-01-01       │ Package deprecated  │ pypi_analysis   │
└─────────────┴──────────────────┴─────────────────────┴─────────────────┘

Dependency Check

Checking deprecated dependencies...

Found deprecated packages:
  • django-cors-headers==3.14.0 → django-cors-headers>=4.0.0
  • requests==2.28.0 → httpx>=0.24.0 (recommended)

Safe packages:
  • fastapi==0.104.0
  • pydantic==2.4.0

Key Features

Dynamic Repository Analysis

  • Automatically detects all dependencies in your project
  • Checks each package against PyPI for deprecation status
  • Builds database specifically for your project's packages
  • Falls back to static database if no deprecated packages found

Comprehensive Database

  • Updates from multiple sources: PyPI, GitHub, security advisories
  • Includes hundreds of known deprecated packages
  • Regular updates via scheduler
  • Export/import capabilities

Cross-Version Compatibility

  • Tested with Python 3.10.0, 3.12.0, and 3.12.10
  • Compatible with modern Python packaging standards
  • Works with both legacy and modern dependency files

Project Structure

is-deprecated-or-not/
├── core/
│   ├── __init__.py
│   ├── checker.py              # Main checking logic
│   ├── config_manager.py       # Configuration management
│   ├── data_collector.py       # Data collection from multiple sources
│   ├── database.py             # Dynamic database management
│   ├── parser.py               # Dependency file parsing
│   ├── repository_analyzer.py  # Repository analysis engine
│   └── scheduler.py            # Update scheduler
├── data/
│   └── deprecated_packages.yaml
├── utils/
│   ├── __init__.py
│   └── cli.py                  # CLI interface
├── config/
│   └── collector_config.yaml
├── cache/                      # Data cache
├── logs/                       # Logs
├── demo_cli.py                # Demonstration script
├── deprecated_checker.py      # Legacy interface
├── CLI_GUIDE.md              # CLI guide
└── INSTALL.md                # Installation guide

Documentation

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deprecated_checker-1.0.31.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deprecated_checker-1.0.31-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file deprecated_checker-1.0.31.tar.gz.

File metadata

  • Download URL: deprecated_checker-1.0.31.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for deprecated_checker-1.0.31.tar.gz
Algorithm Hash digest
SHA256 afc1f9509756dd2814d9749e4592c52744465c8b326af34dadbddc09356e5e99
MD5 47095139d90516eadbb640486e0c413b
BLAKE2b-256 a021e4176d565efaf317779370510b85a535f2b3c45bf5611cd3455641d0ab76

See more details on using hashes here.

File details

Details for the file deprecated_checker-1.0.31-py3-none-any.whl.

File metadata

File hashes

Hashes for deprecated_checker-1.0.31-py3-none-any.whl
Algorithm Hash digest
SHA256 8297e6a692b40b778f2809f857f1723a9a4b320e83f087595083f91319030d7d
MD5 4337a59996ac8a63983ab88b4ac72bbc
BLAKE2b-256 47886b11090b6b4c76f11c46e1207084eaf53d638ba3cc0b87a7f6472db27dd0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page