]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 61440-61441,61443,61445-61448,61451-61452,61455-61457,61459-61464...
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 15 Apr 2008 06:43:13 +0000 (06:43 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 15 Apr 2008 06:43:13 +0000 (06:43 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r62323 | brett.cannon | 2008-04-13 10:09:43 -0700 (Sun, 13 Apr 2008) | 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 (Sun, 13 Apr 2008) | 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 (Sun, 13 Apr 2008) | 2 lines

  #2627 Let it be known what pgen generates
........
  r62330 | benjamin.peterson | 2008-04-13 13:40:03 -0700 (Sun, 13 Apr 2008) | 2 lines

  Added an ignore file for Bazaar #2510
........
  r62331 | georg.brandl | 2008-04-13 13:50:29 -0700 (Sun, 13 Apr 2008) | 2 lines

  Improve -X error message.
........
  r62334 | andrew.kuchling | 2008-04-13 15:39:12 -0700 (Sun, 13 Apr 2008) | 1 line

  Add example
........
  r62340 | amaury.forgeotdarc | 2008-04-14 12:55:40 -0700 (Mon, 14 Apr 2008) | 2 lines

  Update project files for all Windows supported compilers
........
  r62341 | amaury.forgeotdarc | 2008-04-14 13:07:48 -0700 (Mon, 14 Apr 2008) | 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 (Mon, 14 Apr 2008) | 1 line

  Various items; begin writing the SSL section
........
  r62348 | neal.norwitz | 2008-04-14 20:46:21 -0700 (Mon, 14 Apr 2008) | 1 line

  Prevent namespace pollution, add static for internal functions
........

14 files changed:
.bzrignore [new file with mode: 0644]
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

diff --git a/.bzrignore b/.bzrignore
new file mode 100644 (file)
index 0000000..1afc28a
--- /dev/null
@@ -0,0 +1,43 @@
+.purify
+autom4te.cache
+config.log
+config.cache
+config.status
+config.status.lineno
+db_home
+Makefile
+buildno
+python
+build
+Makefile.pre
+platform
+pyconfig.h
+libpython*.a
+python.exe
+CP936.TXT
+SHIFT_JISX0213.TXT
+JOHAB.TXT
+EUC-JP.TXT
+NormalizationTest-3.2.0.txt
+NormalizationTest.txt
+BIG5.TXT
+BIG5HKSCS-2004.TXT
+CP949.TXT
+EUC-CN.TXT
+BIG5HKSCS.TXT
+SHIFTJIS.TXT
+EUC-KR.TXT
+EUC-JISX0213.TXT
+CP932.TXT
+CP950.TXT
+reflog.txt
+gb-18030-2000.xml
+tags
+TAGS
+.gdb_history
+Modules/Setup
+Modules/Setup.config
+Modules/Setup.local
+Modules/config.c
+Parser/pgen
+Lib/plat-mac/errors.rsrc.df.rsrc
index cc20423682f802186fdd89c4cf1a11aeae9b3a2e..fa51221c3d641aa6b13a645ee14f59840e98b6b6 100644 (file)
@@ -736,7 +736,13 @@ There's also a ``__future__`` import that causes all string literals
 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 @@ their own implementations of buffering and text I/O.
 
    :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 @@ This is equivalent to::
 
   A = foo(bar(A))
 
-XXX need to find a good motivating example.    
-
 .. seealso::
 
    :pep:`3129` - Class Decorators
@@ -1848,6 +1853,10 @@ complete list of changes, or look through the CVS logs for all the details.
   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 @@ Improved SSL Support
 --------------------------------------------------
 
 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.
 
index fdad3a2a2ac24c8c07e67690d959e1095729d99d..5786d52f112761cd8659a86e02767af675948678 100644 (file)
@@ -1,3 +1,5 @@
+/* Generated by Parser/pgen */
+
 #define single_input 256
 #define file_input 257
 #define eval_input 258
index c4fce4714b0a3369aaa4d1a07f211b63f051d9b1..d8aee79150f4b8a7c53a130de429e650acd62ec9 100644 (file)
@@ -328,7 +328,8 @@ class _WarningsTests(BaseTest):
                              "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__)
index 46eb4bba854b689339942e1dd187f411396de4c0..0fd59c98711b7dbb1aa7a832b55fbbdd7a16fd8d 100644 (file)
@@ -380,7 +380,7 @@ Py_Main(int argc, wchar_t **argv)
                        skipfirstline = 1;
                        break;
 
-               /* case 'X': reserved for non-standard arguments */
+               /* case 'X': reserved for implementation-specific arguments */
 
                case 'h':
                case '?':
index 17bdf5cdb74ced379ddd7b2b7f3379752d474c76..9f4c2a6a1d644b533223d8961952be708213ab71 100644 (file)
@@ -1083,7 +1083,7 @@ static PyMemberDef property_members[] = {
 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 @@ property_getter(PyObject *self, PyObject *getter)
 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 @@ property_setter(PyObject *self, PyObject *setter)
 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);
index 001c8215f39153cf59863463c5c4243c42f9bb10..de8860f9824ac3a17a7d16af31011bf227d11b76 100644 (file)
@@ -193,6 +193,10 @@ SOURCE=..\..\Modules\arraymodule.c
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\Python\_warnings.c\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\Python\asdl.c\r
 # End Source File\r
 # Begin Source File\r
index 552f199abc6f71912b92969c058251d168f4ff01..304b11999fd249d7f122cf499d2258bf4c6e9714 100644 (file)
                <File
                        RelativePath="..\..\Modules\arraymodule.c">
                </File>
+               <File
+                       RelativePath="..\..\Python\_warnings.c">
+               </File>
                <File
                        RelativePath="..\..\Python\asdl.c">
                </File>
index a4189e1b7547fcd9fa602274ed35ed588b2d8265..b63ed88501e51be203926d35ddafb846845ba13e 100644 (file)
                <Filter\r
                        Name="Python"\r
                        >\r
+                       <File\r
+                               RelativePath="..\..\Python\_warnings.c"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\Python\asdl.c"\r
                                >\r
index 450f0b0959a921ccf803e34455c0c510554fbb88..1f69bcad4fee1bb274bca12b9e28c234cd5885bf 100644 (file)
                <Filter
                        Name="Python"
                        >
+                       <File
+                               RelativePath="..\Python\_warnings.c"
+                               >
+                       </File>
                        <File
                                RelativePath="..\Python\asdl.c"
                                >
                                RelativePath="..\Python\traceback.c"
                                >
                        </File>
-                        <File
-                                RelativePath="..\Python\_warnings.c"
-                                >
-                        </File>
                </Filter>
                <Filter
                        Name="Resource Files"
index 55406981407ae19482f0ec84e797b85154d3b018..ec8f4daa4ef45e40e32e98242fdb9c31805434d5 100644 (file)
@@ -13,6 +13,7 @@ static void printlabels(grammar *, FILE *);
 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 @@ printnonterminals(grammar *g, FILE *fp)
        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);
index 7472ab68c86c97b195c55d4b2bf98f026fc3da7e..d5c4ebe0296e48bd8bf1806eddb7c3551cbfc866 100644 (file)
@@ -61,7 +61,7 @@ get_warnings_attr(const char *attr)
 }
 
 
-PyObject *
+static PyObject *
 get_once_registry(void)
 {
     PyObject *registry;
@@ -378,16 +378,17 @@ warn_explicit(PyObject *category, PyObject *message,
             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;
         }
     }
index 1baf8724c24e4599b1a4640a69a835f48d03c873..da9341f404d18a6a4b8eed7f60479f619b344557 100644 (file)
@@ -91,7 +91,7 @@ int _PyOS_GetOpt(int argc, wchar_t **argv, wchar_t *optstring)
 
        if (option == 'X') {
                fprintf(stderr,
-                       "-X is reserved for non-standard arguments\n");
+                 "-X is reserved for implementation-specific arguments\n");
                return '_';
        }
 
index 081a072966f33105e5c59372defa29eff65c39e5..e26bcc5e26104c3d13c9f66b83ce162b5c470520 100644 (file)
@@ -1,3 +1,5 @@
+/* Generated by Parser/pgen */
+
 #include "pgenheaders.h"
 #include "grammar.h"
 static arc arcs_0_0[3] = {