Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes gh-3246
This gets things working again. I'm still having a think about whether the remaining API details (stripping email quotes) can be moved into the core input transformers, but this fixes the problem.
This means that automagics won't work in pasted code. I think that's a good idea, because trying to apply automagics widely leads to bizarre and confusing bugs like #3334. Most code that people run using %paste is probably pure-Python code anyway.
Also, if you use
%paste foo
to transfer the clipboard contents to a variable, there's no obvious reason to expect that the content is Python code, so it now stores the raw string instead of trying to clean it up as code.