Skip to content

Commit

Permalink
Merge fd6703b into 3eac646
Browse files Browse the repository at this point in the history
  • Loading branch information
SijmenHuizenga committed Apr 9, 2023
2 parents 3eac646 + fd6703b commit 5a9d028
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 34 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
run: tox -e setuppy
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
++++++++++++++++++

Expand Down
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand All @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <examples>`
Expand Down
4 changes: 2 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions schedule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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 =
Expand All @@ -34,4 +35,4 @@ commands = black --check .
[testenv:setuppy]
deps = -rrequirements-dev.txt
commands =
python setup.py check --strict --metadata --restructuredtext
python setup.py check --strict --metadata --restructuredtext

0 comments on commit 5a9d028

Please sign in to comment.