summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2023-02-01 00:08:45 +0200
committerAlex Grönholm <alex.gronholm@nextday.fi>2023-02-01 00:31:42 +0200
commit44308ff4c10c5d987e650da0146fbeb371b5bfee (patch)
treee3d136914d714939f8f0c4ffd7367769e49174bb
parent5516767613043b28bd31ac64931e8f5aa653af0b (diff)
downloadapscheduler-44308ff4c10c5d987e650da0146fbeb371b5bfee.tar.gz
Dropped support for Python < 3.6
-rw-r--r--.github/workflows/codeqa_test.yaml2
-rw-r--r--apscheduler/executors/asyncio.py13
-rw-r--r--apscheduler/schedulers/asyncio.py10
-rw-r--r--apscheduler/util.py10
-rw-r--r--docs/versionhistory.rst5
-rw-r--r--setup.cfg3
-rw-r--r--setup.py15
-rw-r--r--tox.ini5
8 files changed, 15 insertions, 48 deletions
diff --git a/.github/workflows/codeqa_test.yaml b/.github/workflows/codeqa_test.yaml
index e773b8d..7de4dd6 100644
--- a/.github/workflows/codeqa_test.yaml
+++ b/.github/workflows/codeqa_test.yaml
@@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: ["3.6", "3.9"]
+ python-version: ["3.6", "3.11"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
diff --git a/apscheduler/executors/asyncio.py b/apscheduler/executors/asyncio.py
index 06fc7f9..7d45d6c 100644
--- a/apscheduler/executors/asyncio.py
+++ b/apscheduler/executors/asyncio.py
@@ -3,13 +3,9 @@ from __future__ import absolute_import
import sys
from apscheduler.executors.base import BaseExecutor, run_job
+from apscheduler.executors.base_py3 import run_coroutine_job
from apscheduler.util import iscoroutinefunction_partial
-try:
- from apscheduler.executors.base_py3 import run_coroutine_job
-except ImportError:
- run_coroutine_job = None
-
class AsyncIOExecutor(BaseExecutor):
"""
@@ -46,11 +42,8 @@ class AsyncIOExecutor(BaseExecutor):
self._run_job_success(job.id, events)
if iscoroutinefunction_partial(job.func):
- if run_coroutine_job is not None:
- coro = run_coroutine_job(job, job._jobstore_alias, run_times, self._logger.name)
- f = self._eventloop.create_task(coro)
- else:
- raise Exception('Executing coroutine based jobs is not supported with Trollius')
+ coro = run_coroutine_job(job, job._jobstore_alias, run_times, self._logger.name)
+ f = self._eventloop.create_task(coro)
else:
f = self._eventloop.run_in_executor(None, run_job, job, job._jobstore_alias, run_times,
self._logger.name)
diff --git a/apscheduler/schedulers/asyncio.py b/apscheduler/schedulers/asyncio.py
index 70ebede..8bcdfda 100644
--- a/apscheduler/schedulers/asyncio.py
+++ b/apscheduler/schedulers/asyncio.py
@@ -1,18 +1,10 @@
from __future__ import absolute_import
+import asyncio
from functools import wraps, partial
from apscheduler.schedulers.base import BaseScheduler
from apscheduler.util import maybe_ref
-try:
- import asyncio
-except ImportError: # pragma: nocover
- try:
- import trollius as asyncio
- except ImportError:
- raise ImportError(
- 'AsyncIOScheduler requires either Python 3.4 or the asyncio package installed')
-
def run_in_event_loop(func):
@wraps(func)
diff --git a/apscheduler/util.py b/apscheduler/util.py
index d929a48..64b27d7 100644
--- a/apscheduler/util.py
+++ b/apscheduler/util.py
@@ -2,6 +2,7 @@
from __future__ import division
+from asyncio import iscoroutinefunction
from datetime import date, datetime, time, timedelta, tzinfo
from calendar import timegm
from functools import partial
@@ -22,15 +23,6 @@ try:
except ImportError:
TIMEOUT_MAX = 4294967 # Maximum value accepted by Event.wait() on Windows
-try:
- from asyncio import iscoroutinefunction
-except ImportError:
- try:
- from trollius import iscoroutinefunction
- except ImportError:
- def iscoroutinefunction(func):
- return False
-
__all__ = ('asint', 'asbool', 'astimezone', 'convert_to_datetime', 'datetime_to_utc_timestamp',
'utc_timestamp_to_datetime', 'timedelta_seconds', 'datetime_ceil', 'get_callable_name',
'obj_to_ref', 'ref_to_obj', 'maybe_ref', 'repr_escape', 'check_callable_args',
diff --git a/docs/versionhistory.rst b/docs/versionhistory.rst
index d09bbbd..23aa587 100644
--- a/docs/versionhistory.rst
+++ b/docs/versionhistory.rst
@@ -4,10 +4,11 @@ Version history
To find out how to migrate your application from a previous version of
APScheduler, see the :doc:`migration section <migration>`.
-3.9.2
------
+3.10.0
+------
* Fixed compatibility with SQLAlchemy 2.0 and bumped minimum supported version to 1.4
+* Dropped support for Python versions older than 3.6
3.9.1
diff --git a/setup.cfg b/setup.cfg
index fab2ba3..002111f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -19,6 +19,3 @@ show_missing = true
[flake8]
max-line-length = 99
exclude = .tox,build,docs
-
-[bdist_wheel]
-universal = 1
diff --git a/setup.py b/setup.py
index 90933d6..3b452aa 100644
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,3 @@
-# coding: utf-8
import os.path
from setuptools import setup, find_packages
@@ -24,19 +23,18 @@ setup(
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
- 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
- 'Programming Language :: Python :: 3.10'
+ 'Programming Language :: Python :: 3.10',
+ 'Programming Language :: Python :: 3.11'
],
keywords='scheduling cron',
license='MIT',
packages=find_packages(exclude=['tests']),
- python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4',
+ python_requires='>=3.6',
setup_requires=[
'setuptools_scm'
],
@@ -47,9 +45,6 @@ setup(
'tzlocal >= 2.0, != 3.*'
],
extras_require={
- ':python_version == "2.7"': ['futures'],
- ':python_version < "3.5"': ['funcsigs'],
- 'asyncio:python_version == "2.7"': ['trollius'],
'gevent': ['gevent'],
'mongodb': ['pymongo >= 3.0'],
'redis': ['redis >= 3.0'],
@@ -60,12 +55,10 @@ setup(
'zookeeper': ['kazoo'],
'testing': [
'pytest',
+ 'pytest_asyncio',
'pytest-cov',
'pytest-tornado5'
],
- 'testing:python_version == "2.7"': ['mock'],
- 'testing:python_version == "3.4"': ['pytest_asyncio < 0.6'],
- 'testing:python_version >= "3.5"': ['pytest_asyncio'],
'doc': [
'sphinx',
'sphinx-rtd-theme',
diff --git a/tox.ini b/tox.ini
index 33ddd42..7288397 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py27, py35, py36, py37, py38, py39, py310, pypy, pypy3, flake8
+envlist = py36, py37, py38, py39, py310, py311, pypy3, flake8
skip_missing_interpreters = true
[testenv]
@@ -16,8 +16,7 @@ extras = testing
twisted
zookeeper
deps =
- {py35}: PyQt5
- {py36,py37,py38,py39,py310}: PySide6
+ {py36,py37,py38,py39,py310,py311}: PySide6
[testenv:py34]
deps = twisted < 19.7