Kaydet (Commit) 4db2c257 authored tarafından Georg Brandl's avatar Georg Brandl

Add .hgeol file and fix newlines in the 2.5 branch.

üst 2af945cd
[patterns]
# Non human-editable files are binary
**.dsp = BIN
**.dsw = BIN
**.mk = BIN
**.sln = BIN
**.vcproj = BIN
**.vsprops = BIN
**.aif = BIN
**.au = BIN
**.bmp = BIN
**.db = BIN
**.exe = BIN
**.icns = BIN
**.gif = BIN
**.ico = BIN
**.info = BIN
**.jpg = BIN
**.pck = BIN
**.png = BIN
**.psd = BIN
**.tar = BIN
**.xar = BIN
**.zip = BIN
Lib/email/test/data/msg_26.txt = BIN
Lib/test/sndhdrdata/sndhdr.* = BIN
Lib/test/decimaltestdata/*.decTest = BIN
# All other files (which presumably are human-editable) are "native".
# This must be the last rule!
** = native
[repository]
native = LF
\section{\module{xml.etree} --- \section{\module{xml.etree} ---
The ElementTree API for XML} The ElementTree API for XML}
\declaremodule{standard}{xml.etree} \declaremodule{standard}{xml.etree}
\modulesynopsis{Package containing common ElementTree modules.} \modulesynopsis{Package containing common ElementTree modules.}
\moduleauthor{Fredrik Lundh}{fredrik@pythonware.com} \moduleauthor{Fredrik Lundh}{fredrik@pythonware.com}
\versionadded{2.5} \versionadded{2.5}
The ElementTree package is a simple, efficient, and quite popular The ElementTree package is a simple, efficient, and quite popular
library for XML manipulation in Python. library for XML manipulation in Python.
The \module{xml.etree} package contains the most common components The \module{xml.etree} package contains the most common components
from the ElementTree API library. from the ElementTree API library.
In the current release, this package contains the \module{ElementTree}, In the current release, this package contains the \module{ElementTree},
\module{ElementPath}, and \module{ElementInclude} modules from the full \module{ElementPath}, and \module{ElementInclude} modules from the full
ElementTree distribution. ElementTree distribution.
% XXX To be continued! % XXX To be continued!
\begin{seealso} \begin{seealso}
\seetitle[http://effbot.org/tag/elementtree] \seetitle[http://effbot.org/tag/elementtree]
{ElementTree Overview} {ElementTree Overview}
{The home page for \module{ElementTree}. This includes links {The home page for \module{ElementTree}. This includes links
to additional documentation, alternative implementations, and to additional documentation, alternative implementations, and
other add-ons.} other add-ons.}
\end{seealso} \end{seealso}
#! -*- coding: koi8-r -*- #! -*- coding: koi8-r -*-
# This file is marked as binary in SVN, to prevent MacCVS from recoding it. # This file is marked as binary in SVN, to prevent MacCVS from recoding it.
import unittest import unittest
from test import test_support from test import test_support
class PEP263Test(unittest.TestCase): class PEP263Test(unittest.TestCase):
def test_pep263(self): def test_pep263(self):
self.assertEqual( self.assertEqual(
u"".encode("utf-8"), u"".encode("utf-8"),
'\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd' '\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd'
) )
self.assertEqual( self.assertEqual(
u"\".encode("utf-8"), u"\".encode("utf-8"),
'\\\xd0\x9f' '\\\xd0\x9f'
) )
def test_compilestring(self): def test_compilestring(self):
# see #1882 # see #1882
c = compile("\n# coding: utf-8\nu = u'\xc3\xb3'\n", "dummy", "exec") c = compile("\n# coding: utf-8\nu = u'\xc3\xb3'\n", "dummy", "exec")
d = {} d = {}
exec c in d exec c in d
self.assertEqual(d['u'], u'\xf3') self.assertEqual(d['u'], u'\xf3')
def test_main(): def test_main():
test_support.run_unittest(PEP263Test) test_support.run_unittest(PEP263Test)
if __name__=="__main__": if __name__=="__main__":
test_main() test_main()
@echo off @echo off
if not defined HOST_PYTHON ( if not defined HOST_PYTHON (
if %1 EQU Debug ( if %1 EQU Debug (
set HOST_PYTHON=python_d.exe set HOST_PYTHON=python_d.exe
) ELSE ( ) ELSE (
set HOST_PYTHON=python.exe set HOST_PYTHON=python.exe
) )
) )
%HOST_PYTHON% build_ssl.py %1 %2 %HOST_PYTHON% build_ssl.py %1 %2
This diff is collapsed.
@echo off @echo off
rem A batch program to build or rebuild a particular configuration. rem A batch program to build or rebuild a particular configuration.
rem just for convenience. rem just for convenience.
setlocal setlocal
set platf=Win32 set platf=Win32
set conf=Release set conf=Release
set build=/build set build=/build
:CheckOpts :CheckOpts
if "%1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts if "%1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts
if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
if "%1"=="-r" (set build=/rebuild) & shift & goto CheckOpts if "%1"=="-r" (set build=/rebuild) & shift & goto CheckOpts
set cmd=devenv pcbuild.sln %build% "%conf%|%platf%" set cmd=devenv pcbuild.sln %build% "%conf%|%platf%"
echo %cmd% echo %cmd%
%cmd% %cmd%
\ No newline at end of file
@echo off @echo off
rem A batch program to build PGO (Profile guided optimization) by first rem A batch program to build PGO (Profile guided optimization) by first
rem building instrumented binaries, then running the testsuite, and rem building instrumented binaries, then running the testsuite, and
rem finally building the optimized code. rem finally building the optimized code.
rem Note, after the first instrumented run, one can just keep on rem Note, after the first instrumented run, one can just keep on
rem building the PGUpdate configuration while developing. rem building the PGUpdate configuration while developing.
setlocal setlocal
set platf=Win32 set platf=Win32
rem use the performance testsuite. This is quick and simple rem use the performance testsuite. This is quick and simple
set job1=..\tools\pybench\pybench.py -n 1 -C 1 --with-gc set job1=..\tools\pybench\pybench.py -n 1 -C 1 --with-gc
set path1=..\tools\pybench set path1=..\tools\pybench
rem or the whole testsuite for more thorough testing rem or the whole testsuite for more thorough testing
set job2=..\lib\test\regrtest.py set job2=..\lib\test\regrtest.py
set path2=..\lib set path2=..\lib
set job=%job1% set job=%job1%
set clrpath=%path1% set clrpath=%path1%
:CheckOpts :CheckOpts
if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
if "%1"=="-2" (set job=%job2%) & (set clrpath=%path2%) & shift & goto CheckOpts if "%1"=="-2" (set job=%job2%) & (set clrpath=%path2%) & shift & goto CheckOpts
set folder=%platf%PGO set folder=%platf%PGO
@echo on @echo on
rem build the instrumented version rem build the instrumented version
call build -r -p %platf% -c PGInstrument call build -r -p %platf% -c PGInstrument
rem remove .pyc files, .pgc files and execute the job rem remove .pyc files, .pgc files and execute the job
%folder%\python.exe rmpyc.py %clrpath% %folder%\python.exe rmpyc.py %clrpath%
del %folder%\*.pgc del %folder%\*.pgc
%folder%\python.exe %job% %folder%\python.exe %job%
rem finally build the optimized version rem finally build the optimized version
call build -r -p %platf% -c PGUpdate call build -r -p %platf% -c PGUpdate
#include <windows.h> #include <windows.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <stdio.h> #include <stdio.h>
/* This file creates the local getbuildinfo.c file, by /* This file creates the local getbuildinfo.c file, by
invoking subwcrev.exe (if found). This replaces tokens invoking subwcrev.exe (if found). This replaces tokens
int the file with information about the build. int the file with information about the build.
If this isn't a subversion checkout, or subwcrev isn't If this isn't a subversion checkout, or subwcrev isn't
found, it copies ..\\Modules\\getbuildinfo.c instead. found, it copies ..\\Modules\\getbuildinfo.c instead.
Currently, subwcrev.exe is found from the registry entries Currently, subwcrev.exe is found from the registry entries
of TortoiseSVN. of TortoiseSVN.
make_buildinfo.exe is called as a pre-build step for pythoncore. make_buildinfo.exe is called as a pre-build step for pythoncore.
*/ */
int make_buildinfo2() int make_buildinfo2()
{ {
struct _stat st; struct _stat st;
HKEY hTortoise; HKEY hTortoise;
char command[500]; char command[500];
DWORD type, size; DWORD type, size;
if (_stat("..\\.svn", &st) < 0) if (_stat("..\\.svn", &st) < 0)
return 0; return 0;
/* Allow suppression of subwcrev.exe invocation if a no_subwcrev file is present. */ /* Allow suppression of subwcrev.exe invocation if a no_subwcrev file is present. */
if (_stat("no_subwcrev", &st) == 0) if (_stat("no_subwcrev", &st) == 0)
return 0; return 0;
if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS && if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS &&
RegOpenKey(HKEY_CURRENT_USER, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS) RegOpenKey(HKEY_CURRENT_USER, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS)
/* Tortoise not installed */ /* Tortoise not installed */
return 0; return 0;
command[0] = '"'; /* quote the path to the executable */ command[0] = '"'; /* quote the path to the executable */
size = sizeof(command) - 1; size = sizeof(command) - 1;
if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command+1, &size) != ERROR_SUCCESS || if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command+1, &size) != ERROR_SUCCESS ||
type != REG_SZ) type != REG_SZ)
/* Registry corrupted */ /* Registry corrupted */
return 0; return 0;
strcat_s(command, sizeof(command), "bin\\subwcrev.exe"); strcat_s(command, sizeof(command), "bin\\subwcrev.exe");
if (_stat(command+1, &st) < 0) if (_stat(command+1, &st) < 0)
/* subwcrev.exe not part of the release */ /* subwcrev.exe not part of the release */
return 0; return 0;
strcat_s(command, sizeof(command), "\" .. ..\\Modules\\getbuildinfo.c getbuildinfo.c"); strcat_s(command, sizeof(command), "\" .. ..\\Modules\\getbuildinfo.c getbuildinfo.c");
puts(command); fflush(stdout); puts(command); fflush(stdout);
if (system(command) < 0) if (system(command) < 0)
return 0; return 0;
return 1; return 1;
} }
int main(int argc, char*argv[]) int main(int argc, char*argv[])
{ {
char command[500] = ""; char command[500] = "";
int svn; int svn;
/* Get getbuildinfo.c from svn as getbuildinfo2.c */ /* Get getbuildinfo.c from svn as getbuildinfo2.c */
svn = make_buildinfo2(); svn = make_buildinfo2();
if (svn) { if (svn) {
puts("subcwrev succeeded, generated getbuildinfo.c"); puts("subcwrev succeeded, generated getbuildinfo.c");
} else { } else {
puts("Couldn't run subwcrev.exe on getbuildinfo.c. Copying it"); puts("Couldn't run subwcrev.exe on getbuildinfo.c. Copying it");
strcat_s(command, sizeof(command), "copy /Y ..\\Modules\\getbuildinfo.c getbuildinfo.c"); strcat_s(command, sizeof(command), "copy /Y ..\\Modules\\getbuildinfo.c getbuildinfo.c");
puts(command); fflush(stdout); puts(command); fflush(stdout);
if (system(command) < 0) if (system(command) < 0)
return EXIT_FAILURE; return EXIT_FAILURE;
} }
return 0; return 0;
} }
\ No newline at end of file
@echo off @echo off
rem Run Tests. Run the regression test suite. rem Run Tests. Run the regression test suite.
rem Usage: rt [-d] [-O] [-q] regrtest_args rem Usage: rt [-d] [-O] [-q] regrtest_args
rem -d Run Debug build (python_d.exe). Else release build. rem -d Run Debug build (python_d.exe). Else release build.
rem -pgo Run PGO build, e.g. for instrumentation rem -pgo Run PGO build, e.g. for instrumentation
rem -x64 Run the x64 version, otherwise win32 rem -x64 Run the x64 version, otherwise win32
rem -O Run python.exe or python_d.exe (see -d) with -O. rem -O Run python.exe or python_d.exe (see -d) with -O.
rem -q "quick" -- normally the tests are run twice, the first time rem -q "quick" -- normally the tests are run twice, the first time
rem after deleting all the .py[co] files reachable from Lib/. rem after deleting all the .py[co] files reachable from Lib/.
rem -q runs the tests just once, and without deleting .py[co] files. rem -q runs the tests just once, and without deleting .py[co] files.
rem All leading instances of these switches are shifted off, and rem All leading instances of these switches are shifted off, and
rem whatever remains is passed to regrtest.py. For example, rem whatever remains is passed to regrtest.py. For example,
rem rt -O -d -x test_thread rem rt -O -d -x test_thread
rem runs rem runs
rem python_d -O ../lib/test/regrtest.py -x test_thread rem python_d -O ../lib/test/regrtest.py -x test_thread
rem twice, and rem twice, and
rem rt -q -g test_binascii rem rt -q -g test_binascii
rem runs rem runs
rem python_d ../lib/test/regrtest.py -g test_binascii rem python_d ../lib/test/regrtest.py -g test_binascii
rem to generate the expected-output file for binascii quickly. rem to generate the expected-output file for binascii quickly.
rem rem
rem Confusing: if you want to pass a comma-separated list, like rem Confusing: if you want to pass a comma-separated list, like
rem -u network,largefile rem -u network,largefile
rem then you have to quote it on the rt line, like rem then you have to quote it on the rt line, like
rem rt -u "network,largefile" rem rt -u "network,largefile"
setlocal setlocal
set platf=win32 set platf=win32
set exe=python.exe set exe=python.exe
set qmode= set qmode=
set dashO= set dashO=
set conf=Release set conf=Release
PATH %PATH%;..\..\tcltk\bin PATH %PATH%;..\..\tcltk\bin
:CheckOpts :CheckOpts
if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts
if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts
if "%1"=="-d" (set exe=python_d.exe) & (set conf=Debug) & shift & goto CheckOpts if "%1"=="-d" (set exe=python_d.exe) & (set conf=Debug) & shift & goto CheckOpts
if "%1"=="-x64" (set platf=x64) & shift & goto CheckOpts if "%1"=="-x64" (set platf=x64) & shift & goto CheckOpts
if "%1"=="-pgo" (set conf=PGO) & shift & goto CheckOpts if "%1"=="-pgo" (set conf=PGO) & shift & goto CheckOpts
set exe=%platf%%conf%\%exe% set exe=%platf%%conf%\%exe%
set cmd=%exe% %dashO% -E -tt ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9 set cmd=%exe% %dashO% -E -tt ../lib/test/regrtest.py %1 %2 %3 %4 %5 %6 %7 %8 %9
if defined qmode goto Qmode if defined qmode goto Qmode
echo Deleting .pyc/.pyo files ... echo Deleting .pyc/.pyo files ...
%exe% rmpyc.py %exe% rmpyc.py
echo on echo on
%cmd% %cmd%
@echo off @echo off
echo About to run again without deleting .pyc/.pyo first: echo About to run again without deleting .pyc/.pyo first:
pause pause
:Qmode :Qmode
echo on echo on
%cmd% %cmd%
@rem Fetches (and builds if necessary) external dependencies @rem Fetches (and builds if necessary) external dependencies
@rem Assume we start inside the Python source directory @rem Assume we start inside the Python source directory
cd .. cd ..
call "%VS71COMNTOOLS%vsvars32.bat" call "%VS71COMNTOOLS%vsvars32.bat"
@rem bzip @rem bzip
if not exist bzip2-1.0.3 svn export http://svn.python.org/projects/external/bzip2-1.0.3 if not exist bzip2-1.0.3 svn export http://svn.python.org/projects/external/bzip2-1.0.3
@rem Sleepycat db @rem Sleepycat db
if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20 if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20
if not exist db-4.4.20\build_win32\debug\libdb44sd.lib ( if not exist db-4.4.20\build_win32\debug\libdb44sd.lib (
devenv db-4.4.20\build_win32\Berkeley_DB.sln /build Debug /project db_static devenv db-4.4.20\build_win32\Berkeley_DB.sln /build Debug /project db_static
) )
@rem OpenSSL @rem OpenSSL
if not exist openssl-0.9.8a svn export http://svn.python.org/projects/external/openssl-0.9.8a if not exist openssl-0.9.8a svn export http://svn.python.org/projects/external/openssl-0.9.8a
@rem tcltk @rem tcltk
if not exist tcl8.4.12 ( if not exist tcl8.4.12 (
if exist tcltk rd /s/q tcltk if exist tcltk rd /s/q tcltk
svn export http://svn.python.org/projects/external/tcl8.4.12 svn export http://svn.python.org/projects/external/tcl8.4.12
svn export http://svn.python.org/projects/external/tk8.4.12 svn export http://svn.python.org/projects/external/tk8.4.12
cd tcl8.4.12\win cd tcl8.4.12\win
nmake -f makefile.vc nmake -f makefile.vc
nmake -f makefile.vc INSTALLDIR=..\..\tcltk install nmake -f makefile.vc INSTALLDIR=..\..\tcltk install
cd ..\.. cd ..\..
cd tk8.4.12\win cd tk8.4.12\win
nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12
nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 INSTALLDIR=..\..\tcltk install nmake -f makefile.vc TCLDIR=..\..\tcl8.4.12 INSTALLDIR=..\..\tcltk install
cd ..\.. cd ..\..
) )
@rem sqlite @rem sqlite
if not exist sqlite-source-3.3.4 svn export http://svn.python.org/projects/external/sqlite-source-3.3.4 if not exist sqlite-source-3.3.4 svn export http://svn.python.org/projects/external/sqlite-source-3.3.4
if not exist build\PCbuild\sqlite3.dll copy sqlite-source-3.3.4\sqlite3.dll build\PCbuild if not exist build\PCbuild\sqlite3.dll copy sqlite-source-3.3.4\sqlite3.dll build\PCbuild
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment