Skip to content

Commit c43a853

Browse files
committed
Support Python 3.12
1 parent 72c94e8 commit c43a853

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

Diff for: .github/workflows/release-docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- uses: actions/checkout@v3
15-
- name: Set up Python 3.10
15+
- name: Set up Python 3.11
1616
uses: actions/setup-python@v3
1717
with:
18-
python-version: "3.10"
18+
python-version: "3.11"
1919
- name: Install dependencies
2020
run: |
2121
python -m pip install --upgrade pip

Diff for: .github/workflows/test-package.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323
python -m pip install --upgrade pip
2424
pip install .[tests] --use-pep517
2525
- name: Lint with flake8
26-
if: matrix.python-version == '3.10'
26+
if: matrix.python-version == '3.11'
2727
run: |
2828
flake8 webware setup.py --count --exit-zero --statistics
2929
- name: Lint with pylint
30-
if: matrix.python-version == '3.10'
30+
if: matrix.python-version == '3.11'
3131
run: |
3232
pylint webware
3333
- name: Run all unit tests

Diff for: setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@
6060
'Programming Language :: Python :: 3.9',
6161
'Programming Language :: Python :: 3.10',
6262
'Programming Language :: Python :: 3.11',
63+
'Programming Language :: Python :: 3.12',
6364
'Programming Language :: Python :: Implementation :: CPython',
6465
'Programming Language :: Python :: Implementation :: PyPy',
6566
'Operating System :: OS Independent',
6667
],
68+
install_requires=["setuptools"],
6769
extras_require={
6870
'dev': requireDev,
6971
'docs': requireDocs,

Diff for: tox.ini

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
[tox]
2-
envlist = py{36,37,38,39,310,311}, pypy3, flake8, pylint, docs, manifest
2+
envlist = py{36,37,38,39,310,311,312}, pypy3, flake8, pylint, docs, manifest
33

44
[testenv:flake8]
5-
basepython = python3.10
5+
basepython = python3.11
66
deps = flake8>=6,<7
77
commands =
88
flake8 webware setup.py
99

1010
[testenv:pylint]
11-
basepython = python3.10
11+
basepython = python3.11
1212
deps = pylint>=2.16,<3
1313
commands =
1414
pylint webware
1515

1616
[testenv:docs]
17-
basepython = python3.10
17+
basepython = python3.11
1818
extras =
1919
docs
2020
commands =
2121
sphinx-build -b html -nEW docs docs/_build/html
2222

2323
[testenv:manifest]
24-
basepython = python3.10
24+
basepython = python3.11
2525
deps = check-manifest>=0.49
2626
commands =
2727
check-manifest -v

Diff for: webware/MiscUtils/Funcs.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,7 @@ def timestamp(t=None):
278278

279279
def localTimeDelta(t=None):
280280
"""Return timedelta of local zone from GMT."""
281-
if t is None:
282-
t = time.time()
283-
dt = datetime.datetime
284-
return dt.fromtimestamp(t) - dt.utcfromtimestamp(t)
281+
return datetime.timedelta(seconds=time.localtime(t).tm_gmtoff)
285282

286283

287284
def uniqueId(forObject=None):

0 commit comments

Comments
 (0)