Skip to content

Commit

Permalink
Declare support for Python 3.12
Browse files Browse the repository at this point in the history
 - Add testing for v3.13 prereleases
 - Run tests monthly
 - Update checkout action
 - Remove testing for unsupported releases since the CI tends to break
   and they're not getting any updates anyway.
  • Loading branch information
pR0Ps committed Feb 2, 2024
1 parent 81777e5 commit 8f7a9aa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 41 deletions.
47 changes: 7 additions & 40 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
push:
branches:
- master
# Run it every month to make sure it still works
schedule:
- cron: '0 0 1 * *'
jobs:
build:
name: tests
Expand All @@ -16,56 +19,20 @@ jobs:
- macos-latest
- windows-latest
python-version:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
# coverage (used by pytest-cov) fails to install on 3.4 (setup.py contains an f-string)
#- "3.4"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12-dev"
- "3.12"
- "3.13-dev"
- "pypy2.7"
- "pypy3.6"
- "pypy3.7"
- "pypy3.8"
- "pypy3.9"
exclude:
# https://foss.heptapod.net/pypy/pypy/-/issues/3314
- os: macos-latest
python-version: "pypy3.6"
# PyPy v3.6 not available on Windows
- os: windows-latest
python-version: "pypy3.6"
# 3.5 and 3.6 no longer available on ubuntu-latest
- os: ubuntu-latest
python-version: "3.5"
- os: ubuntu-latest
python-version: "3.6"
# Python v3.0-v3.3 can only be installed on Windows
- python-version: "3.0"
- python-version: "3.1"
- python-version: "3.2"
- python-version: "3.3"
include:
- os: windows-latest
python-version: "3.0"
- os: windows-latest
python-version: "3.1"
- os: windows-latest
python-version: "3.2"
- os: windows-latest
python-version: "3.3"
- "pypy3.10"
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python v${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ bracelogger
A Python library that enables using the brace-style string formatting in log messages.

Features:
- Supports a wide range of Python versions (v2.7 - v3.10)
- Supports a wide range of Python versions (v2.7 - v3.12)
- No dependencies
- Easy to use - no special syntax required
- Easy to transition to from stdlib logging - just change the `logging.getLogger` calls and message
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"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",
"Intended Audience :: Developers",
Expand Down
4 changes: 4 additions & 0 deletions tests/test_bracelogger.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python

import logging
import sys

import bracelogger

Expand Down Expand Up @@ -96,6 +97,9 @@ def test_all_levels(caplog):
"""Test logging at all documented levels"""

LEVELS = ("debug", "info", "warn", "warning", "error", "exception", "critical", "fatal")
if sys.version_info >= (3, 13):
LEVELS.remove("warn") # has been deprecated since 3.1, finally removed in v3.13

TEMPLATE = "This is a {}-level log"

caplog.set_level(1) # capture everything
Expand Down

0 comments on commit 8f7a9aa

Please sign in to comment.