agronholm / apscheduler

Task scheduling library for Python
MIT License
6.18k stars 704 forks source link

imports does not work #796

Closed yyokusa closed 12 months ago

yyokusa commented 12 months ago

Things to check first

Version

3.10.4

What happened?

Imports does not work.

pip list Package Version


APScheduler 3.10.4

python Python 3.11.0 (main, Oct 10 2023, 00:19:53) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin Type "help", "copyright", "credits" or "license" for more information.

from apscheduler import Scheduler Traceback (most recent call last): File "", line 1, in ImportError: cannot import name 'Scheduler' from 'apscheduler' (/Users//.pyenv/versions/venv3-11/lib/python3.11/site-packages/apscheduler/init.py)

python Python 3.11.0 (main, Oct 10 2023, 00:19:53) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin Type "help", "copyright", "credits" or "license" for more information.

from apscheduler import AsyncScheduler Traceback (most recent call last): File "", line 1, in ImportError: cannot import name 'AsyncScheduler' from 'apscheduler' (/Users//.pyenv/versions/venv3-11/lib/python3.11/site-packages/apscheduler/init.py)

How can we reproduce the bug?

Just try imports from the given code example in the link:

https://apscheduler.readthedocs.io/en/master/userguide.html#running-the-scheduler

--> from apscheduler import AsyncScheduler

agronholm commented 12 months ago

Are you looking at the correct version of the documentation for the version you have installed?

agronholm commented 12 months ago

The link seems to point to master while you're running the 3.x series.

yyokusa commented 12 months ago

Thank you!

scaleoutsean commented 3 months ago

The link seems to point to master while you're running the 3.x series.

To be fair the docs link in GH 3.0 branch (https://github.com/agronholm/apscheduler/tree/3.0) points to that latest (master) location rather than the expected 3.x docs. That got me as well.