[Python-checkins] r62349 - in python/branches/py3k: .bzrignore Doc/whatsnew/2.6.rst Include/graminit.h Lib/test/test_warnings.py Modules/main.c Objects/descrobject.c PC/VC6/pythoncore.dsp PC/VS7.1/pythoncore.vcproj PC/VS8.0/pythoncore.vcproj PCbuild/pythoncore.vcproj Parser/printgrammar.c Python/_warnings.c Python/getopt.c Python/graminit.c

neal.norwitz python-checkins at python.org
Tue Apr 15 08:43:15 CEST 2008


Author: neal.norwitz
Date: Tue Apr 15 08:43:13 2008
New Revision: 62349
Log:
Merged revisions 61440-61441,61443,61445-61448,61451-61452,61455-61457,61459-61464,61466-61467,61469-61470,61476-61477,61479,61481-61482,61485,61487,61490,61493-61494,61497,61499-61502,61505-61506,61508,61511-61514,61519,61521-61522,61530-61531,61533-61537,61541-61555,61557-61558,61561-61562,61566-61569,61572-61574,61578-61579,61583-61584,61588-61589,61592,61594,61598-61601,61603-61604,61607-61612,61617,61619-61620,61624,61626,61628-61630,61635-61638,61640-61643,61645,61648,61653-61655,61659-61662,61664,61666,61668-61671,61673,61675,61679-61680,61682,61685-61686,61689-61695,61697-61699,61701-61703,61706,61710,61713,61717,61723,61726-61730,61736,61738,61740,61742,61745-61752,61754-61760,61762-61764,61768,61770-61772,61774-61775,61784-61787,61789-61792,61794-61795,61797-61806,61808-61809,61811-61812,61814-61819,61824,61826-61833,61835-61840,61843-61845,61848,61850,61854-61862,61865-61866,61868,61872-61873,61876-61877,61883-61888,61890-61891,61893-61899,61901-61903,61905-61912,61914,61917,61920-61921,61927,61930,61932-61934,61939,61941-61942,61944-61951,61955,61960-61963,61980,61982-61983,61991,61994-61996,62001-62003,62008-62010,62016-62017,62022,62024,62027,62031-62034,62041,62045-62046,62055-62058,62060-62066,62068-62074,62076-62079,62081-62083,62086-62089,62092-62094,62098,62101,62104,62106-62109,62115-62122,62124-62125,62128,62130,62132,62134-62135,62137,62139-62140,62144,62146,62151,62155,62157,62162-62166,62171-62172,62175-62176,62178,62181-62186,62188-62192,62196,62200-62203,62206,62211-62213,62215-62218,62222,62224-62226,62228,62232,62236,62240-62245,62248,62250-62254,62256-62258,62262,62264-62265,62267-62270,62272-62276,62280-62288,62291-62292,62299-62301,62307,62312,62316-62318,62322-62331,62333-62337,62339-62344,62346-62348 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk
........
 r62323 | brett.cannon | 2008年04月13日 10:09:43 -0700 (2008年4月13日) | 3 lines
 
 Add an explicit check for output in a test to try to diagnose a failure on
 Windows.
........
 r62324 | brett.cannon | 2008年04月13日 10:41:31 -0700 (2008年4月13日) | 3 lines
 
 Fix spliting on colons on Windows machines with a file path by limiting the
 number of splits.
........
 r62329 | benjamin.peterson | 2008年04月13日 13:35:56 -0700 (2008年4月13日) | 2 lines
 
 #2627 Let it be known what pgen generates
........
 r62330 | benjamin.peterson | 2008年04月13日 13:40:03 -0700 (2008年4月13日) | 2 lines
 
 Added an ignore file for Bazaar #2510
........
 r62331 | georg.brandl | 2008年04月13日 13:50:29 -0700 (2008年4月13日) | 2 lines
 
 Improve -X error message.
........
 r62334 | andrew.kuchling | 2008年04月13日 15:39:12 -0700 (2008年4月13日) | 1 line
 
 Add example
........
 r62340 | amaury.forgeotdarc | 2008年04月14日 12:55:40 -0700 (2008年4月14日) | 2 lines
 
 Update project files for all Windows supported compilers
