New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
subversion keyword breakage #55648
Comments
Several files rely on properly substituted subversion keywords. In 3.3 example: $ find . -name "*.c" | xargs grep -n '"\$'
./Modules/_bsddb.c:102:static char *rcs_id = "$Id$";
./Modules/pyexpat.c:1818: static char *rcsid = "$Revision$";
./Modules/getbuildinfo.c:28:#define SVNVERSION "$WCRANGE$$WCMODS?M:$"
./Modules/_hotshot.c:1402: static char *rcsid = "$Revision$";
./Python/sysmodule.c:1147:static const char headurl[] = "$HeadURL$"; Python 3.3a0 (default:a69ef22b60e3, Mar 8 2011, 15:40:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyexpat
>>> pyexpat.__version__
'400s)'
>>> 2.5 example: Python does not build without at least changing Include/patchlevel.h |
See also bpo-11421. |
This also affects a number of files under Lib, including some that set their version using "$Revision$". Since I stumbled on this issue by encountering some code that checks the version string in tkinker breaking, this is an issue that can break existing code. Mercurial does have the keyword extension (http://mercurial.selenic.com/wiki/KeywordExtension) which can provide something similar, but should be some sort of recommended configuration for this and there'll be discrepancies between the id's from svn and mercurial (which may or may not be an issue in practice). find ./Lib -name "*.py" | xargs grep -n '"\$Revision\$"' ./Lib/tarfile.py:32:version = "$Revision$" |
I've also looked at the keyword extension, but for example HeadURL does http://comments.gmane.org/gmane.comp.version-control.mercurial.devel/31214 |
These "verbose numbers" don't seem to serve a purpose, they should simply be removed (or replaced by a static, non-moving number higher than the highest svn rev). The keyword extension is generally frown upon, because it introduces complexity, performance issues, and also possibly undesired behaviour. Endly, I don't think this is a critical issue at all. |
"version numbers", not "verbose numbers", sorry. |
Building matplotlib with the 2.7.2 release fails due to this issue: Traceback (most recent call last):
File "setup.py", line 162, in <module>
if check_for_tk() or (options['build_tkagg'] is True):
File "/home/stefan/src/matplotlib-1.0.1/setupext.py", line 832, in check_for_tk
(Tkinter.__version__.split()[-2], Tkinter.TkVersion, Tkinter.TclVersion))
IndexError: list index out of range Python 2.7.2 (default, Jun 20 2011, 13:19:22)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
>>> Tkinter.__version__
'$Revision$' |
SVN_Revision.diff replaces the remaining "$Revision$" keywords in 2.7 with the values from the last SVN checkout I have. This seems the correct minimal fix for the issues caused by code parsing the revision tag in Python 2. I've left the various other keywords untouched in 2.7 (mainly |
This patch removes or replaces a number SVN keywords which aren't buried in comments. I've removed '__revision__ = "$Id$"' cases - mainly present in distutils - as no-one appears to using these. I've replaced values in tarfile.py, but they can probably be removed as well. |
New changeset f15442543e24 by Senthil Kumaran in branch '2.7': New changeset 3e26c9033306 by Senthil Kumaran in branch '3.2': New changeset 6b9f0a6efaeb by Senthil Kumaran in branch 'default': |
Thanks for the patch, Neil. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: