summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzrignore43
-rw-r--r--Doc/whatsnew/2.6.rst33
-rw-r--r--Include/graminit.h2
-rw-r--r--Lib/test/test_warnings.py3
-rw-r--r--Modules/main.c2
-rw-r--r--Objects/descrobject.c6
-rw-r--r--PC/VC6/pythoncore.dsp4
-rw-r--r--PC/VS7.1/pythoncore.vcproj3
-rw-r--r--PC/VS8.0/pythoncore.vcproj4
-rw-r--r--PCbuild/pythoncore.vcproj8
-rw-r--r--Parser/printgrammar.c3
-rw-r--r--Python/_warnings.c11
-rw-r--r--Python/getopt.c2
-rw-r--r--Python/graminit.c2
14 files changed, 102 insertions, 24 deletions
diff --git a/.bzrignore b/.bzrignore
new file mode 100644
index 0000000000..1afc28a5ba
--- /dev/null
+++ b/.bzrignore
@@ -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
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst
index cc20423682..fa51221c3d 100644
--- a/Doc/whatsnew/2.6.rst
+++ b/Doc/whatsnew/2.6.rst
@@ -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.
diff --git a/Include/graminit.h b/Include/graminit.h
index fdad3a2a2a..5786d52f11 100644
--- a/Include/graminit.h
+++ b/Include/graminit.h
@@ -1,3 +1,5 @@
+/* Generated by Parser/pgen */
+
#define single_input 256
#define file_input 257
#define eval_input 258
diff --git a/Lib/test/test_warnings.py b/Lib/test/test_warnings.py
index c4fce4714b..d8aee79150 100644
--- a/Lib/test/test_warnings.py
+++ b/Lib/test/test_warnings.py
@@ -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__)
diff --git a/Modules/main.c b/Modules/main.c
index 46eb4bba85..0fd59c9871 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -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 '?':
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 17bdf5cdb7..9f4c2a6a1d 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -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);
diff --git a/PC/VC6/pythoncore.dsp b/PC/VC6/pythoncore.dsp
index 001c8215f3..de8860f982 100644
--- a/PC/VC6/pythoncore.dsp
+++ b/PC/VC6/pythoncore.dsp
@@ -193,6 +193,10 @@ SOURCE=..\..\Modules\arraymodule.c
# 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
diff --git a/PC/VS7.1/pythoncore.vcproj b/PC/VS7.1/pythoncore.vcproj
index 552f199abc..304b11999f 100644
--- a/PC/VS7.1/pythoncore.vcproj
+++ b/PC/VS7.1/pythoncore.vcproj
@@ -410,6 +410,9 @@
RelativePath="..\..\Modules\arraymodule.c">
</File>
<File
+ RelativePath="..\..\Python\_warnings.c">
+ </File>
+ <File
RelativePath="..\..\Python\asdl.c">
</File>
<File
diff --git a/PC/VS8.0/pythoncore.vcproj b/PC/VS8.0/pythoncore.vcproj
index a4189e1b75..b63ed88501 100644
--- a/PC/VS8.0/pythoncore.vcproj
+++ b/PC/VS8.0/pythoncore.vcproj
@@ -1587,6 +1587,10 @@
Name="Python"
>
<File
+ RelativePath="..\..\Python\_warnings.c"
+ >
+ </File>
+ <File
RelativePath="..\..\Python\asdl.c"
>
</File>
diff --git a/PCbuild/pythoncore.vcproj b/PCbuild/pythoncore.vcproj
index 450f0b0959..1f69bcad4f 100644
--- a/PCbuild/pythoncore.vcproj
+++ b/PCbuild/pythoncore.vcproj
@@ -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"
diff --git a/Parser/printgrammar.c b/Parser/printgrammar.c
index 5540698140..ec8f4daa4e 100644
--- a/Parser/printgrammar.c
+++ b/Parser/printgrammar.c
@@ -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);
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 7472ab68c8..d5c4ebe029 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -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;
}
}
diff --git a/Python/getopt.c b/Python/getopt.c
index 1baf8724c2..da9341f404 100644
--- a/Python/getopt.c
+++ b/Python/getopt.c
@@ -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 '_';
}
diff --git a/Python/graminit.c b/Python/graminit.c
index 081a072966..e26bcc5e26 100644
--- a/Python/graminit.c
+++ b/Python/graminit.c
@@ -1,3 +1,5 @@
+/* Generated by Parser/pgen */
+
#include "pgenheaders.h"
#include "grammar.h"
static arc arcs_0_0[3] = {