........
 r62341 | amaury.forgeotdarc | 2008年04月14日 13:07:48 -0700 (2008年4月14日) | 6 lines
 
 Correct a refleak found by "regrtest.py -R:: test_structmembers"
 
 Some other minor updates in _warnings.c: 
 - make a function static
 - rename a shadowing local variable
........
 r62347 | andrew.kuchling | 2008年04月14日 19:24:15 -0700 (2008年4月14日) | 1 line
 
 Various items; begin writing the SSL section
........
 r62348 | neal.norwitz | 2008年04月14日 20:46:21 -0700 (2008年4月14日) | 1 line
 
 Prevent namespace pollution, add static for internal functions
........
Added:
 python/branches/py3k/.bzrignore
 - copied unchanged from r62331, /python/trunk/.bzrignore
Modified:
 python/branches/py3k/ (props changed)
 python/branches/py3k/Doc/whatsnew/2.6.rst
 python/branches/py3k/Include/graminit.h
 python/branches/py3k/Lib/test/test_warnings.py
 python/branches/py3k/Modules/main.c
 python/branches/py3k/Objects/descrobject.c
 python/branches/py3k/PC/VC6/pythoncore.dsp
 python/branches/py3k/PC/VS7.1/pythoncore.vcproj
 python/branches/py3k/PC/VS8.0/pythoncore.vcproj
 python/branches/py3k/PCbuild/pythoncore.vcproj
 python/branches/py3k/Parser/printgrammar.c
 python/branches/py3k/Python/_warnings.c
 python/branches/py3k/Python/getopt.c
 python/branches/py3k/Python/graminit.c
Modified: python/branches/py3k/Doc/whatsnew/2.6.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/2.6.rst	(original)
+++ python/branches/py3k/Doc/whatsnew/2.6.rst	Tue Apr 15 08:43:13 2008
@@ -736,7 +736,13 @@
 to become Unicode strings. This means that ``\u`` escape sequences 
 can be used to include Unicode characters.
 
-XXX give example
+ from __future__ import unicode_literals
+
+ s = ('\u751f\u3080\u304e\u3000\u751f\u3054'
+ '\u3081\u3000\u751f\u305f\u307e\u3054')
+
+ print len(s) # 12 Unicode characters
+
 
 .. seealso::
 
@@ -819,7 +825,8 @@
 
 :pep:`3116` - New I/O
 PEP written by Daniel Stutzbach, Mike Verdone, and Guido van Rossum.
- XXX code written by who?
+ Code by Guido van Rossum, Georg Brandl, Walter Doerwald,
+ Jeremy Hylton, Martin von Loewis, Tony Lownds, and others.
 
 .. ======================================================================
 
@@ -1090,8 +1097,6 @@
 
 A = foo(bar(A))
 
-XXX need to find a good motivating example. 
-
 .. seealso::
 
 :pep:`3129` - Class Decorators
@@ -1848,6 +1853,10 @@
 environments. TIPC addresses are 4- or 5-tuples.
 (Contributed by Alberto Bertogli; :issue:`1646`.)
 
+ A new function, :func:`create_connection`, takes an address 
+ and connects to it using an optional timeout value, returning 
+ the connected socket object.
+
 * The base classes in the :mod:`SocketServer` module now support
 calling a :meth:`handle_timeout` method after a span of inactivity 
 specified by the server's :attr:`timeout` attribute. (Contributed 
@@ -2036,15 +2045,21 @@
 --------------------------------------------------
 
 Bill Janssen made extensive improvements to Python 2.6's support for
-SSL.
-
-XXX use ssl.sslsocket - subclass of socket.socket.
+the Secure Sockets Layer by adding a new module, :mod:`ssl`, on top of
+the `OpenSSL <http://www.openssl.org/>`__ library. This new module
+provides more control over the protocol negotiated, the X.509
+certificates used, and has better support for writing SSL servers (as
+opposed to clients) in Python. The existing SSL support in the
+:mod:`socket` module hasn't been removed and continues to work,
+though it will be removed in Python 3.0.
+
+To use the new module, first you must create a TCP connection in the
+usual way and then pass it to the :func:`ssl.wrap_socket` function.
+XXX describe parameters.
 
 XXX Can specify if certificate is required, and obtain certificate info
 by calling getpeercert method.
 
