Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(82979)

#2052: Allow changing difflib._file_template character encoding.

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 3 months ago by josephoenix
Modified:
4 years, 5 months ago
Reviewers:
storchaka, berker.peksag
CC:
terry.reedy, josephoenix, ezio.melotti, r.david.murray, devnull_psf.upfronthosting.co.za, berkerpeksag, storchaka, cabezon.hashimoto_gmail.com
Visibility:
Public.

Patch Set 1 #

Total comments: 4

Patch Set 2 #

Patch Set 3 #

Patch Set 4 #

Total comments: 8

Patch Set 5 #

Total comments: 6

Patch Set 6 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/difflib.rst View 1 2 3 4 5 2 chunks +6 lines, -1 line 0 comments Download
Doc/whatsnew/3.5.rst View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
Lib/difflib.py View 1 2 3 4 5 2 chunks +11 lines, -8 lines 0 comments Download
Lib/test/test_difflib_expect.html View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
Lib/test/test_difflib.py View 1 2 3 4 5 2 chunks +35 lines, -0 lines 0 comments Download

Messages

Total messages: 7
storchaka_gmail.com
http://bugs.python.org/review/2052/diff/11867/Doc/library/difflib.rst File Doc/library/difflib.rst (right): http://bugs.python.org/review/2052/diff/11867/Doc/library/difflib.rst#newcode108 Doc/library/difflib.rst:108: numlines=5, charset='utf-8') make_file has too many parameters. To specify ...
4 years, 5 months ago #1
berkerpeksag
http://bugs.python.org/review/2052/diff/11867/Doc/library/difflib.rst File Doc/library/difflib.rst (right): http://bugs.python.org/review/2052/diff/11867/Doc/library/difflib.rst#newcode108 Doc/library/difflib.rst:108: numlines=5, charset='utf-8') On 2015/03/06 22:26:01, storchaka wrote: > make_file ...
4 years, 5 months ago #2
storchaka_gmail.com
http://bugs.python.org/review/2052/diff/14183/Lib/difflib.py File Lib/difflib.py (right): http://bugs.python.org/review/2052/diff/14183/Lib/difflib.py#newcode1688 Lib/difflib.py:1688: def make_file(self, fromlines, tolines, fromdesc='', todesc='', context=False, Too long ...
4 years, 5 months ago #3
berkerpeksag
http://bugs.python.org/review/2052/diff/14183/Lib/difflib.py File Lib/difflib.py (right): http://bugs.python.org/review/2052/diff/14183/Lib/difflib.py#newcode1688 Lib/difflib.py:1688: def make_file(self, fromlines, tolines, fromdesc='', todesc='', context=False, On 2015/03/13 ...
4 years, 5 months ago #4
berkerpeksag
http://bugs.python.org/review/2052/diff/14183/Lib/test/test_difflib.py File Lib/test/test_difflib.py (right): http://bugs.python.org/review/2052/diff/14183/Lib/test/test_difflib.py#newcode232 Lib/test/test_difflib.py:232: def test_make_file_iso88591_charset(self): On 2015/03/13 21:37:42, storchaka wrote: > Could ...
4 years, 5 months ago #5
storchaka_gmail.com
https://bugs.python.org/review/2052/diff/14191/Doc/library/difflib.rst File Doc/library/difflib.rst (right): https://bugs.python.org/review/2052/diff/14191/Doc/library/difflib.rst#newcode128 Doc/library/difflib.rst:128: *charset* keyword-only argument was added. The default charset of ...
4 years, 5 months ago #6
berkerpeksag
4 years, 5 months ago #7
https://bugs.python.org/review/2052/diff/14191/Doc/library/difflib.rst
File Doc/library/difflib.rst (right):

https://bugs.python.org/review/2052/diff/14191/Doc/library/difflib.rst#newcod...
Doc/library/difflib.rst:128: *charset* keyword-only argument was added. The
default charset of HTML document
On 2015/03/14 18:29:13, storchaka wrote:
> PEP8: "Limit all lines to a maximum of 79 characters."
> 
> PEP8: "You should use two spaces after a sentence-ending period."

Done.

https://bugs.python.org/review/2052/diff/14191/Doc/whatsnew/3.5.rst
File Doc/whatsnew/3.5.rst (right):

https://bugs.python.org/review/2052/diff/14191/Doc/whatsnew/3.5.rst#newcode232
Doc/whatsnew/3.5.rst:232: can now be customized by using *charset* keyword-only
parameter. The default
On 2015/03/14 18:29:13, storchaka wrote:
> The same about a period.

Done.

https://bugs.python.org/review/2052/diff/14191/Lib/difflib.py
File Lib/difflib.py (right):

https://bugs.python.org/review/2052/diff/14191/Lib/difflib.py#newcode1709
Lib/difflib.py:1709: styles = self._styles.encode(charset,
On 2015/03/14 18:29:13, storchaka wrote:
> Oh, I meant to do the encoding/decoding dance on formatted result, not every
> component.
> 
> return (self._file_template % dict(
>             styles=styles,
>             legend=legend,
>             table=table,
>             charset=charset
>         )).encode(charset, 'xmlcharrefreplace').decode(charset)

Done.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+