Skip to content

Commit 9aef0cc

Browse files
Update all non-major dependencies (#1100)
* Update all non-major dependencies * up pydantic * fix import * change py versions * fix tests to not use telnetlib --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: clavedeluna <danalitovsky+git@gmail.com>
1 parent bade5dc commit 9aef0cc

File tree

12 files changed

+29
-23
lines changed

12 files changed

+29
-23
lines changed

.github/workflows/autoformat-pixeebot-prs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Python
1919
uses: actions/setup-python@v6
2020
with:
21-
python-version: "3.13"
21+
python-version: "3.14"
2222

2323
- name: Install black
2424
run: pip install black

.github/workflows/codemod_pygoat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set Up Python
2727
uses: actions/setup-python@v6
2828
with:
29-
python-version: '3.13'
29+
python-version: '3.14'
3030
cache: 'pip'
3131
- name: Install Codemodder Package
3232
run: pip install .

.github/workflows/deploy_to_pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Set Up Python
1515
uses: actions/setup-python@v6
1616
with:
17-
python-version: '3.13'
17+
python-version: '3.14'
1818
- name: Check out code
1919
uses: actions/checkout@v5
2020
- name: Install build dependencies

.github/workflows/integration_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
timeout-minutes: 15
2323
strategy:
2424
matrix:
25-
python-version: ['3.10', '3.11', '3.12']
25+
python-version: ['3.12', '3.13', '3.14']
2626
steps:
2727
- name: Check out code
2828
uses: actions/checkout@v5

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Set Up Python
2727
uses: actions/setup-python@v6
2828
with:
29-
python-version: '3.13'
29+
python-version: '3.14'
3030
cache: 'pip'
3131
- name: Install Dependencies
3232
run: |

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Set Up Python
3131
uses: actions/setup-python@v6
3232
with:
33-
python-version: '3.13'
33+
python-version: '3.14'
3434
cache: 'pip'
3535
- name: Install build dependencies
3636
run: pip install build twine
@@ -49,7 +49,7 @@ jobs:
4949
- name: Set Up Python
5050
uses: actions/setup-python@v6
5151
with:
52-
python-version: '3.13'
52+
python-version: '3.14'
5353
cache: 'pip'
5454
- name: Install Codemodder Package
5555
# Only install what most users would, not optional dependencies
@@ -62,7 +62,7 @@ jobs:
6262
timeout-minutes: 25
6363
strategy:
6464
matrix:
65-
python-version: ['3.10', '3.11', '3.12']
65+
python-version: ['3.12', '3.13', '3.14']
6666
steps:
6767
- name: Check out code
6868
uses: actions/checkout@v5

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.13
1+
FROM python:3.14
22
WORKDIR /codemodder
33
COPY . .
44

integration_tests/sonar/test_sonar_use_secure_protocols.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ class TestSonarUseSecureProtocols(SonarIntegrationTest):
1010
code_path = "tests/samples/use_secure_protocols.py"
1111
replacement_lines = [
1212
(
13-
5,
13+
4,
1414
"""url = "https://example.com"\n""",
1515
),
1616
]
1717
# fmt: off
1818
expected_diff = (
1919
"""--- \n"""
2020
"""+++ \n"""
21-
"""@@ -2,4 +2,4 @@\n"""
21+
"""@@ -1,4 +1,4 @@\n"""
22+
''' import ftplib\n'''
2223
''' import smtplib\n'''
23-
''' import telnetlib\n'''
2424
''' \n'''
2525
'''-url = "http://example.com"\n'''
2626
'''+url = "https://example.com"\n'''
2727
)
2828
# fmt: on
29-
expected_line_change = "5"
29+
expected_line_change = "4"
3030
change_description = SonarUseSecureProtocolsTransformer.change_description

pyproject.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,24 @@ dependencies = [
1616
"isort>=6.1,<7",
1717
"libcst>=1.8,<1.9",
1818
"packaging>=24.2,<25.1",
19-
"pydantic~=2.11.5",
19+
"pydantic~=2.12.3",
2020
"pylint>=4,<4.1",
2121
"python-json-logger~=4.0.0",
2222
"PyYAML~=6.0.0",
2323
"toml~=0.10.2",
2424
"tomlkit~=0.13.0",
2525
"wrapt~=1.17.0",
2626
"chardet~=5.2.0",
27-
"sarif-pydantic~=0.5.1",
27+
"sarif-pydantic~=0.6.1",
2828
"setuptools~=80.0",
2929
]
3030
keywords = ["codemod", "codemods", "security", "fix", "fixes"]
3131
classifiers = [
3232
"Development Status :: 4 - Beta",
3333
"Intended Audience :: Developers",
3434
"License :: OSI Approved :: GNU Affero General Public License v3",
35+
"Programming Language :: Python :: 3.14",
36+
"Programming Language :: Python :: 3.13",
3537
"Programming Language :: Python :: 3.12",
3638
"Programming Language :: Python :: 3.11",
3739
"Programming Language :: Python :: 3.10",
@@ -51,11 +53,11 @@ get-hashes = 'codemodder.scripts.get_hashes:main'
5153

5254
[project.optional-dependencies]
5355
semgrep = [
54-
"semgrep>=1.134,<1.135",
56+
"semgrep>=1.140,<1.141",
5557
]
5658
test = [
5759
"azure-ai-inference>=1.0.0b1,<2.0",
58-
"coverage>=7.10,<7.11",
60+
"coverage>=7.11,<7.12",
5961
"coverage-threshold~=0.4",
6062
"defusedxml==0.7.1",
6163
"types-defusedxml==0.7.0.20250822",
@@ -86,7 +88,7 @@ test = [
8688
"fickling~=0.1.0,>=0.1.3",
8789
"graphql-server~=3.0.0b9",
8890
"unidiff>=0.7.5",
89-
"semgrep>=1.134,<1.135",
91+
"semgrep>=1.140,<1.141",
9092
]
9193
complexity = [
9294
"radon==6.0.*",

src/codemodder/codemods/base_codemod.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@
22

33
import functools
44
import importlib.resources
5+
import sys
56
from abc import ABCMeta, abstractmethod
67
from concurrent.futures import ThreadPoolExecutor
78
from dataclasses import dataclass, field
89
from enum import Enum
910
from functools import cached_property
10-
from importlib.abc import Traversable
1111
from pathlib import Path
1212

13+
if sys.version_info >= (3, 14):
14+
from importlib.resources.abc import Traversable
15+
else:
16+
from importlib.abc import Traversable
17+
1318
from codemodder.code_directory import file_line_patterns
1419
from codemodder.codemods.base_detector import BaseDetector
1520
from codemodder.codemods.base_transformer import BaseTransformerPipeline

0 commit comments

Comments
 (0)