Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-APScheduler for openSUSE:Factory checked in at 2022-03-01 17:04:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-APScheduler (Old) and /work/SRC/openSUSE:Factory/.python-APScheduler.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-APScheduler" Tue Mar 1 17:04:06 2022 rev:17 rq:958293 version:3.9.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-APScheduler/python-APScheduler.changes 2022-01-24 23:10:48.222425927 +0100 +++ /work/SRC/openSUSE:Factory/.python-APScheduler.new.1958/python-APScheduler.changes 2022-03-01 17:04:54.444354753 +0100 @@ -1,0 +2,15 @@ +Tue Mar 1 13:02:06 UTC 2022 - pgaj...@suse.com + +- version update to 3.9.1 + 3.9.1 + ----- + * Removed a leftover check for pytz ``localize()`` and ``normalize()`` methods + 3.9.0 + ----- + * Added support for PySide6 to the Qt scheduler + * No longer enforce pytz time zones (support for others is experimental in the 3.x series) + * Fixed compatibility with PyMongo 4 + * Fixed pytz deprecation warnings + * Fixed RuntimeError when shutting down the scheduler from a scheduled job + +------------------------------------------------------------------- Old: ---- APScheduler-3.8.1.tar.gz New: ---- APScheduler-3.9.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-APScheduler.spec ++++++ --- /var/tmp/diff_new_pack.LLPWck/_old 2022-03-01 17:04:54.956354889 +0100 +++ /var/tmp/diff_new_pack.LLPWck/_new 2022-03-01 17:04:54.960354889 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-APScheduler # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-APScheduler -Version: 3.8.1 +Version: 3.9.1 Release: 0 Summary: In-process task scheduler with Cron-like capabilities License: MIT @@ -28,9 +28,9 @@ BuildRequires: %{python_module SQLAlchemy >= 0.8} BuildRequires: %{python_module Twisted} BuildRequires: %{python_module gevent} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest-asyncio} BuildRequires: %{python_module pytest-tornado} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytz} BuildRequires: %{python_module setuptools >= 36.2.7} BuildRequires: %{python_module setuptools_scm >= 1.7.0} @@ -96,7 +96,8 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%pytest +# https://github.com/agronholm/apscheduler/issues/601 +%pytest -k 'not test_broken_pool' %files %{python_files} %license LICENSE.txt ++++++ APScheduler-3.8.1.tar.gz -> APScheduler-3.9.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/.github/workflows/codeqa_test.yaml new/APScheduler-3.9.1/.github/workflows/codeqa_test.yaml --- old/APScheduler-3.8.1/.github/workflows/codeqa_test.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/APScheduler-3.9.1/.github/workflows/codeqa_test.yaml 2022-02-27 17:06:11.000000000 +0100 @@ -0,0 +1,48 @@ +name: Python codeqa/test + +on: + push: + branches: [3.x] + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: pip-lint + - name: Install dependencies + run: pip install tox + - name: Run flake8 + run: tox -e flake8 + + test-linux: + needs: [lint] + strategy: + fail-fast: false + matrix: + python-version: ["3.6", "3.9"] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: pip-test-${{ matrix.python-version }}-ubuntu-latest + - name: Start external services + run: docker-compose up -d + - name: Install the project and its dependencies + run: pip install -e .[testing,asyncio,gevent,mongodb,redis,rethinkdb,sqlalchemy,tornado,twisted,zookeeper] + - name: Test with pytest + run: pytest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/.github/workflows/publish.yml new/APScheduler-3.9.1/.github/workflows/publish.yml --- old/APScheduler-3.8.1/.github/workflows/publish.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/APScheduler-3.9.1/.github/workflows/publish.yml 2022-02-27 17:06:11.000000000 +0100 @@ -0,0 +1,28 @@ +name: Publish packages to PyPI + +on: + push: + tags: + - "[0-9]+.[0-9]+.[0-9]+" + - "[0-9]+.[0-9]+.[0-9].post[0-9]+" + - "[0-9]+.[0-9]+.[0-9][a-b][0-9]+" + - "[0-9]+.[0-9]+.[0-9]rc[0-9]+" + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + - name: Install dependencies + run: pip install build + - name: Create packages + run: python -m build -s -w . + - name: Upload packages + uses: pypa/gh-action-pypi-publish@v1.1.0 + with: + user: __token__ + password: ${{ secrets.pypi_password }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/.travis.yml new/APScheduler-3.9.1/.travis.yml --- old/APScheduler-3.8.1/.travis.yml 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,61 +0,0 @@ -dist: xenial -language: python -cache: pip -python: "3.6" - -stages: - - name: static analysis - - name: test - - name: deploy to pypi - if: type = push AND tag =~ ^v\d+\.\d+\.\d+ - -jobs: - include: - - stage: static analysis - env: TOXENV=flake8 - - - &test - stage: test - env: TOXENV=pypy3 - python: pypy3 - before_install: docker-compose up -d - after_success: - - pip install coveralls - - coveralls - - - <<: *test - env: TOXENV=py27 - python: "2.7" - - - <<: *test - env: TOXENV=py35 - python: "3.5" - - - <<: *test - env: TOXENV=py36 - python: "3.6" - - - <<: *test - env: TOXENV=py37 - python: "3.7" - - - stage: deploy to pypi - install: true - script: skip - deploy: - provider: pypi - user: agronholm - password: - secure: YXuMMv+Ukr49mhiMzy8+bXDilRo52y6YrEzxlLnEksLlq0BNjgRcAsiDzo46k6xuxGxo7XsWaGEP6TBPwTR6eVgmWKjEPrnqyQepRV9Ibrw7+V7DzJn4pBZWX9Pg2oe3WMlYhooIvy6tRDfSaB8cc06/k0ftSNbzAjzpeVk8k0VyLRsBRBqOsrnzvqlRNOUWi0dlgGqhZvGkDMpmi+WVv6rW3y/VaV+vRK88luKHXUy48eMEGPnL3xCgr727es5qmAP9fDKVGKpXvpGzZyRoeMor2HQwj5AFt9DH4YoBbzJRJESSgI4DugtgGPG7Uz1Xx+TxZY609UbR1kju00Vl1KsnGBsxvR0okmItcTzIgp1IRg8MVDGc+duD3oCjlFQEynJL/RExY/yTQfN5rJFtV6nrHrMVgaL2N2dEVFV8zxGvmrptKRq2ujuJ5t2ssMkKAwXRxg2wXQwCjrxUDRMWd7VfRgGadTTdM6TzoeMo8vlL2FA/RvcFVSnfItrSS4ip2FyswzevVyCQMdblLlnlwFG5YTKMAfljd7JzkyA02IND/nFXGcJ3BsP4ciOXoa49PvD+qbNwqL+6v8I5wCYfPlpqfpf9um2SLDYDE6Ka44p1MvnF3me3oaegt2SX92eDvkZN1TICdOxQuvTTGEx7pW8wJS3opBVaQ7Pes5PHO60= - distributions: sdist bdist_wheel - on: - tags: true - -install: pip install tox - -script: tox - -notifications: - webhooks: - urls: - - https://webhooks.gitter.im/e/f41346c0f7c22d4fe002 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/APScheduler.egg-info/PKG-INFO new/APScheduler-3.9.1/APScheduler.egg-info/PKG-INFO --- old/APScheduler-3.8.1/APScheduler.egg-info/PKG-INFO 2021-10-24 22:57:25.000000000 +0200 +++ new/APScheduler-3.9.1/APScheduler.egg-info/PKG-INFO 2022-02-27 17:06:21.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: APScheduler -Version: 3.8.1 +Version: 3.9.1 Summary: In-process task scheduler with Cron-like capabilities Home-page: https://github.com/agronholm/apscheduler Author: Alex Gr??nholm @@ -17,6 +17,9 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4 Provides-Extra: asyncio Provides-Extra: gevent @@ -31,12 +34,15 @@ Provides-Extra: doc License-File: LICENSE.txt -.. image:: https://travis-ci.com/agronholm/apscheduler.svg?branch=3.x - :target: https://travis-ci.com/agronholm/apscheduler +.. image:: https://github.com/agronholm/apscheduler/workflows/Python%20codeqa/test/badge.svg?branch=3.x + :target: https://github.com/agronholm/apscheduler/actions?query=workflow%3A%22Python+codeqa%2Ftest%22+branch%3A3.x :alt: Build Status .. image:: https://coveralls.io/repos/github/agronholm/apscheduler/badge.svg?branch=3.x :target: https://coveralls.io/github/agronholm/apscheduler?branch=3.x :alt: Code Coverage +.. image:: https://readthedocs.org/projects/apscheduler/badge/?version=3.x + :target: https://apscheduler.readthedocs.io/en/master/?badge=3.x + :alt: Documentation Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed later, either just once or periodically. You can add new jobs or remove old ones on @@ -75,6 +81,7 @@ * `Twisted <http://twistedmatrix.com/>`_ * `Qt <http://qt-project.org/>`_ (using either `PyQt <http://www.riverbankcomputing.com/software/pyqt/intro>`_ , + `PySide6 <https://wiki.qt.io/Qt_for_Python>`_ , `PySide2 <https://wiki.qt.io/Qt_for_Python>`_ or `PySide <http://qt-project.org/wiki/PySide>`_) @@ -111,7 +118,7 @@ If you have problems or other questions, you can either: * Ask in the `apscheduler <https://gitter.im/apscheduler/Lobby>`_ room on Gitter -* Ask on the `APScheduler Google group <http://groups.google.com/group/apscheduler>`_, or +* Ask on the `APScheduler GitHub discussion forum <https://github.com/agronholm/apscheduler/discussions>`_, or * Ask on `StackOverflow <http://stackoverflow.com/questions/tagged/apscheduler>`_ and tag your question with the ``apscheduler`` tag diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/APScheduler.egg-info/SOURCES.txt new/APScheduler-3.9.1/APScheduler.egg-info/SOURCES.txt --- old/APScheduler-3.8.1/APScheduler.egg-info/SOURCES.txt 2021-10-24 22:57:26.000000000 +0200 +++ new/APScheduler-3.9.1/APScheduler.egg-info/SOURCES.txt 2022-02-27 17:06:21.000000000 +0100 @@ -1,7 +1,6 @@ .gitignore .mailmap .readthedocs.yml -.travis.yml LICENSE.txt README.rst docker-compose.yml @@ -9,6 +8,8 @@ setup.py tox.ini .github/ISSUE_TEMPLATE.md +.github/workflows/codeqa_test.yaml +.github/workflows/publish.yml APScheduler.egg-info/PKG-INFO APScheduler.egg-info/SOURCES.txt APScheduler.egg-info/dependency_links.txt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/APScheduler.egg-info/entry_points.txt new/APScheduler-3.9.1/APScheduler.egg-info/entry_points.txt --- old/APScheduler-3.8.1/APScheduler.egg-info/entry_points.txt 2021-10-24 22:57:25.000000000 +0200 +++ new/APScheduler-3.9.1/APScheduler.egg-info/entry_points.txt 2022-02-27 17:06:21.000000000 +0100 @@ -21,4 +21,3 @@ date = apscheduler.triggers.date:DateTrigger interval = apscheduler.triggers.interval:IntervalTrigger or = apscheduler.triggers.combining:OrTrigger - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/APScheduler.egg-info/requires.txt new/APScheduler-3.9.1/APScheduler.egg-info/requires.txt --- old/APScheduler-3.8.1/APScheduler.egg-info/requires.txt 2021-10-24 22:57:25.000000000 +0200 +++ new/APScheduler-3.9.1/APScheduler.egg-info/requires.txt 2022-02-27 17:06:21.000000000 +0100 @@ -32,7 +32,7 @@ sqlalchemy>=0.8 [testing] -pytest<6 +pytest pytest-cov pytest-tornado5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/PKG-INFO new/APScheduler-3.9.1/PKG-INFO --- old/APScheduler-3.8.1/PKG-INFO 2021-10-24 22:57:26.000000000 +0200 +++ new/APScheduler-3.9.1/PKG-INFO 2022-02-27 17:06:21.830608100 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: APScheduler -Version: 3.8.1 +Version: 3.9.1 Summary: In-process task scheduler with Cron-like capabilities Home-page: https://github.com/agronholm/apscheduler Author: Alex Gr??nholm @@ -17,6 +17,9 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4 Provides-Extra: asyncio Provides-Extra: gevent @@ -31,12 +34,15 @@ Provides-Extra: doc License-File: LICENSE.txt -.. image:: https://travis-ci.com/agronholm/apscheduler.svg?branch=3.x - :target: https://travis-ci.com/agronholm/apscheduler +.. image:: https://github.com/agronholm/apscheduler/workflows/Python%20codeqa/test/badge.svg?branch=3.x + :target: https://github.com/agronholm/apscheduler/actions?query=workflow%3A%22Python+codeqa%2Ftest%22+branch%3A3.x :alt: Build Status .. image:: https://coveralls.io/repos/github/agronholm/apscheduler/badge.svg?branch=3.x :target: https://coveralls.io/github/agronholm/apscheduler?branch=3.x :alt: Code Coverage +.. image:: https://readthedocs.org/projects/apscheduler/badge/?version=3.x + :target: https://apscheduler.readthedocs.io/en/master/?badge=3.x + :alt: Documentation Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed later, either just once or periodically. You can add new jobs or remove old ones on @@ -75,6 +81,7 @@ * `Twisted <http://twistedmatrix.com/>`_ * `Qt <http://qt-project.org/>`_ (using either `PyQt <http://www.riverbankcomputing.com/software/pyqt/intro>`_ , + `PySide6 <https://wiki.qt.io/Qt_for_Python>`_ , `PySide2 <https://wiki.qt.io/Qt_for_Python>`_ or `PySide <http://qt-project.org/wiki/PySide>`_) @@ -111,7 +118,7 @@ If you have problems or other questions, you can either: * Ask in the `apscheduler <https://gitter.im/apscheduler/Lobby>`_ room on Gitter -* Ask on the `APScheduler Google group <http://groups.google.com/group/apscheduler>`_, or +* Ask on the `APScheduler GitHub discussion forum <https://github.com/agronholm/apscheduler/discussions>`_, or * Ask on `StackOverflow <http://stackoverflow.com/questions/tagged/apscheduler>`_ and tag your question with the ``apscheduler`` tag diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/README.rst new/APScheduler-3.9.1/README.rst --- old/APScheduler-3.8.1/README.rst 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/README.rst 2022-02-27 17:06:11.000000000 +0100 @@ -1,9 +1,12 @@ -.. image:: https://travis-ci.com/agronholm/apscheduler.svg?branch=3.x - :target: https://travis-ci.com/agronholm/apscheduler +.. image:: https://github.com/agronholm/apscheduler/workflows/Python%20codeqa/test/badge.svg?branch=3.x + :target: https://github.com/agronholm/apscheduler/actions?query=workflow%3A%22Python+codeqa%2Ftest%22+branch%3A3.x :alt: Build Status .. image:: https://coveralls.io/repos/github/agronholm/apscheduler/badge.svg?branch=3.x :target: https://coveralls.io/github/agronholm/apscheduler?branch=3.x :alt: Code Coverage +.. image:: https://readthedocs.org/projects/apscheduler/badge/?version=3.x + :target: https://apscheduler.readthedocs.io/en/master/?badge=3.x + :alt: Documentation Advanced Python Scheduler (APScheduler) is a Python library that lets you schedule your Python code to be executed later, either just once or periodically. You can add new jobs or remove old ones on @@ -42,6 +45,7 @@ * `Twisted <http://twistedmatrix.com/>`_ * `Qt <http://qt-project.org/>`_ (using either `PyQt <http://www.riverbankcomputing.com/software/pyqt/intro>`_ , + `PySide6 <https://wiki.qt.io/Qt_for_Python>`_ , `PySide2 <https://wiki.qt.io/Qt_for_Python>`_ or `PySide <http://qt-project.org/wiki/PySide>`_) @@ -78,6 +82,6 @@ If you have problems or other questions, you can either: * Ask in the `apscheduler <https://gitter.im/apscheduler/Lobby>`_ room on Gitter -* Ask on the `APScheduler Google group <http://groups.google.com/group/apscheduler>`_, or +* Ask on the `APScheduler GitHub discussion forum <https://github.com/agronholm/apscheduler/discussions>`_, or * Ask on `StackOverflow <http://stackoverflow.com/questions/tagged/apscheduler>`_ and tag your question with the ``apscheduler`` tag diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/apscheduler/jobstores/mongodb.py new/APScheduler-3.9.1/apscheduler/jobstores/mongodb.py --- old/APScheduler-3.8.1/apscheduler/jobstores/mongodb.py 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/apscheduler/jobstores/mongodb.py 2022-02-27 17:06:11.000000000 +0100 @@ -106,7 +106,7 @@ raise JobLookupError(job_id) def remove_all_jobs(self): - self.collection.remove() + self.collection.delete_many({}) def shutdown(self): self.client.close() @@ -133,7 +133,7 @@ # Remove all the jobs we failed to restore if failed_job_ids: - self.collection.remove({'_id': {'$in': failed_job_ids}}) + self.collection.delete_many({'_id': {'$in': failed_job_ids}}) return jobs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/apscheduler/schedulers/base.py new/APScheduler-3.9.1/apscheduler/schedulers/base.py --- old/APScheduler-3.8.1/apscheduler/schedulers/base.py 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/apscheduler/schedulers/base.py 2022-02-27 17:06:11.000000000 +0100 @@ -191,12 +191,11 @@ self.state = STATE_STOPPED # Shut down all executors - with self._executors_lock: + with self._executors_lock, self._jobstores_lock: for executor in six.itervalues(self._executors): executor.shutdown(wait) - # Shut down all job stores - with self._jobstores_lock: + # Shut down all job stores for jobstore in six.itervalues(self._jobstores): jobstore.shutdown() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/apscheduler/schedulers/qt.py new/APScheduler-3.9.1/apscheduler/schedulers/qt.py --- old/APScheduler-3.8.1/apscheduler/schedulers/qt.py 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/apscheduler/schedulers/qt.py 2022-02-27 17:06:11.000000000 +0100 @@ -9,13 +9,16 @@ from PyQt4.QtCore import QObject, QTimer except ImportError: try: - from PySide2.QtCore import QObject, QTimer # noqa + from PySide6.QtCore import QObject, QTimer # noqa except ImportError: try: - from PySide.QtCore import QObject, QTimer # noqa + from PySide2.QtCore import QObject, QTimer # noqa except ImportError: - raise ImportError('QtScheduler requires either PyQt5, PyQt4, PySide2 ' - 'or PySide installed') + try: + from PySide.QtCore import QObject, QTimer # noqa + except ImportError: + raise ImportError('QtScheduler requires either PyQt5, PyQt4, PySide6, PySide2 ' + 'or PySide installed') class QtScheduler(BaseScheduler): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/apscheduler/triggers/cron/__init__.py new/APScheduler-3.9.1/apscheduler/triggers/cron/__init__.py --- old/APScheduler-3.8.1/apscheduler/triggers/cron/__init__.py 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/apscheduler/triggers/cron/__init__.py 2022-02-27 17:06:11.000000000 +0100 @@ -6,7 +6,8 @@ from apscheduler.triggers.base import BaseTrigger from apscheduler.triggers.cron.fields import ( BaseField, MonthField, WeekField, DayOfMonthField, DayOfWeekField, DEFAULT_VALUES) -from apscheduler.util import datetime_ceil, convert_to_datetime, datetime_repr, astimezone +from apscheduler.util import ( + datetime_ceil, convert_to_datetime, datetime_repr, astimezone, localize, normalize) class CronTrigger(BaseTrigger): @@ -143,7 +144,7 @@ i += 1 difference = datetime(**values) - dateval.replace(tzinfo=None) - return self.timezone.normalize(dateval + difference), fieldnum + return normalize(dateval + difference), fieldnum def _set_field_value(self, dateval, fieldnum, new_value): values = {} @@ -156,7 +157,7 @@ else: values[field.name] = new_value - return self.timezone.localize(datetime(**values)) + return localize(datetime(**values), self.timezone) def get_next_fire_time(self, previous_fire_time, now): if previous_fire_time: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/apscheduler/triggers/interval.py new/APScheduler-3.9.1/apscheduler/triggers/interval.py --- old/APScheduler-3.8.1/apscheduler/triggers/interval.py 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/apscheduler/triggers/interval.py 2022-02-27 17:06:11.000000000 +0100 @@ -4,7 +4,9 @@ from tzlocal import get_localzone from apscheduler.triggers.base import BaseTrigger -from apscheduler.util import convert_to_datetime, timedelta_seconds, datetime_repr, astimezone +from apscheduler.util import ( + convert_to_datetime, normalize, timedelta_seconds, datetime_repr, + astimezone) class IntervalTrigger(BaseTrigger): @@ -63,7 +65,7 @@ next_fire_time = self._apply_jitter(next_fire_time, self.jitter, now) if not self.end_date or next_fire_time <= self.end_date: - return self.timezone.normalize(next_fire_time) + return normalize(next_fire_time) def __getstate__(self): return { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/apscheduler/util.py new/APScheduler-3.9.1/apscheduler/util.py --- old/APScheduler-3.8.1/apscheduler/util.py 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/apscheduler/util.py 2022-02-27 17:06:11.000000000 +0100 @@ -34,7 +34,7 @@ __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', - 'TIMEOUT_MAX') + 'normalize', 'localize', 'TIMEOUT_MAX') class _Undefined(object): @@ -90,9 +90,7 @@ if isinstance(obj, six.string_types): return timezone(obj) if isinstance(obj, tzinfo): - if not hasattr(obj, 'localize') or not hasattr(obj, 'normalize'): - raise TypeError('Only timezones from the pytz library are supported') - if obj.zone == 'local': + if obj.tzname(None) == 'local': raise ValueError( 'Unable to determine the name of the local timezone -- you must explicitly ' 'specify the name of the local timezone. Please refrain from using timezones like ' @@ -162,11 +160,7 @@ if isinstance(tz, six.string_types): tz = timezone(tz) - try: - return tz.localize(datetime_, is_dst=None) - except AttributeError: - raise TypeError( - 'Only pytz timezones are supported (need the localize() and normalize() methods)') + return localize(datetime_, tz) def datetime_to_utc_timestamp(timeval): @@ -431,3 +425,14 @@ # The asyncio version of iscoroutinefunction includes testing for @coroutine # decorations vs. the inspect version which does not. return iscoroutinefunction(f) + + +def normalize(dt): + return datetime.fromtimestamp(dt.timestamp(), dt.tzinfo) + + +def localize(dt, tzinfo): + if hasattr(tzinfo, 'localize'): + return tzinfo.localize(dt) + + return normalize(dt.replace(tzinfo=tzinfo)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/docs/migration.rst new/APScheduler-3.9.1/docs/migration.rst --- old/APScheduler-3.8.1/docs/migration.rst 2017-10-21 13:38:15.000000000 +0200 +++ new/APScheduler-3.9.1/docs/migration.rst 2022-02-27 17:06:11.000000000 +0100 @@ -68,6 +68,7 @@ The only other backwards incompatible change was that ``get_next_fire_time()`` takes two arguments now: the previous fire time and the current datetime. +.. note:: APScheduler 3.9.0 added experimental support for non-pytz timezones. From v1.x to 2.0 ================ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/docs/versionhistory.rst new/APScheduler-3.9.1/docs/versionhistory.rst --- old/APScheduler-3.8.1/docs/versionhistory.rst 2021-10-24 22:30:36.000000000 +0200 +++ new/APScheduler-3.9.1/docs/versionhistory.rst 2022-02-27 17:06:11.000000000 +0100 @@ -4,6 +4,22 @@ To find out how to migrate your application from a previous version of APScheduler, see the :doc:`migration section <migration>`. +3.9.1 +----- + +* Removed a leftover check for pytz ``localize()`` and ``normalize()`` methods + + +3.9.0 +----- + +* Added support for PySide6 to the Qt scheduler +* No longer enforce pytz time zones (support for others is experimental in the 3.x series) +* Fixed compatibility with PyMongo 4 +* Fixed pytz deprecation warnings +* Fixed RuntimeError when shutting down the scheduler from a scheduled job + + 3.8.1 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/examples/schedulers/qt.py new/APScheduler-3.9.1/examples/schedulers/qt.py --- old/APScheduler-3.8.1/examples/schedulers/qt.py 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/examples/schedulers/qt.py 2022-02-27 17:06:11.000000000 +0100 @@ -16,9 +16,12 @@ from PyQt4.QtGui import QApplication, QLabel except ImportError: try: - from PySide2.QtWidgets import QApplication, QLabel + from PySide6.QtWidgets import QApplication, QLabel except ImportError: - from PySide.QtGui import QApplication, QLabel + try: + from PySide2.QtWidgets import QApplication, QLabel + except ImportError: + from PySide.QtGui import QApplication, QLabel def tick(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/setup.cfg new/APScheduler-3.9.1/setup.cfg --- old/APScheduler-3.8.1/setup.cfg 2021-10-24 22:57:26.000000000 +0200 +++ new/APScheduler-3.9.1/setup.cfg 2022-02-27 17:06:21.830608100 +0100 @@ -6,6 +6,7 @@ upload-dir = docs/_build/html [tool:pytest] +asyncio_mode = strict addopts = -rsx --cov --tb=short testpaths = tests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/setup.py new/APScheduler-3.9.1/setup.py --- old/APScheduler-3.8.1/setup.py 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/setup.py 2022-02-27 17:06:11.000000000 +0100 @@ -28,7 +28,10 @@ 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7' + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10' ], keywords='scheduling cron', license='MIT', @@ -56,7 +59,7 @@ 'twisted': ['twisted'], 'zookeeper': ['kazoo'], 'testing': [ - 'pytest < 6', + 'pytest', 'pytest-cov', 'pytest-tornado5' ], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/tests/test_jobstores.py new/APScheduler-3.9.1/tests/test_jobstores.py --- old/APScheduler-3.8.1/tests/test_jobstores.py 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/tests/test_jobstores.py 2022-02-27 17:06:11.000000000 +0100 @@ -1,3 +1,4 @@ +import sys from datetime import datetime import pytest @@ -48,6 +49,9 @@ @pytest.fixture def rethinkdbjobstore(): + if sys.version_info >= (3, 10): + pytest.skip('RethinkDB does not work on Python 3.10+') + rethinkdb = pytest.importorskip('apscheduler.jobstores.rethinkdb') store = rethinkdb.RethinkDBJobStore(database='apscheduler_unittest') store.start(None, 'rethinkdb') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/tests/test_schedulers.py new/APScheduler-3.9.1/tests/test_schedulers.py --- old/APScheduler-3.8.1/tests/test_schedulers.py 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/tests/test_schedulers.py 2022-02-27 17:06:11.000000000 +0100 @@ -1039,11 +1039,10 @@ thread.join() -@pytest.mark.skip class TestQtScheduler(SchedulerImplementationTestBase): @pytest.fixture(scope='class') def coreapp(self): - QtCore = pytest.importorskip('PySide.QtCore') + QtCore = pytest.importorskip('PySide6.QtCore') QtCore.QCoreApplication([]) @pytest.fixture @@ -1052,7 +1051,7 @@ return qt.QtScheduler() def wait_event(self, queue): - from PySide.QtCore import QCoreApplication + from PySide6.QtCore import QCoreApplication while queue.empty(): QCoreApplication.processEvents() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/tests/test_util.py new/APScheduler-3.9.1/tests/test_util.py --- old/APScheduler-3.8.1/tests/test_util.py 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/tests/test_util.py 2022-02-27 17:06:11.000000000 +0100 @@ -94,11 +94,11 @@ assert astimezone(None) is None def test_bad_timezone_type(self): - exc = pytest.raises(TypeError, astimezone, tzinfo()) - assert 'Only timezones from the pytz library are supported' in str(exc.value) + pytest.raises(NotImplementedError, astimezone, tzinfo()).\ + match(r'(a )?tzinfo subclass must (implement|override) tzname\(\)') def test_bad_local_timezone(self): - zone = Mock(tzinfo, localize=None, normalize=None, zone='local') + zone = Mock(tzinfo, localize=None, normalize=None, tzname=lambda dt: 'local') exc = pytest.raises(ValueError, astimezone, zone) assert 'Unable to determine the name of the local timezone' in str(exc.value) @@ -148,11 +148,6 @@ returned = convert_to_datetime('2009-8-1', 'UTC', None) assert returned == datetime(2009, 8, 1, tzinfo=pytz.utc) - def test_bad_timezone(self): - exc = pytest.raises(TypeError, convert_to_datetime, '2009-8-1', tzinfo(), None) - assert str(exc.value) == ('Only pytz timezones are supported (need the localize() and ' - 'normalize() methods)') - def test_datetime_to_utc_timestamp(timezone): dt = timezone.localize(datetime(2014, 3, 12, 5, 40, 13, 254012)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/APScheduler-3.8.1/tox.ini new/APScheduler-3.9.1/tox.ini --- old/APScheduler-3.8.1/tox.ini 2021-10-24 22:17:02.000000000 +0200 +++ new/APScheduler-3.9.1/tox.ini 2022-02-27 17:06:11.000000000 +0100 @@ -1,5 +1,5 @@ [tox] -envlist = py27, py35, py36, py37, pypy, pypy3, flake8 +envlist = py27, py35, py36, py37, py38, py39, py310, pypy, pypy3, flake8 skip_missing_interpreters = true [testenv] @@ -15,7 +15,9 @@ tornado twisted zookeeper -deps = {py35,py36,py37}: PyQt5 +deps = + {py35}: PyQt5 + {py36,py37,py38,py39,py310}: PySide6 [testenv:py34] deps = twisted < 19.7