Skip to content

Commit 44308ff

Browse files
committed
Dropped support for Python < 3.6
1 parent 5516767 commit 44308ff

File tree

8 files changed

+15
-48
lines changed

8 files changed

+15
-48
lines changed

.github/workflows/codeqa_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
python-version: ["3.6", "3.9"]
31+
python-version: ["3.6", "3.11"]
3232
runs-on: ubuntu-latest
3333
steps:
3434
- uses: actions/checkout@v2

apscheduler/executors/asyncio.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
import sys
44

55
from apscheduler.executors.base import BaseExecutor, run_job
6+
from apscheduler.executors.base_py3 import run_coroutine_job
67
from apscheduler.util import iscoroutinefunction_partial
78

8-
try:
9-
from apscheduler.executors.base_py3 import run_coroutine_job
10-
except ImportError:
11-
run_coroutine_job = None
12-
139

1410
class AsyncIOExecutor(BaseExecutor):
1511
"""
@@ -46,11 +42,8 @@ def callback(f):
4642
self._run_job_success(job.id, events)
4743

4844
if iscoroutinefunction_partial(job.func):
49-
if run_coroutine_job is not None:
50-
coro = run_coroutine_job(job, job._jobstore_alias, run_times, self._logger.name)
51-
f = self._eventloop.create_task(coro)
52-
else:
53-
raise Exception('Executing coroutine based jobs is not supported with Trollius')
45+
coro = run_coroutine_job(job, job._jobstore_alias, run_times, self._logger.name)
46+
f = self._eventloop.create_task(coro)
5447
else:
5548
f = self._eventloop.run_in_executor(None, run_job, job, job._jobstore_alias, run_times,
5649
self._logger.name)

apscheduler/schedulers/asyncio.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
from __future__ import absolute_import
2+
import asyncio
23
from functools import wraps, partial
34

45
from apscheduler.schedulers.base import BaseScheduler
56
from apscheduler.util import maybe_ref
67

7-
try:
8-
import asyncio
9-
except ImportError: # pragma: nocover
10-
try:
11-
import trollius as asyncio
12-
except ImportError:
13-
raise ImportError(
14-
'AsyncIOScheduler requires either Python 3.4 or the asyncio package installed')
15-
168

179
def run_in_event_loop(func):
1810
@wraps(func)

apscheduler/util.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import division
44

5+
from asyncio import iscoroutinefunction
56
from datetime import date, datetime, time, timedelta, tzinfo
67
from calendar import timegm
78
from functools import partial
@@ -22,15 +23,6 @@
2223
except ImportError:
2324
TIMEOUT_MAX = 4294967 # Maximum value accepted by Event.wait() on Windows
2425

25-
try:
26-
from asyncio import iscoroutinefunction
27-
except ImportError:
28-
try:
29-
from trollius import iscoroutinefunction
30-
except ImportError:
31-
def iscoroutinefunction(func):
32-
return False
33-
3426
__all__ = ('asint', 'asbool', 'astimezone', 'convert_to_datetime', 'datetime_to_utc_timestamp',
3527
'utc_timestamp_to_datetime', 'timedelta_seconds', 'datetime_ceil', 'get_callable_name',
3628
'obj_to_ref', 'ref_to_obj', 'maybe_ref', 'repr_escape', 'check_callable_args',

docs/versionhistory.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ Version history
44
To find out how to migrate your application from a previous version of
55
APScheduler, see the :doc:`migration section <migration>`.
66

7-
3.9.2
8-
-----
7+
3.10.0
8+
------
99

1010
* Fixed compatibility with SQLAlchemy 2.0 and bumped minimum supported version to 1.4
11+
* Dropped support for Python versions older than 3.6
1112

1213

1314
3.9.1

setup.cfg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,3 @@ show_missing = true
1919
[flake8]
2020
max-line-length = 99
2121
exclude = .tox,build,docs
22-
23-
[bdist_wheel]
24-
universal = 1

setup.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# coding: utf-8
21
import os.path
32

43
from setuptools import setup, find_packages
@@ -24,19 +23,18 @@
2423
'Intended Audience :: Developers',
2524
'License :: OSI Approved :: MIT License',
2625
'Programming Language :: Python',
27-
'Programming Language :: Python :: 2.7',
2826
'Programming Language :: Python :: 3',
29-
'Programming Language :: Python :: 3.5',
3027
'Programming Language :: Python :: 3.6',
3128
'Programming Language :: Python :: 3.7',
3229
'Programming Language :: Python :: 3.8',
3330
'Programming Language :: Python :: 3.9',
34-
'Programming Language :: Python :: 3.10'
31+
'Programming Language :: Python :: 3.10',
32+
'Programming Language :: Python :: 3.11'
3533
],
3634
keywords='scheduling cron',
3735
license='MIT',
3836
packages=find_packages(exclude=['tests']),
39-
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4',
37+
python_requires='>=3.6',
4038
setup_requires=[
4139
'setuptools_scm'
4240
],
@@ -47,9 +45,6 @@
4745
'tzlocal >= 2.0, != 3.*'
4846
],
4947
extras_require={
50-
':python_version == "2.7"': ['futures'],
51-
':python_version < "3.5"': ['funcsigs'],
52-
'asyncio:python_version == "2.7"': ['trollius'],
5348
'gevent': ['gevent'],
5449
'mongodb': ['pymongo >= 3.0'],
5550
'redis': ['redis >= 3.0'],
@@ -60,12 +55,10 @@
6055
'zookeeper': ['kazoo'],
6156
'testing': [
6257
'pytest',
58+
'pytest_asyncio',
6359
'pytest-cov',
6460
'pytest-tornado5'
6561
],
66-
'testing:python_version == "2.7"': ['mock'],
67-
'testing:python_version == "3.4"': ['pytest_asyncio < 0.6'],
68-
'testing:python_version >= "3.5"': ['pytest_asyncio'],
6962
'doc': [
7063
'sphinx',
7164
'sphinx-rtd-theme',

tox.ini

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py27, py35, py36, py37, py38, py39, py310, pypy, pypy3, flake8
2+
envlist = py36, py37, py38, py39, py310, py311, pypy3, flake8
33
skip_missing_interpreters = true
44

55
[testenv]
@@ -16,8 +16,7 @@ extras = testing
1616
twisted
1717
zookeeper
1818
deps =
19-
{py35}: PyQt5
20-
{py36,py37,py38,py39,py310}: PySide6
19+
{py36,py37,py38,py39,py310,py311}: PySide6
2120

2221
[testenv:py34]
2322
deps = twisted < 19.7

0 commit comments

Comments
 (0)