Skip to content

Commit 79d5365

Browse files
authored
feat: Python 3.14 support (#28)
1 parent 363b006 commit 79d5365

9 files changed

Lines changed: 141 additions & 257 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,17 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
14+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15", "3.16", "3.17", "3.18", "3.19", "3.20"]
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v6
1818
with:
1919
fetch-depth: 0
2020
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v6
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Run tests
2525
run: |
2626
python -m pip install --upgrade pip
2727
sh test.sh
28-
- name: SonarCloud Scan
29-
if: ${{ matrix.python-version == '3.10'}}
30-
uses: sonarsource/sonarcloud-github-action@master
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.SONAR_GITHUB_TOKEN }}
33-
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
34-
with:
35-
args: >
36-
-Dsonar.organization=rogervila-github
37-
-Dsonar.projectKey=rogervila_python_carbon
38-
-Dsonar.python.coverage.reportPaths=coverage.xml
39-
-Dsonar.python.version=3.10
40-
-Dsonar.sources=.
41-
-Dsonar.exclusions=tests/**
42-
-Dsonar.test.exclusions=tests/**
43-
-Dsonar.tests=tests/
44-
-Dsonar.verbose=true

.github/workflows/pull_request.yml

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,18 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
11+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1212

1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v6
1616
with:
1717
fetch-depth: 0
1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
19+
uses: actions/setup-python@v6
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Run tests
2323
run: |
2424
python -m pip install --upgrade pip
2525
sh test.sh
26-
- name: Get PR author
27-
id: get_author
28-
run: echo ::set-output name=AUTHOR::${{ github.event.pull_request.user.login }}
29-
- name: SonarCloud Scan
30-
if: ${{ matrix.python-version == '3.10' && steps.get_author.outputs.AUTHOR == 'rogervila' }}
31-
uses: sonarsource/sonarcloud-github-action@master
32-
env:
33-
GITHUB_TOKEN: ${{ secrets.SONAR_GITHUB_TOKEN }}
34-
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
35-
with:
36-
args: >
37-
-Dsonar.organization=rogervila-github
38-
-Dsonar.projectKey=rogervila_python_carbon
39-
-Dsonar.python.version=3.10
40-
-Dsonar.python.coverage.reportPaths=coverage.xml
41-
-Dsonar.sources=.
42-
-Dsonar.exclusions=tests/**
43-
-Dsonar.test.exclusions=tests/**
44-
-Dsonar.tests=tests/
45-
-Dsonar.verbose=true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ build/
77
htmlcov/
88
*.dat
99
MANIFEST
10+
.vscode/

.pylintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[MASTER]
2+
ignore=.github
3+
4+
[MESSAGES CONTROL]
5+
disable = dangerous-default-value,unnecessary-lambda,broad-except,line-too-long,invalid-name,no-name-in-module,missing-module-docstring,missing-class-docstring,missing-function-docstring,eval-used,bare-except,broad-except,too-few-public-methods,import-outside-toplevel,wildcard-import,unused-wildcard-import,pointless-string-statement

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Roger Vilà
3+
Copyright (c) 2026 Roger Vilà
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
<p align="center"><img src="https://i.ibb.co/QHSzYBs/python-carbon.png" alt="rogervila/python_carbon" /></p>
44

5-
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=rogervila_python_carbon&metric=coverage)](https://sonarcloud.io/dashboard?id=rogervila_python_carbon)
6-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=rogervila_python_carbon&metric=alert_status)](https://sonarcloud.io/dashboard?id=rogervila_python_carbon)
7-
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=rogervila_python_carbon&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=rogervila_python_carbon)
8-
5+
[![PyPI version](https://badge.fury.io/py/python-carbon.svg)](https://badge.fury.io/py/python-carbon)
6+
![PyPI - Downloads](https://img.shields.io/pypi/dm/python-carbon)
97

108
PHP Carbon library adapted for python.
119

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,10 @@
2525
'Topic :: Software Development :: Build Tools',
2626
'License :: OSI Approved :: MIT License',
2727
'Programming Language :: Python :: 3.9',
28+
'Programming Language :: Python :: 3.10',
29+
'Programming Language :: Python :: 3.11',
30+
'Programming Language :: Python :: 3.12',
31+
'Programming Language :: Python :: 3.13',
32+
'Programming Language :: Python :: 3.14',
2833
],
2934
)

test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env sh
22

33
pip install --user coverage -U
4-
pip install --user python-dateutil>=2 -U
4+
pip install --user "python-dateutil>=2" -U
55

6-
coverage run -m unittest discover || exit 1
7-
coverage xml -i || exit 1
6+
python -m coverage run -m unittest discover || exit 1
7+
python -m coverage xml -i || exit 1
88

99
[ -f coverage.xml ] || exit 1

0 commit comments

Comments
 (0)