Skip to content

gh-130631: Make join_header_words() more similar to the original Perl version #130632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 9, 2025

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Feb 27, 2025

  • Always quote strings with non-ASCII characters.
  • Allow some non-separator and non-control characters (like "." or "-") be unquoted.
  • Always quote string that end with "\n".
  • Use the fullmatch() method for clarity and optimization.

…l Perl version

* Always quote strings with non-ASCII characters.
* Allow some non-separator and non-control characters (like "." or "-")
  be unquoted.
* Always quote string that end with "\n".
* Use the fullmatch() method for clarity and optimization.
@serhiy-storchaka serhiy-storchaka removed the needs backport to 3.12 only security fixes label Apr 9, 2025
@serhiy-storchaka serhiy-storchaka merged commit 7ebbd27 into python:main Apr 9, 2025
41 checks passed
@miss-islington-app
Copy link

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the join_header_words branch April 9, 2025 08:08
@miss-islington-app
Copy link

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 7ebbd271444d89218870169624921b795a717470 3.13

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Apr 9, 2025
…original Perl version (pythonGH-130632)

* Always quote strings with non-ASCII characters.
* Allow some non-separator and non-control characters (like "." or "-")
  be unquoted.
* Always quote strings that end with "\n".
* Use the fullmatch() method for clarity and optimization.
(cherry picked from commit 7ebbd27)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Apr 9, 2025

GH-132303 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Apr 9, 2025
serhiy-storchaka added a commit that referenced this pull request Apr 9, 2025
…al Perl version (GH-130632) (GH-132303)

* Always quote strings with non-ASCII characters.
* Allow some non-separator and non-control characters (like "." or "-")
  be unquoted.
* Always quote strings that end with "\n".
* Use the fullmatch() method for clarity and optimization.
(cherry picked from commit 7ebbd27)
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
…l Perl version (pythonGH-130632)

* Always quote strings with non-ASCII characters.
* Allow some non-separator and non-control characters (like "." or "-")
  be unquoted.
* Always quote strings that end with "\n".
* Use the fullmatch() method for clarity and optimization.
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