There were two tracker issues that I want to solve that implies to touch some PEP text. So, I checked out the PEP branch... svn.python.org/peps/trunk ...and made a "make". A lot of files started to fail because of not ASCII characters (the standard Syntax Error of PEP-0263, I'm using Py2.5), like... # Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 4152 $ # Date: $Date: 2005-12-07 20:46:30 -0300 (mié, 07 dic 2005) $ # Copyright: This module has been placed in the public domain. ...(see the date) in the "./docutils/utils.py" program. A *lot* of files failed this way. I started to fix them (-*- coding -*- line at the start), but then I thought that maybe *I* was doing something wrong, because it's strange that nobody noticed this before... So, shall I continue fixing these? Or what I'm doing wrong here? Thank you very much! -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/
# Date: $Date: 2005-12-07 20:46:30 -0300 (mié, 07 dic 2005) $
A *lot* of files failed this way. I started to fix them (-*- coding -*- line at the start), but then I thought that maybe *I* was doing something wrong, because it's strange that nobody noticed this before...
So, shall I continue fixing these? Or what I'm doing wrong here?
I believe it's subversion that is doing something wrong. In my copy of the file, I get # Contact: goodger@users.sourceforge.net # Revision: $Revision: 4152 $ # Date: $Date: 2005-12-08 00:46:30 +0100 (Do, 08 Dez 2005) $ which isn't any better, but happens to be ASCII (the only non-ASCII dates that I may get are during March - März). IMO, it's a flaw in subversion that it translates the date (or even provides a textual form of the date in the first place). It shouldn't do that, or at least provide a way to get the date expanded according to the "C" locale. As a work-around, you can update your sources with LANG=C svn up which will prevent Date from being translated to your language. Regards, Martin P.S. Notice that subversion also prints the time in local time, rather than UTC, so our copies even disagree on the day-of-month on which this revision was committed. So the proper command line would be LANG=C TZ=GMT svn up
2007/10/12, "Martin v. Löwis" <martin@v.loewis.de>:
I believe it's subversion that is doing something wrong. In my copy of the file, I get
# Contact: goodger@users.sourceforge.net # Revision: $Revision: 4152 $ # Date: $Date: 2005-12-08 00:46:30 +0100 (Do, 08 Dez 2005) $
Looking the file through the web browser, I see: Version: $Revision$ Last-Modified: $Date$ So, SVN is touching that. I guess that that is actually the idea, but is breaking thing for us-non-7bits-speakers, :) I see two solutions to this: - Find a way to specify something in the original PEP file so SVN translates always the dates in English. - Touch the .py and adapt them to support this characters. I prefer point 2. What do you think? (if it's ok, I'll add the "coding" line in the files where is needed). Regards, -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/
Looking the file through the web browser, I see:
Version: $Revision$ Last-Modified: $Date$
So, SVN is touching that. I guess that that is actually the idea, but is breaking thing for us-non-7bits-speakers, :)
Please read about the svn:keywords feature, and yes, that is the idea.
I see two solutions to this:
- Find a way to specify something in the original PEP file so SVN translates always the dates in English.
Are you sure you are talking about the file that contains the PEP itself? Or are you perhaps talking about the source code of docutils? AFAICT, the problem is in docutils, not in the PEPs.
- Touch the .py and adapt them to support this characters.
I prefer point 2.
What do you think? (if it's ok, I'll add the "coding" line in the files where is needed).
I cannot answer that question, because I don't understand your proposal. What file would you like to touch, and are you sure you have write permission to it? Regards, Martin
2007/10/12, "Martin v. Löwis" <martin@v.loewis.de>:
- Find a way to specify something in the original PEP file so SVN translates always the dates in English.
Are you sure you are talking about the file that contains the PEP itself? Or are you perhaps talking about the source code of docutils?
In the PEP text (example: http://svn.python.org/view/peps/trunk/pep-0002.txt?rev=56077&view=auto ), it says "Last-Modified: $Date$". That $Date$ is being translated in the checkout or update by subversion. Maybe there is a $C-locale-Date$ for subversion to automatically put the date there using C locale and not the one of the user. I don't know if it exists, though.
AFAICT, the problem is in docutils, not in the PEPs.
Me too, that's why I prefer point 2.
- Touch the .py and adapt them to support this characters.
I prefer point 2.
What do you think? (if it's ok, I'll add the "coding" line in the files where is needed).
I cannot answer that question, because I don't understand your proposal. What file would you like to touch, and are you sure you have write permission to it?
Yes, I have permission. Of course I need to raise this in docutils mail list. Thanks!! -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/
- Find a way to specify something in the original PEP file so SVN translates always the dates in English. Are you sure you are talking about the file that contains the PEP itself? Or are you perhaps talking about the source code of docutils?
In the PEP text (example:
http://svn.python.org/view/peps/trunk/pep-0002.txt?rev=56077&view=auto
), it says "Last-Modified: $Date$". That $Date$ is being translated in the checkout or update by subversion.
Certainly. However, why does that cause a problem *in the PEP file*?????
Maybe there is a $C-locale-Date$ for subversion to automatically put the date there using C locale and not the one of the user.
I don't know if it exists, though.
No, that's not supported. The Id keyword gets replaced with a locale-independent ISO 8601 string, though. Regards, Martin
Facundo Batista wrote:
In the PEP text (example:
http://svn.python.org/view/peps/trunk/pep-0002.txt?rev=56077&view=auto
), it says "Last-Modified: $Date$". That $Date$ is being translated in the checkout or update by subversion. Maybe there is a $C-locale-Date$ for subversion to automatically put the date there using C locale and not the one of the user.
I don't know if it exists, though.
It currently does not. You are not the first person to notice this problem. I know of a number of projects that are currently avoiding the use of subversion keywords for this very reason. Anyways, the issue is open on subversion's tracker (since 2005): http://subversion.tigris.org/issues/show_bug.cgi?id=2332 -- Scott Dial scott@scottdial.com scodial@cs.indiana.edu -- Scott Dial scott@scottdial.com scodial@cs.indiana.edu
participants (3)
-
"Martin v. Löwis" -
Facundo Batista -
Scott Dial