# DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

- **ID:** `python/setuptools-pkg-resources-deprecation`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Code imports pkg_resources, which setuptools deprecated in favor of importlib.metadata and importlib.resources. It still works but emits warnings and will be removed.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   from importlib.metadata import version; __version__ = version('your-package')
   ```
2. **** (88% success)
   ```
   from importlib.resources import files; data = files('your_package').joinpath('data.txt').read_text()
   ```

## Dead Ends

- **** — Hides the warning but does not fix the underlying deprecated usage; future removal will break the code. (70% fail)
- **** — Avoids the warning temporarily but locks you out of security fixes and new features. (60% fail)
