Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-26 Thread Nick Coghlan
On Thu, Nov 25, 2010 at 5:25 AM, Terry Reedy tjre...@udel.edu wrote:
 I know now that I could always edit with IDLE's editor, but it is a lot
 easier to right click and select edit than it is to run thru the directory
 tree in an open dialog.

If you want a decent free text editor on Windows, the open source
Notepad++ does a very nice job. It also adds an Edit with Notepad++
to the explorer context menu :)

 And of course, since the pseudo-BOM addition is
 undocumented within notepad itself, and probably other editors, it is easy
 to not know.

As far as the implicit BOM addition itself goes, reindent.py and
reindent-rst.py could probably be updated to check for it, but the
miscellaneous files (like ACKS) are likely to continue to need manual
checks.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-24 Thread Brett Cannon
On Tue, Nov 23, 2010 at 15:07, Terry Reedy tjre...@udel.edu wrote:


 On 11/23/2010 5:43 PM, Éric Araujo wrote:

 Modified: python/branches/py3k/Misc/ACKS

 ==
 --- python/branches/py3k/Misc/ACKS      (original)
 +++ python/branches/py3k/Misc/ACKS      Tue Nov 23 21:32:47 2010
 @@ -1,4 +1,4 @@
 -Acknowledgements
 +Acknowledgements

 This change introduced a so-called UTF-8 BOM in the file.  Is
 TortoiseSvn the culprit or a text editor?

 I used Notepad to edit the file, TortoiseSvn to commit, the same as I did
 for #9222, rev86702, Lib\idlelib\IOBinding.py, yesterday.
 If the latter is OK, perhaps *.py gets filtered better than misc. text
 files. I believe I have the config as specified in dev/faq.

Adding the BOM will be an editor thing, not a svn thing. Doing a
Google search for [ms notepad bom] shows that Notepad did the
helpful, invisible edit.

-Brett



 [miscellany]
 enable-auto-props = yes

 [auto-props]
 * = svn:eol-style=native
 *.c = svn:keywords=Id
 *.h = svn:keywords=Id
 *.py = svn:keywords=Id
 *.txt = svn:keywords=Author Date Id Revision

 Terry

 ___
 Python-Dev mailing list
 Python-Dev@python.org
 http://mail.python.org/mailman/listinfo/python-dev
 Unsubscribe:
 http://mail.python.org/mailman/options/python-dev/brett%40python.org

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-24 Thread Terry Reedy

On 11/24/2010 2:04 PM, Brett Cannon wrote:

On Tue, Nov 23, 2010 at 15:07, Terry Reedytjre...@udel.edu  wrote:



I used Notepad to edit the file, TortoiseSvn to commit, the same as I did
for #9222, rev86702, Lib\idlelib\IOBinding.py, yesterday.
If the latter is OK, perhaps *.py gets filtered better than misc. text
files. I believe I have the config as specified in dev/faq.


Adding the BOM will be an editor thing, not a svn thing. Doing a
Google search for [ms notepad bom] shows that Notepad did the
helpful, invisible edit.


So I presume it did the same with IOBinding.py. Does *.py get filtered 
is a way that could be extended to no-extention files? Do *.txt files 
get BOM filtered off? Should all text files in repository have some 
extension (default .txt)?


More to the point, can better filtering be added to the new hg 
repository? Or can a local Windows hg setup have such filtering on local 
commits before pushing?


I know now that I could always edit with IDLE's editor, but it is a lot 
easier to right click and select edit than it is to run thru the 
directory tree in an open dialog. And of course, since the pseudo-BOM 
addition is undocumented within notepad itself, and probably other 
editors, it is easy to not know.


--
Terry Jan Reedy

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-24 Thread Georg Brandl
Am 24.11.2010 20:25, schrieb Terry Reedy:
 On 11/24/2010 2:04 PM, Brett Cannon wrote:
 On Tue, Nov 23, 2010 at 15:07, Terry Reedytjre...@udel.edu  wrote:
 
 I used Notepad to edit the file, TortoiseSvn to commit, the same as I did
 for #9222, rev86702, Lib\idlelib\IOBinding.py, yesterday.
 If the latter is OK, perhaps *.py gets filtered better than misc. text
 files. I believe I have the config as specified in dev/faq.

 Adding the BOM will be an editor thing, not a svn thing. Doing a
 Google search for [ms notepad bom] shows that Notepad did the
 helpful, invisible edit.
 
 So I presume it did the same with IOBinding.py. Does *.py get filtered 
 is a way that could be extended to no-extention files? Do *.txt files 
 get BOM filtered off? Should all text files in repository have some 
 extension (default .txt)?
 
 More to the point, can better filtering be added to the new hg 
 repository? Or can a local Windows hg setup have such filtering on local 
 commits before pushing?

Of course it can; it's just a matter of writing the respective hooks.
What we *can* do in any case is to check for UTF-8 BOMs server-side
in the whitespace checking hook.

 I know now that I could always edit with IDLE's editor, but it is a lot 
 easier to right click and select edit than it is to run thru the 
 directory tree in an open dialog. And of course, since the pseudo-BOM 
 addition is undocumented within notepad itself, and probably other 
 editors, it is easy to not know.

It should show up as an invisible change in the first line of a file when you
look at a svn diff.  (It is a very good practice to look at a diff before
committing anyway.)

Georg


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-24 Thread Martin v. Löwis
 So I presume it did the same with IOBinding.py.

No. This file contains only ASCII characters, so notepad has decided
to not add the BOM.

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-24 Thread Terry Reedy

On 11/24/2010 3:04 PM, Georg Brandl wrote:


Adding the BOM will be an editor thing, not a svn thing. Doing a



It should show up as an invisible change in the first line of a file when you
look at a svn diff.  (It is a very good practice to look at a diff before
committing anyway.)


It does show up, and yes I agree. That should be in dev/faq if not already

--
Terry Jan Reedy

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-24 Thread Terry Reedy

On 11/24/2010 5:13 PM, Martin v. Löwis wrote:

So I presume it did the same with IOBinding.py.


No. This file contains only ASCII characters, so notepad has decided
to not add the BOM.


Or it somehow got removed from the .py file. I tried with another .py 
file (and reverted!) and the diff showed the invisible change to the 
first line that Georg predicted.


--
Terry Jan Reedy


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] r86720 - python/branches/py3k/Misc/ACKS

2010-11-23 Thread Terry Reedy



On 11/23/2010 5:43 PM, Éric Araujo wrote:

Modified: python/branches/py3k/Misc/ACKS
==
--- python/branches/py3k/Misc/ACKS  (original)
+++ python/branches/py3k/Misc/ACKS  Tue Nov 23 21:32:47 2010
@@ -1,4 +1,4 @@
-Acknowledgements
+Acknowledgements


This change introduced a so-called UTF-8 BOM in the file.  Is
TortoiseSvn the culprit or a text editor?


I used Notepad to edit the file, TortoiseSvn to commit, the same as I 
did for #9222, rev86702, Lib\idlelib\IOBinding.py, yesterday.
If the latter is OK, perhaps *.py gets filtered better than misc. text 
files. I believe I have the config as specified in dev/faq.


[miscellany]
enable-auto-props = yes

[auto-props]
* = svn:eol-style=native
*.c = svn:keywords=Id
*.h = svn:keywords=Id
*.py = svn:keywords=Id
*.txt = svn:keywords=Author Date Id Revision

Terry

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com