Repository navigation
Conversation
Unescaped triple quotes in -m messages terminated the generated module docstring and allowed the remainder to execute on import. Backslashes were also interpreted as Python escapes, so script.doc did not round-trip. Escape both before template render. Fixes sqlalchemy#1879.
|
Hi, and thanks for the pull request! This project accepts pull requests only for issues that a maintainer has already marked with the open for pull requests label. That way we can settle on an approach before anyone spends time writing code. This pull request references issue #1879, which hasn't been marked open for pull requests, so the change isn't authorized yet and I'm closing it automatically. Once a maintainer adds the label to #1879, reopen this pull request and it will stay open. If #1879 needs more detail before that can happen, a complete runnable example is usually the missing piece, and adding one to the issue is the fastest way to get there. This is automatic and procedural. It isn't a judgment on your change, and nothing you've written here is lost. Thanks for your interest in the project! |
Summary
Revision
-mmessages are rendered into a triple-quoted docstring by every built-inscript.py.mako. Unescaped"""terminated that docstring (remaining text ran as module code on import), and backslashes were interpreted as Python escapes soscript.docdid not round-trip.Escape the message in
generate_revision()before template render.Fixes #1879.
Test plan
script.docRevisionCommandTest.test_create_script_basicstill passes