-XXX sslwrap() behaves like socket.ssl
-
 XXX Certain features require the OpenSSL package to be installed, notably
 the 'openssl' binary.
 
Modified: python/branches/py3k/Include/graminit.h
==============================================================================
--- python/branches/py3k/Include/graminit.h	(original)
+++ python/branches/py3k/Include/graminit.h	Tue Apr 15 08:43:13 2008
@@ -1,3 +1,5 @@
+/* Generated by Parser/pgen */
+
 #define single_input 256
 #define file_input 257
 #define eval_input 258
Modified: python/branches/py3k/Lib/test/test_warnings.py
==============================================================================
--- python/branches/py3k/Lib/test/test_warnings.py	(original)
+++ python/branches/py3k/Lib/test/test_warnings.py	Tue Apr 15 08:43:13 2008
@@ -328,7 +328,8 @@
 "Too many newlines in %r" % result)
 first_line, second_line = result.split('\n', 1)
 expected_file = os.path.splitext(warning_tests.__file__)[0] + '.py'
- path, line, warning_class, message = first_line.split(':')
+ first_line_parts = first_line.rsplit(':', 3)
+ path, line, warning_class, message = first_line_parts
 line = int(line)
 self.failUnlessEqual(expected_file, path)
 self.failUnlessEqual(warning_class, ' ' + UserWarning.__name__)
Modified: python/branches/py3k/Modules/main.c
==============================================================================
--- python/branches/py3k/Modules/main.c	(original)
+++ python/branches/py3k/Modules/main.c	Tue Apr 15 08:43:13 2008
@@ -380,7 +380,7 @@
 			skipfirstline = 1;
 			break;
 
-		/* case 'X': reserved for non-standard arguments */
+		/* case 'X': reserved for implementation-specific arguments */
 
 		case 'h':
 		case '?':
Modified: python/branches/py3k/Objects/descrobject.c
==============================================================================
--- python/branches/py3k/Objects/descrobject.c	(original)
+++ python/branches/py3k/Objects/descrobject.c	Tue Apr 15 08:43:13 2008
@@ -1083,7 +1083,7 @@
 PyDoc_STRVAR(getter_doc,
 	 "Descriptor to change the getter on a property.");
 
