close
Skip to content

gh-148192: Fix Generator._make_boundary behavior with CRLF line endings.#148193

Open
henryivesjones wants to merge 3 commits intopython:mainfrom
henryivesjones:email-generator-crlf-boundary
Open

gh-148192: Fix Generator._make_boundary behavior with CRLF line endings.#148193
henryivesjones wants to merge 3 commits intopython:mainfrom
henryivesjones:email-generator-crlf-boundary

Conversation

@henryivesjones
Copy link
Copy Markdown

@henryivesjones henryivesjones commented Apr 7, 2026

The Generator._make_boundary regex does not match on boundary phrases correctly when using CRLF line endings due to re.MULTILINE not considering \r\n as a line ending.

Issue: #148192

The Generator._make_boundary regex does not match on boundary phrases correctly when using CRLF line endings due to re.MULTILINE not considering \r\n as a line ending.
@python-cla-bot
Copy link
Copy Markdown

python-cla-bot bot commented Apr 7, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@henryivesjones
Copy link
Copy Markdown
Author

The failing test seems to just be flaky? I ran just that one test 4 times and 2 passed and 2 failed.

cpython % ./python.exe -m test -j 14 test_perf_profiler
Raised RLIMIT_NOFILE: 256 -> 1024
Using random seed: 1400475968
0:00:00 load avg: 4.26 Run 1 test in parallel using 1 worker process
0:00:00 load avg: 4.26 [1/1] test_perf_profiler passed

== Tests result: SUCCESS ==

1 test OK.

Total duration: 394 ms
Total tests: run=14 skipped=5
Total test files: run=1/1
Result: SUCCESS
cpython % ./python.exe -m test -j 14 test_perf_profiler
Raised RLIMIT_NOFILE: 256 -> 1024
Using random seed: 1646608690
0:00:00 load avg: 4.26 Run 1 test in parallel using 1 worker process
0:00:00 load avg: 4.26 [1/1/1] test_perf_profiler failed (1 failure)
test test_perf_profiler failed -- Traceback (most recent call last):
  File "/Users/hjones/git/forks/cpython/Lib/test/test_perf_profiler.py", line 145, in test_trampoline_works_with_forks
    self.assertEqual(process.returncode, 0)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 11 != 0


== Tests result: FAILURE ==

1 test failed:
    test_perf_profiler

Total duration: 393 ms
Total tests: run=14 failures=1 skipped=5
Total test files: run=1/1 failed=1
Result: FAILURE
cpython % ./python.exe -m test -j 14 test_perf_profiler
Raised RLIMIT_NOFILE: 256 -> 1024
Using random seed: 2888117323
0:00:00 load avg: 3.52 Run 1 test in parallel using 1 worker process
0:00:00 load avg: 3.52 [1/1/1] test_perf_profiler failed (1 failure)
test test_perf_profiler failed -- Traceback (most recent call last):
  File "/Users/hjones/git/forks/cpython/Lib/test/test_perf_profiler.py", line 145, in test_trampoline_works_with_forks
    self.assertEqual(process.returncode, 0)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 11 != 0


== Tests result: FAILURE ==

1 test failed:
    test_perf_profiler

Total duration: 388 ms
Total tests: run=14 failures=1 skipped=5
Total test files: run=1/1 failed=1
Result: FAILURE
cpython % ./python.exe -m test -j 14 test_perf_profiler
Raised RLIMIT_NOFILE: 256 -> 1024
Using random seed: 164762511
0:00:00 load avg: 3.52 Run 1 test in parallel using 1 worker process
0:00:00 load avg: 3.52 [1/1] test_perf_profiler passed

== Tests result: SUCCESS ==

1 test OK.

Total duration: 388 ms
Total tests: run=14 skipped=5
Total test files: run=1/1
Result: SUCCESS

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant