Thread: [Rest2web-develop] Problem with keywords in python source
Brought to you by:
mjfoord
From: Grzegorz A. H. <gr...@ti...> - 2006-12-06 20:10:06
|
At some point I performed a checkout and running it generated: /home/gradha/instalacion_manual/rest2web-dist-229/rest2web/restprocessor.= py:41: DeprecationWarning: Non-ASCII character '\xc3' in file /home/gradh= a/instalacion_manual/rest2web-dist-229/rest2web/restindex.py on line 4, b= ut no encoding declared; see http://www.python.org/peps/pep-0263.html for= details from rest2web.restindex import read_restindex, default_keywords, defaul= t_restindex Looking at the culprit, it is the expanded svn keyword LastChangedDate which expands on my sistem to "2006-10-11 00:50:49 +0200 (mi=C3=A9, 11 oct 2006)". This is an evil feature carried from CVS. Depending on future versions this warning may become an error, in which case performing checkouts of python source from svn on non-English locales may be impossible. Personally I see no use in expanded keywords (they were good when you had to share code printing it on paper, but today...) which are also a threat to clean merges between development branches, but there you go. Know that it can be problematic. |
From: Michael F. <fuz...@vo...> - 2006-12-06 23:19:38
|
Grzegorz Adam Hankiewicz wrote: > At some point I performed a checkout and running it generated: > > /home/gradha/instalacion_manual/rest2web-dist-229/rest2web/restprocessor.py:41: DeprecationWarning: Non-ASCII character '\xc3' in file /home/gradha/instalacion_manual/rest2web-dist-229/rest2web/restindex.py on line 4, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details > from rest2web.restindex import read_restindex, default_keywords, default_restindex > > Looking at the culprit, it is the expanded svn keyword LastChangedDate > which expands on my sistem to "2006-10-11 00:50:49 +0200 (mié, 11 > oct 2006)". > Aargh... :-) Hmmm... I find these useful. It is useful to be able to look at a file and see when it was last changed and by whom. Can I change this to a different date format that doesn't screw you up ? Fuzzyman http://www.voidspace.org.uk/index2.shtml -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.9/573 - Release Date: 05/12/2006 |
From: Grzegorz A. H. <gr...@ti...> - 2006-12-07 21:46:29
|
On 2006-12-06, Michael Foord <fuz...@vo...> wrote: > Grzegorz Adam Hankiewicz wrote: > > Looking at the culprit, it is the expanded svn keyword > > LastChangedDate which expands on my sistem to "2006-10-11 00:50:49 > > +0200 (mi=C3=A9, 11 oct 2006)". > > Aargh... :-) > > Hmmm... I find these useful. It is useful to be able to look at > a file and see when it was last changed and by whom. Can I change > this to a different date format that doesn't screw you up ? AFAICS you can't fix the problem because it is a client side problem. The same would happen with the Id keyword, since that puts the name of the file. On my system this disallows me to use the keyword in an ascii python script if I decided to rename the file to something using 8-bit characters, or just utf-8, that would again creep into the source, making it invalid. And while you may not find it necessary for rest2web, I can tell you keywords are a pain in the ass just for making patches between developmen= t branches. Also at some point a coworker wanted to write a verification to= ol to make sure that the svn import from cvs was good, and he couldn't because keywords screwed up the md5sum: they even get expanded in different ways depending on your locale, cvs version and conversion switches. I suggested on the mailing lists for keywords to always expand to english words, which is also fair since the keywords themselves are only availabl= e in English, but svn developers are just too overwhelmed with work to care about little details. http://svn.haxx.se/users/archive-2005-06/1306.shtml I myself see the easy solution: keywords should just burn in hell. Any feature of a source control system that modifies the source in a non-deterministic way is just wrong, because you stop controlling the source. Anyway it doesn't bother me, I can always add the encoding myself or remove the line, svn won't put it back for me in future updates. |
From: Michael F. <fuz...@vo...> - 2006-12-07 22:00:47
|
Grzegorz Adam Hankiewicz wrote: > On 2006-12-06, Michael Foord <fuz...@vo...> wrote: >> Grzegorz Adam Hankiewicz wrote: >>> Looking at the culprit, it is the expanded svn keyword >>> LastChangedDate which expands on my sistem to "2006-10-11 00:50:49 >>> +0200 (mié, 11 oct 2006)". >> Aargh... :-) >> >> Hmmm... I find these useful. It is useful to be able to look at >> a file and see when it was last changed and by whom. Can I change >> this to a different date format that doesn't screw you up ? > > AFAICS you can't fix the problem because it is a client side problem. > The same would happen with the Id keyword, since that puts the name of > the file. On my system this disallows me to use the > keyword in an ascii python script if I decided to rename the file to > something using 8-bit characters, or just utf-8, that would again creep > into the source, making it invalid. > > And while you may not find it necessary for rest2web, I can tell you > keywords are a pain in the ass just for making patches between development > branches. Also at some point a coworker wanted to write a verification tool to > make sure that the svn import from cvs was good, and he couldn't because > keywords screwed up the md5sum: they even get expanded in different ways > depending on your locale, cvs version and conversion switches. > > I suggested on the mailing lists for keywords to always expand to english > words, which is also fair since the keywords themselves are only available > in English, but svn developers are just too overwhelmed with work to > care about little details. > > http://svn.haxx.se/users/archive-2005-06/1306.shtml > > I myself see the easy solution: keywords should just burn in hell. Any > feature of a source control system that modifies the source in a > non-deterministic way is just wrong, because you stop controlling > the source. > > Anyway it doesn't bother me, I can always add the encoding myself or > remove the line, svn won't put it back for me in future updates. > Ok - understood, and thanks. If it becomes a problem for anyone else I will remove the date keywords. Fuzzyman http://www.voidspace.org.uk/python/weblog/index.shtml > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Rest2web-develop mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.15.14/578 - Release Date: 07/12/2006 |