Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.12 #89

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
# note: 3.5 + 3.6 are EOL as of 2022-09-16. tests do fail on python3.5,
# see https://github.com/HBehrens/puncover/issues/36
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
# it's convenient to stay on an older ubuntu as long as we need
# python3.6:
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
Expand All @@ -36,9 +36,9 @@ jobs:

- name: Install dependencies
run: |
# this is the latest version of pip that supports python 3.6
# install a specific version to hopefully avoid breakage
pip install --upgrade pip==21.3.1
# bind pip to a specific version to hopefully avoid breakage
pip install -r .github/workflows/requirements-pip.txt

pip install -r requirements-test.txt

- name: Run tox
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/requirements-pip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# install pip 23.3 on python 3.12+
pip==23.3 ; python_version >= "3.12"

# this is the latest version of pip that supports python 3.6
pip==21.3.1 ; python_version < "3.12"
11 changes: 6 additions & 5 deletions .python-version
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
3.6.15
3.7.16
3.8.16
3.9.16
3.10.10
3.11.2
3.7.17
3.8.18
3.9.18
3.10.13
3.11.6
3.12.0
2 changes: 1 addition & 1 deletion puncover/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def __init__(self, collector):
"all_symbols": collector.all_symbols(),
"all_functions": collector.all_functions(),
"all_variables": collector.all_variables(),
"now": datetime.utcnow(),
"now": datetime.now(),
}

def render_template(self, template_name, file_name):
Expand Down
7 changes: 5 additions & 2 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ codecov==2.1.13
mock==4.0.3
pytest==7.0.1
pytest-cov==3.0.0
tox==3.27.1
tox-pyenv==1.1.0
tox==3.27.1 ; python_version < '3.12'
tox==4.11.3 ; python_version >= '3.12'

# 3.12 needs this for some reason 🤷
setuptools==68.2.2 ; python_version >= '3.12'

-r requirements.txt
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def run(self):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
packages=find_packages(exclude=["tests", "tests.*"]),
include_package_data=True,
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
# Python3.5 unit tests fail
envlist = py{36,37,38,39,3.10,3.11}
envlist = py{36,37,38,39,3.10,3.11,3.12}

[testenv]
deps = -rrequirements-test.txt
Expand Down