Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ updates:
open-pull-requests-limit: 10
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "chore"
include: "scope"
Expand All @@ -23,7 +22,6 @@ updates:
open-pull-requests-limit: 10
labels:
- "dependencies"
- "python"
commit-message:
prefix: "chore"
include: "scope"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.11'

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.10'

Expand All @@ -44,10 +44,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.10'

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand All @@ -40,9 +40,9 @@ jobs:

- name: Upload coverage to Codecov
if: matrix.python-version == '3.10'
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml
files: ./coverage.xml # Changed from 'file' to 'files'
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
5 changes: 4 additions & 1 deletion maskerlogger/masker_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import re
from abc import ABC

from pythonjsonlogger import jsonlogger
try:
from pythonjsonlogger import json as jsonlogger
except ImportError:
from pythonjsonlogger import jsonlogger
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Import Fallback: Module Identity Crisis

The import fallback logic is incorrect. When from pythonjsonlogger import json as jsonlogger succeeds, jsonlogger becomes the json submodule, but the code later accesses jsonlogger.JsonFormatter which expects jsonlogger to be the jsonlogger module itself. This will cause an AttributeError when using python-json-logger version 3.x where the import path changed. The try/except should import the class directly or use different attribute paths for each version.

Fix in Cursor Fix in Web


from maskerlogger.ahocorasick_regex_match import RegexMatcher
from maskerlogger.utils import TimeoutException
Expand Down
114 changes: 68 additions & 46 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Tracker = "https://github.com/oxsecurity/MaskerLogger/issues"
packages = [{include = "maskerlogger"}]

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
pytest-cov = "^4.1.0"
ruff = "^0.1.0"
pre-commit = "^3.5.0"
pytest = "^9.0.0"
pytest-cov = "^7.0.0"
ruff = "^0.14.4"
pre-commit = "^4.4.0"
mypy = "^1.7.0"

[build-system]
Expand Down
Loading