Bug report
Bug description:
When running the code below it causes ~143,000 disk operations to read in the entire file. This is because it is doing 2 bytes at a time for some reason.
import ssl
import certifi
ssl.create_default_context(cafile=certifi.where())
How to replicate
- Download & Run Procmon https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
- Make sure you aren't running any other Python code to make the capture easier
- In the filter window have it filter for
Process Name contains python
- Make sure Procmon is capturing
- Run the python program above
- Observe all the disk operations

If reading the file normally with open then it behaves as expected and only does a handful of calls
CPython versions tested on:
3.13
Operating systems tested on:
Windows
Linked PRs
Bug report
Bug description:
When running the code below it causes ~143,000 disk operations to read in the entire file. This is because it is doing 2 bytes at a time for some reason.
How to replicate
Process NamecontainspythonIf reading the file normally with
openthen it behaves as expected and only does a handful of callsCPython versions tested on:
3.13
Operating systems tested on:
Windows
Linked PRs