Skip to content

Commit

Permalink
Support Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed May 27, 2023
1 parent 72c94e8 commit c43a853
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
python -m pip install --upgrade pip
pip install .[tests] --use-pep517
- name: Lint with flake8
if: matrix.python-version == '3.10'
if: matrix.python-version == '3.11'
run: |
flake8 webware setup.py --count --exit-zero --statistics
- name: Lint with pylint
if: matrix.python-version == '3.10'
if: matrix.python-version == '3.11'
run: |
pylint webware
- name: Run all unit tests
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Operating System :: OS Independent',
],
install_requires=["setuptools"],
extras_require={
'dev': requireDev,
'docs': requireDocs,
Expand Down
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
[tox]
envlist = py{36,37,38,39,310,311}, pypy3, flake8, pylint, docs, manifest
envlist = py{36,37,38,39,310,311,312}, pypy3, flake8, pylint, docs, manifest

[testenv:flake8]
basepython = python3.10
basepython = python3.11
deps = flake8>=6,<7
commands =
flake8 webware setup.py

[testenv:pylint]
basepython = python3.10
basepython = python3.11
deps = pylint>=2.16,<3
commands =
pylint webware

[testenv:docs]
basepython = python3.10
basepython = python3.11
extras =
docs
commands =
sphinx-build -b html -nEW docs docs/_build/html

[testenv:manifest]
basepython = python3.10
basepython = python3.11
deps = check-manifest>=0.49
commands =
check-manifest -v
Expand Down
5 changes: 1 addition & 4 deletions webware/MiscUtils/Funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,7 @@ def timestamp(t=None):

def localTimeDelta(t=None):
"""Return timedelta of local zone from GMT."""
if t is None:
t = time.time()
dt = datetime.datetime
return dt.fromtimestamp(t) - dt.utcfromtimestamp(t)
return datetime.timedelta(seconds=time.localtime(t).tm_gmtoff)


def uniqueId(forObject=None):
Expand Down

0 comments on commit c43a853

Please sign in to comment.