Visitar URL original
Read JSON variable files using JSON encoding detection by ShahadatTest · Pull Request #64 · pytest-dev/pytest-variables · GitHub
Skip to content

Read JSON variable files using JSON encoding detection - #64

Open
ShahadatTest wants to merge 1 commit into
pytest-dev:masterfrom
ShahadatTest:fix/json-variable-file-encodings
Open

ShahadatTest wants to merge 1 commit into
pytest-dev:masterfrom
ShahadatTest:fix/json-variable-file-encodings

Conversation

@ShahadatTest

Copy link
Copy Markdown

JSON variables files currently open as UTF-8 text, so valid UTF-8 BOM, UTF-16 and UTF-32 files fail during pytest configuration. Load JSON through a binary stream so the standard library detects its encoding. Other file-format loaders keep their existing text handling.

Seven actual-file integration regressions fail before the fix, including non-ASCII values and both byte orders. Full suite: 38 passed on Python 3.12 / pytest 9.1.1 and Python 3.10 / minimum pytest 7.0.0. Black 26.10.1, Flake8 7.4.1 and git diff --check pass. No matching open issue or PR was found.

AI assistance: OpenAI Codex (GPT-6). Original user request: new 14ta koro aro (make 14 more new contributions). Diff inspection was automated; no human review or personal production usage is claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant