Skip to content

fix: bump APScheduler bound to avoid pkg_resources import error#9

Open
akashkolakkal wants to merge 2 commits intoPhonePe:mainfrom
akashkolakkal:fix/bump-apscheduler-bound
Open

fix: bump APScheduler bound to avoid pkg_resources import error#9
akashkolakkal wants to merge 2 commits intoPhonePe:mainfrom
akashkolakkal:fix/bump-apscheduler-bound

Conversation

@akashkolakkal
Copy link
Copy Markdown

@akashkolakkal akashkolakkal commented Apr 20, 2026

Summary

Updates the APScheduler dependency so installs resolve to versions that no longer import pkg_resources at import time, fixing ModuleNotFoundError: No module named 'pkg_resources' on Python 3.12+ and minimal virtualenvs where setuptools is not installed.

Root cause

Older APScheduler versions import pkg_resources (from setuptools) during import apscheduler.... APScheduler 3.10.2 and later use importlib.metadata instead.

Changes

  • Set APScheduler>=3.10.2,<=3.11.2 in setup.py so pip cannot select a release that still triggers the pkg_resources import, while keeping an upper bound on the 3.x line.

Alternatives considered

Adding setuptools as a direct dependency would mask the issue but keeps a deprecated import path; upgrading and constraining APScheduler is the cleaner fix for a library.

Fixes #7

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.

pkg_resource is deprecated last year. Should use importlib instead. Plz fix this asap

1 participant