diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b023fd1e..f7ca9639 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,11 +14,11 @@ jobs: strategy: max-parallel: 6 matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -40,10 +40,10 @@ jobs: needs: test runs-on: ubuntu-latest steps: - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Finished run: | pip3 install coveralls @@ -54,11 +54,11 @@ jobs: docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Install dependencies run: pip install tox - name: Check docs @@ -67,11 +67,11 @@ jobs: formatting: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Install dependencies run: pip install tox - name: Check formatting @@ -80,12 +80,12 @@ jobs: setuppy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Install dependencies run: pip install tox - name: Check docs - run: tox -e setuppy \ No newline at end of file + run: tox -e setuppy diff --git a/HISTORY.rst b/HISTORY.rst index a85a8ce0..418f95c8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ------- +Next release +++++++++++++++++++ + +- Dropped support for Python 3.6, add support for Python 3.10 and 3.11. + 1.1.0 (2021-04-09) ++++++++++++++++++ diff --git a/README.rst b/README.rst index 176e961b..35b69669 100644 --- a/README.rst +++ b/README.rst @@ -17,7 +17,7 @@ Python job scheduling for humans. Run Python functions (or any other callable) p - In-process scheduler for periodic jobs. No extra processes needed! - Very lightweight and no external dependencies. - Excellent test coverage. -- Tested on Python and 3.6, 3.7, 3.8, 3.9 +- Tested on Python and 3.7, 3.8, 3.9, 3.10, 3.11 Usage ----- @@ -33,7 +33,7 @@ Usage def job(): print("I'm working...") - + schedule.every(10).seconds.do(job) schedule.every(10).minutes.do(job) schedule.every().hour.do(job) @@ -46,9 +46,9 @@ Usage def job_with_argument(name): print(f"I am {name}") - + schedule.every(10).seconds.do(job_with_argument, name="Peter") - + while True: schedule.run_pending() time.sleep(1) diff --git a/docs/index.rst b/docs/index.rst index 7e983d38..e051a2ee 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -17,7 +17,7 @@ Python job scheduling for humans. Run Python functions (or any other callable) p - In-process scheduler for periodic jobs. No extra processes needed! - Very lightweight and no external dependencies. - Excellent test coverage. -- Tested on Python 3.6, 3.7, 3.8 and 3.9 +- Tested on Python 3.7, 3.8, 3.9, 3.10 and 3.11 :doc:`Example ` diff --git a/docs/installation.rst b/docs/installation.rst index 9daa66d9..9eab859d 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -6,9 +6,9 @@ Python version support ###################### We recommend using the latest version of Python. -Schedule is tested on Python 3.6, 3.7, 3.8 and 3.9 +Schedule is tested on Python 3.7, 3.8, 3.9, 3.10 and 3.11. -Want to use Schedule on Python 2.7 or 3.5? Use version 0.6.0. +Want to use Schedule on earlier Python versions? See the History. Dependencies diff --git a/schedule/__init__.py b/schedule/__init__.py index 8d02837d..74a2840b 100644 --- a/schedule/__init__.py +++ b/schedule/__init__.py @@ -15,7 +15,7 @@ - A simple to use API for scheduling jobs. - Very lightweight and no external dependencies. - Excellent test coverage. - - Tested on Python 3.6, 3.7, 3.8, 3.9 + - Tested on Python 3.7, 3.8, 3.9, 3.10 and 3.11 Usage: >>> import schedule @@ -223,7 +223,7 @@ class Job(object): method, which also defines its `interval`. """ - def __init__(self, interval: int, scheduler: Scheduler = None): + def __init__(self, interval: int, scheduler: Optional[Scheduler] = None): self.interval: int = interval # pause interval * unit between runs self.latest: Optional[int] = None # upper limit to the interval self.job_func: Optional[functools.partial] = None # the job job_func to run @@ -465,7 +465,7 @@ def tag(self, *tags: Hashable): self.tags.update(tags) return self - def at(self, time_str: str, tz: str = None): + def at(self, time_str: str, tz: Optional[str] = None): """ Specify a particular time that the job should be run at. diff --git a/setup.py b/setup.py index 819c8262..42b9975c 100644 --- a/setup.py +++ b/setup.py @@ -43,11 +43,12 @@ def read_file(filename): "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "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.11", "Natural Language :: English", ], - python_requires=">=3.6", + python_requires=">=3.7", ) diff --git a/tox.ini b/tox.ini index 09d92c54..e27768e5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,15 @@ [tox] -envlist = py3{6,7,8,9}{,-pytz} +envlist = py3{7,8,9,10,11}{,-pytz} skip_missing_interpreters = true [gh-actions] python = - 3.6: py36 3.7: py37 3.8: py38 3.9: py39 + 3.10: py310 + 3.11: py311 [testenv] deps = @@ -34,4 +35,4 @@ commands = black --check . [testenv:setuppy] deps = -rrequirements-dev.txt commands = - python setup.py check --strict --metadata --restructuredtext \ No newline at end of file + python setup.py check --strict --metadata --restructuredtext