Staging
v0.5.1
https://github.com/python/cpython
Revision bf838227c35212709dc43b3c3c57f8e1655c1d24 authored by Mark Sapiro on 19 October 2020, 22:49:19 UTC, committed by GitHub on 19 October 2020, 22:49:19 UTC


This PR replaces #1977. The reason for the replacement is two-fold.

The fix itself is different is that if the CTE header doesn't exist in the original message, it is inserted. This is important because the new CTE could be quoted-printable whereas the original is implicit 8bit.

Also the tests are different. The test_nonascii_as_string_without_cte test in #1977 doesn't actually test the issue in that it passes without the fix. The test_nonascii_as_string_without_content_type_and_cte test is improved here, and even though it doesn't fail without the fix, it is included for completeness.

Automerge-Triggered-By: @warsaw
1 parent 1438c2a
Raw File
Tip revision: bf838227c35212709dc43b3c3c57f8e1655c1d24 authored by Mark Sapiro on 19 October 2020, 22:49:19 UTC
bpo-27321 Fix email.generator.py to not replace a non-existent header. (GH-18074)
Tip revision: bf83822
windows-steps.yml
steps:
- checkout: self
  clean: false
  fetchDepth: 5

- powershell: |
    # Relocate build outputs outside of source directory to make cleaning faster
    Write-Host '##vso[task.setvariable variable=Py_IntDir]$(Build.BinariesDirectory)\obj'
    # UNDONE: Do not build to a different directory because of broken tests
    Write-Host '##vso[task.setvariable variable=Py_OutDir]$(Build.SourcesDirectory)\PCbuild'
    #Write-Host '##vso[task.setvariable variable=Py_OutDir]$(Build.BinariesDirectory)\bin'
    Write-Host '##vso[task.setvariable variable=EXTERNALS_DIR]$(Build.BinariesDirectory)\externals'
  displayName: Update build locations

- script: PCbuild\build.bat -e $(buildOpt)
  displayName: 'Build CPython'
  env:
    IncludeUwp: true

- script: python.bat -m test.pythoninfo
  displayName: 'Display build info'
  condition: and(succeeded(), variables['testRunPlatform'])

- script: PCbuild\rt.bat -q -uall -u-cpu -rwW --slowest --timeout=1200 -j0 --junit-xml="$(Build.BinariesDirectory)\test-results.xml" --tempdir="$(Build.BinariesDirectory)\test"
  displayName: 'Tests'
  condition: and(succeeded(), variables['testRunPlatform'])
  env:
    PREFIX: $(Py_OutDir)\$(arch)

- task: PublishTestResults@2
  displayName: 'Publish Test Results'
  inputs:
    testResultsFiles: '$(Build.BinariesDirectory)\test-results.xml'
    mergeTestResults: true
    testRunTitle: $(testRunTitle)
    platform: $(testRunPlatform)
  condition: and(succeededOrFailed(), variables['testRunPlatform'])
back to top