-PyObject *
+static PyObject *
 property_getter(PyObject *self, PyObject *getter)
 {
 	return property_copy(self, getter, NULL, NULL, NULL);
@@ -1093,7 +1093,7 @@
 PyDoc_STRVAR(setter_doc,
 	 "Descriptor to change the setter on a property.");
 
-PyObject *
+static PyObject *
 property_setter(PyObject *self, PyObject *setter)
 {
 	return property_copy(self, NULL, setter, NULL, NULL);
@@ -1103,7 +1103,7 @@
 PyDoc_STRVAR(deleter_doc,
 	 "Descriptor to change the deleter on a property.");
 
-PyObject *
+static PyObject *
 property_deleter(PyObject *self, PyObject *deleter)
 {
 	return property_copy(self, NULL, NULL, deleter, NULL);
Modified: python/branches/py3k/PC/VC6/pythoncore.dsp
==============================================================================
--- python/branches/py3k/PC/VC6/pythoncore.dsp	(original)
+++ python/branches/py3k/PC/VC6/pythoncore.dsp	Tue Apr 15 08:43:13 2008
@@ -193,6 +193,10 @@
 # End Source File
 # Begin Source File
 
+SOURCE=..\..\Python\_warnings.c
+# End Source File
+# Begin Source File
+
 SOURCE=..\..\Python\asdl.c
 # End Source File
 # Begin Source File
Modified: python/branches/py3k/PC/VS7.1/pythoncore.vcproj
==============================================================================
--- python/branches/py3k/PC/VS7.1/pythoncore.vcproj	(original)
+++ python/branches/py3k/PC/VS7.1/pythoncore.vcproj	Tue Apr 15 08:43:13 2008
@@ -410,6 +410,9 @@
 			RelativePath="..\..\Modules\arraymodule.c">
 		</File>
 		<File
+			RelativePath="..\..\Python\_warnings.c">
+		</File>
+		<File
 			RelativePath="..\..\Python\asdl.c">
 		</File>
 		<File
Modified: python/branches/py3k/PC/VS8.0/pythoncore.vcproj
==============================================================================
--- python/branches/py3k/PC/VS8.0/pythoncore.vcproj	(original)
+++ python/branches/py3k/PC/VS8.0/pythoncore.vcproj	Tue Apr 15 08:43:13 2008
@@ -1587,6 +1587,10 @@
 			Name="Python"
 			>
 			<File
+				RelativePath="..\..\Python\_warnings.c"
+				>
+			</File>
+			<File
 				RelativePath="..\..\Python\asdl.c"
 				>
 			</File>
Modified: python/branches/py3k/PCbuild/pythoncore.vcproj
==============================================================================
--- python/branches/py3k/PCbuild/pythoncore.vcproj	(original)
+++ python/branches/py3k/PCbuild/pythoncore.vcproj	Tue Apr 15 08:43:13 2008
@@ -1587,6 +1587,10 @@
 			Name="Python"
 			>
 			<File
+				RelativePath="..\Python\_warnings.c"
+				>
+			</File>
+			<File
 				RelativePath="..\Python\asdl.c"
 				>
 			</File>
@@ -1746,10 +1750,6 @@
 				RelativePath="..\Python\traceback.c"
 				>
 			</File>
- <File
- RelativePath="..\Python\_warnings.c"
- >
- </File>
 		</Filter>
 		<Filter
 			Name="Resource Files"
Modified: python/branches/py3k/Parser/printgrammar.c
==============================================================================
--- python/branches/py3k/Parser/printgrammar.c	(original)
+++ python/branches/py3k/Parser/printgrammar.c	Tue Apr 15 08:43:13 2008
@@ -13,6 +13,7 @@
 void
 printgrammar(grammar *g, FILE *fp)
 {
+	fprintf(fp, "/* Generated by Parser/pgen */\n\n");
 	fprintf(fp, "#include \"pgenheaders.h\"\n");
 	fprintf(fp, "#include \"grammar.h\"\n");
 	printdfas(g, fp);
@@ -31,6 +32,8 @@
 	dfa *d;
 	int i;
 	
+	fprintf(fp, "/* Generated by Parser/pgen */\n\n");
+	
 	d = g->g_dfa;
 	for (i = g->g_ndfas; --i >= 0; d++)
 		fprintf(fp, "#define %s %d\n", d->d_name, d->d_type);
Modified: python/branches/py3k/Python/_warnings.c
==============================================================================
--- python/branches/py3k/Python/_warnings.c	(original)
+++ python/branches/py3k/Python/_warnings.c	Tue Apr 15 08:43:13 2008
@@ -61,7 +61,7 @@
 }
 
 
-PyObject *
+static PyObject *
 get_once_registry(void)
 {
 PyObject *registry;
@@ -378,16 +378,17 @@
 show_warning(filename, lineno, text, category, sourceline);
 }
 else {
- PyObject *result;
+ PyObject *res;
 
- result = PyObject_CallFunctionObjArgs(show_fxn, message, category,
+ res = PyObject_CallFunctionObjArgs(show_fxn, message, category,
 filename, lineno_obj,
 Py_None,
 sourceline ?
 sourceline: Py_None,
 NULL);
- Py_XDECREF(result);
- if (result == NULL)
+ Py_DECREF(show_fxn);
+ Py_XDECREF(res);
+ if (res == NULL)
 goto cleanup;
 }
 }
Modified: python/branches/py3k/Python/getopt.c
==============================================================================
--- python/branches/py3k/Python/getopt.c	(original)
+++ python/branches/py3k/Python/getopt.c	Tue Apr 15 08:43:13 2008
@@ -91,7 +91,7 @@
 
 	if (option == 'X') {
 		fprintf(stderr,
-			"-X is reserved for non-standard arguments\n");
+		 "-X is reserved for implementation-specific arguments\n");
 		return '_';
 	}
 
Modified: python/branches/py3k/Python/graminit.c
==============================================================================
--- python/branches/py3k/Python/graminit.c	(original)
+++ python/branches/py3k/Python/graminit.c	Tue Apr 15 08:43:13 2008
@@ -1,3 +1,5 @@
+/* Generated by Parser/pgen */
+
 #include "pgenheaders.h"
 #include "grammar.h"
 static arc arcs_0_0[3] = {


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /