-- sys -------------------------------------------------------
coverage_version: 7.5.1
coverage_module: C:\Python312\Lib\site-packages\coverage\__init__.py
core: -none-
CTracer: available
plugins.file_tracers: -none-
plugins.configurers: -none-
plugins.context_switchers: -none-
configs_attempted: C:\Users\cuzi\Desktop\coverage_large_dict\.coveragerc
C:\Users\cuzi\Desktop\coverage_large_dict\setup.cfg
C:\Users\cuzi\Desktop\coverage_large_dict\tox.ini
C:\Users\cuzi\Desktop\coverage_large_dict\pyproject.toml
configs_read: C:\Users\cuzi\Desktop\coverage_large_dict\pyproject.toml
config_file: None
config_contents: -none-
data_file: -none-
python: 3.12.3 (tags/v3.12.3:f6650f9, Apr 9 2024, 14:05:25) [MSC v.1938 64 bit (AMD64)]
platform: Windows-11-10.0.22621-SP0
implementation: CPython
executable: C:\Python312\python.exe
def_encoding: utf-8
fs_encoding: utf-8
pid: 4188
cwd: C:\Users\cuzi\Desktop\coverage_large_dict
path: C:\Python312\Scripts\coverage.exe
C:\Python312\python312.zip
C:\Python312\DLLs
C:\Python312\Lib
C:\Python312
C:\Python312\Lib\site-packages
environment: COVERAGE_CORE = sysmon
TEMP = C:\Users\cuzi\AppData\Local\Temp
TMP = C:\Users\cuzi\AppData\Local\Temp
command_line: C:\Python312\Scripts\coverage debug sys
sqlite3_sqlite_version: 3.45.1
sqlite3_temp_store: 0
sqlite3_compile_options: ATOMIC_INTRINSICS=0, COMPILER=msvc-1938, DEFAULT_AUTOVACUUM,
DEFAULT_CACHE_SIZE=-2000, DEFAULT_FILE_FORMAT=4,
DEFAULT_JOURNAL_SIZE_LIMIT=-1, DEFAULT_MMAP_SIZE=0, DEFAULT_PAGE_SIZE=4096,
DEFAULT_PCACHE_INITSZ=20, DEFAULT_RECURSIVE_TRIGGERS,
DEFAULT_SECTOR_SIZE=4096, DEFAULT_SYNCHRONOUS=2,
DEFAULT_WAL_AUTOCHECKPOINT=1000, DEFAULT_WAL_SYNCHRONOUS=2,
DEFAULT_WORKER_THREADS=0, DIRECT_OVERFLOW_READ, ENABLE_FTS3, ENABLE_FTS4,
ENABLE_FTS5, ENABLE_MATH_FUNCTIONS, ENABLE_RTREE, MALLOC_SOFT_LIMIT=1024,
MAX_ATTACHED=10, MAX_COLUMN=2000, MAX_COMPOUND_SELECT=500,
MAX_DEFAULT_PAGE_SIZE=8192, MAX_EXPR_DEPTH=1000, MAX_FUNCTION_ARG=127,
MAX_LENGTH=1000000000, MAX_LIKE_PATTERN_LENGTH=50000,
MAX_MMAP_SIZE=0x7fff0000, MAX_PAGE_COUNT=0xfffffffe, MAX_PAGE_SIZE=65536,
MAX_SQL_LENGTH=1000000000, MAX_TRIGGER_DEPTH=1000,
MAX_VARIABLE_NUMBER=32766, MAX_VDBE_OP=250000000, MAX_WORKER_THREADS=8,
MUTEX_W32, OMIT_AUTOINIT, SYSTEM_MALLOC, TEMP_STORE=1, THREADSAFE=1
Describe the bug
On Python 3.12 an error occurs in
coverage report, lower Python versions seem to be fine:CI logs: https://github.com/cvzi/coverage_large_dict/actions/runs/9125997761/job/25093333034
To Reproduce
Python 3.12 on Windows and Ubuntu
coverage.py 7.5.1 with C extension
coverage debug sys
What versions of what packages do you have installed? Only coverage and pytest 8.2.0
What code shows the problem? I suspect it's the large dictionary as a literal in a single line that causes the problem. Something like this:
See this 3 MB file: https://github.com/cvzi/coverage_large_dict/blob/main/largedict/__init__.py
What commands should we run to reproduce the problem?
This repository is a minimal example: https://github.com/cvzi/coverage_large_dict
Additional context
When the same large dictionary is formated in a pretty way with newlines and spaces, the problem doesn't occur