Skip to content

Commit 94385a1

Browse files
committed
Drop Python 3.9, test on Python 3.14, restructure package
1 parent 6ca866c commit 94385a1

File tree

4 files changed

+122
-183
lines changed

4 files changed

+122
-183
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ jobs:
1111
checks:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
15-
- uses: astral-sh/ruff-action@v1
14+
- uses: actions/checkout@v5
15+
- uses: astral-sh/ruff-action@v3
1616

1717
test:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
21+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@v5
2424
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v5
25+
uses: actions/setup-python@v6
2626
with:
2727
python-version: ${{ matrix.python-version }}
2828
- name: Setup uv
29-
uses: astral-sh/setup-uv@v3
29+
uses: astral-sh/setup-uv@v6
3030
- name: Run Tests
3131
run: uv run --no-dev -m unittest

pyproject.toml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[project]
22
name = "bbcode"
3-
dynamic = ["version"]
3+
version = "1.3.0"
44
description = "A pure python bbcode parser and formatter."
55
authors = [
66
{ name = "Dan Watson", email = "dcwatson@gmail.com" }
77
]
88
readme = "README.md"
9-
requires-python = ">= 3.9"
9+
requires-python = ">=3.10"
1010
license = { text = "BSD" }
1111
classifiers = [
1212
"Development Status :: 5 - Production/Stable",
@@ -25,17 +25,14 @@ Documentation = "https://dcwatson.github.io/bbcode/"
2525
bbcode = "bbcode:main"
2626

2727
[build-system]
28-
requires = ["hatchling"]
29-
build-backend = "hatchling.build"
30-
31-
[tool.hatch.version]
32-
path = "bbcode.py"
33-
34-
[tool.ruff.lint]
35-
extend-select = ["I"]
28+
requires = ["uv_build>=0.9.2,<0.10.0"]
29+
build-backend = "uv_build"
3630

3731
[dependency-groups]
3832
dev = [
3933
"mkdocs-material>=9.5.42",
4034
"mkdocs>=1.6.1",
4135
]
36+
37+
[tool.ruff.lint]
38+
extend-select = ["I"]

bbcode.py renamed to src/bbcode/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
import importlib.metadata
12
import re
23
import sys
34
from collections import OrderedDict
45
from collections.abc import Mapping, MutableMapping
56

6-
__version__ = "1.2.0"
7-
__version_info__ = tuple(int(num) for num in __version__.split("."))
7+
__version__ = importlib.metadata.version("bbcode")
8+
__version_info__ = tuple(
9+
int(num) if num.isdigit() else num for num in __version__.split(".")
10+
)
811

912

1013
# Adapted from http://daringfireball.net/2010/07/improved_regex_for_matching_urls

0 commit comments

Comments
 (0)