[Python-checkins] r66898 - in python/branches/tlee-ast-optimize: Doc/library/2to3.rst Include/unicodeobject.h Lib/sre_compile.py Lib/sre_parse.py Misc/NEWS Modules/_testcapimodule.c Tools/msi/msi.py

thomas.lee python-checkins at python.org
Wed Oct 15 05:19:06 CEST 2008


Author: thomas.lee
Date: Wed Oct 15 05:19:05 2008
New Revision: 66898

Log:
Merged revisions 66879-66897 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r66881 | martin.v.loewis | 2008-10-13 22:23:35 +1100 (Mon, 13 Oct 2008) | 2 lines
  
  Issue #4018: Disable "for me" installations on Vista.
........
  r66887 | benjamin.peterson | 2008-10-14 08:51:40 +1100 (Tue, 14 Oct 2008) | 1 line
  
  document how to disable fixers
........
  r66891 | amaury.forgeotdarc | 2008-10-15 08:47:22 +1100 (Wed, 15 Oct 2008) | 5 lines
  
  #4122: On Windows, Py_UNICODE_ISSPACE cannot be used in an extension module:
  compilation fails with "undefined reference to _Py_ascii_whitespace"
  
  Will backport to 2.6.
........
  r66894 | benjamin.peterson | 2008-10-15 09:37:18 +1100 (Wed, 15 Oct 2008) | 1 line
  
  remove set compat cruft
........


Modified:
   python/branches/tlee-ast-optimize/   (props changed)
   python/branches/tlee-ast-optimize/Doc/library/2to3.rst
   python/branches/tlee-ast-optimize/Include/unicodeobject.h
   python/branches/tlee-ast-optimize/Lib/sre_compile.py
   python/branches/tlee-ast-optimize/Lib/sre_parse.py
   python/branches/tlee-ast-optimize/Misc/NEWS
   python/branches/tlee-ast-optimize/Modules/_testcapimodule.c
   python/branches/tlee-ast-optimize/Tools/msi/msi.py

Modified: python/branches/tlee-ast-optimize/Doc/library/2to3.rst
==============================================================================
--- python/branches/tlee-ast-optimize/Doc/library/2to3.rst	(original)
+++ python/branches/tlee-ast-optimize/Doc/library/2to3.rst	Wed Oct 15 05:19:05 2008
@@ -53,13 +53,17 @@
 Comments and and exact indentation are preserved throughout the translation
 process.
 
-By default, 2to3 runs a set of predefined fixers.  The :option:`-l` flag
-lists all avaible fixers.  An explicit set of fixers to run can be given by use
-of the :option:`-f` flag.  The following example runs only the ``imports`` and
-``has_key`` fixers::
+By default, 2to3 runs a set of predefined fixers.  The :option:`-l` flag lists
+all avaible fixers.  An explicit set of fixers to run can be given with
+:option:`-f`.  Likewise the :option:`-x` explicitly disables a fixer.  The
+following example runs only the ``imports`` and ``has_key`` fixers::
 
    $ 2to3 -f imports -f has_key example.py
 
+This command runs every fixer except the ``apply`` fixer::
+
+   $ 2to3 -x apply example.py
+
 Some fixers are *explicit*, meaning they aren't run be default and must be
 listed on the command line to be run.  Here, in addition to the default fixers,
 the ``idioms`` fixer is run::
@@ -78,8 +82,8 @@
 the module to be valid Python.  For example, doctest like examples in a reST
 document could also be refactored with this option.
 
-The :option:`-v` option enables the output of more information on the
-translation process.
+The :option:`-v` option enables output of more information on the translation
+process.
 
 When the :option:`-p` is passed, 2to3 treats ``print`` as a function instead of
 a statement.  This is useful when ``from __future__ import print_function`` is

Modified: python/branches/tlee-ast-optimize/Include/unicodeobject.h
==============================================================================
--- python/branches/tlee-ast-optimize/Include/unicodeobject.h	(original)
+++ python/branches/tlee-ast-optimize/Include/unicodeobject.h	Wed Oct 15 05:19:05 2008
@@ -354,7 +354,7 @@
    in most situations is solely ASCII whitespace, we optimize for the common
    case by using a quick look-up table with an inlined check.
  */
-extern const unsigned char _Py_ascii_whitespace[];
+PyAPI_DATA(const unsigned char) _Py_ascii_whitespace[];
 
 #define Py_UNICODE_ISSPACE(ch) \
 	((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch))

Modified: python/branches/tlee-ast-optimize/Lib/sre_compile.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/sre_compile.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/sre_compile.py	Wed Oct 15 05:19:05 2008
@@ -24,12 +24,6 @@
 def _identityfunction(x):
     return x
 
-def set(seq):
-    s = {}
-    for elem in seq:
-        s[elem] = 1
-    return s
-
 _LITERAL_CODES = set([LITERAL, NOT_LITERAL])
 _REPEATING_CODES = set([REPEAT, MIN_REPEAT, MAX_REPEAT])
 _SUCCESS_CODES = set([SUCCESS, FAILURE])

Modified: python/branches/tlee-ast-optimize/Lib/sre_parse.py
==============================================================================
--- python/branches/tlee-ast-optimize/Lib/sre_parse.py	(original)
+++ python/branches/tlee-ast-optimize/Lib/sre_parse.py	Wed Oct 15 05:19:05 2008
@@ -16,12 +16,6 @@
 
 from sre_constants import *
 
-def set(seq):
-    s = {}
-    for elem in seq:
-        s[elem] = 1
-    return s
-
 SPECIAL_CHARS = ".\\[{()*+?^$|"
 REPEAT_CHARS = "*+?{"
 

Modified: python/branches/tlee-ast-optimize/Misc/NEWS
==============================================================================
--- python/branches/tlee-ast-optimize/Misc/NEWS	(original)
+++ python/branches/tlee-ast-optimize/Misc/NEWS	Wed Oct 15 05:19:05 2008
@@ -32,8 +32,16 @@
 Build
 -----
 
+- Issue #4018: Disable "for me" installations on Vista.
+
 - Issue #3758: Add ``patchcheck`` build target to .PHONY.
 
+C-API
+-----
+
+- Issue #4122: On Windows, fix a compilation error when using the
+  Py_UNICODE_ISSPACE macro in an extension module.
+
 
 What's New in Python 2.6 final
 ==============================

Modified: python/branches/tlee-ast-optimize/Modules/_testcapimodule.c
==============================================================================
--- python/branches/tlee-ast-optimize/Modules/_testcapimodule.c	(original)
+++ python/branches/tlee-ast-optimize/Modules/_testcapimodule.c	Wed Oct 15 05:19:05 2008
@@ -484,6 +484,10 @@
 	Py_UNICODE *value;
 	int len;
 
+	/* issue4122: Undefined reference to _Py_ascii_whitespace on Windows */
+	/* Just use the macro and check that it compiles */
+	int x = Py_UNICODE_ISSPACE(25);
+
         tuple = PyTuple_New(1);
         if (tuple == NULL)
         	return NULL;

Modified: python/branches/tlee-ast-optimize/Tools/msi/msi.py
==============================================================================
--- python/branches/tlee-ast-optimize/Tools/msi/msi.py	(original)
+++ python/branches/tlee-ast-optimize/Tools/msi/msi.py	Wed Oct 15 05:19:05 2008
@@ -217,7 +217,8 @@
                   schema, ProductName="Python "+full_current_version+productsuffix,
                   ProductCode=product_code,
                   ProductVersion=current_version,
-                  Manufacturer=u"Python Software Foundation")
+                  Manufacturer=u"Python Software Foundation",
+                  request_uac = True)
     # The default sequencing of the RemoveExistingProducts action causes
     # removal of files that got just installed. Place it after
     # InstallInitialize, so we first uninstall everything, but still roll
@@ -697,10 +698,11 @@
                         "AdminInstall", "Next", "Cancel")
     whichusers.title("Select whether to install [ProductName] for all users of this computer.")
     # A radio group with two options: allusers, justme
-    g = whichusers.radiogroup("AdminInstall", 135, 60, 160, 50, 3,
+    g = whichusers.radiogroup("AdminInstall", 135, 60, 235, 80, 3,
                               "WhichUsers", "", "Next")
+    g.condition("Disable", "VersionNT=600") # Not available on Vista and Windows 2008
     g.add("ALL", 0, 5, 150, 20, "Install for all users")
-    g.add("JUSTME", 0, 25, 150, 20, "Install just for me")
+    g.add("JUSTME", 0, 25, 235, 20, "Install just for me (not available on Windows Vista)")
 
     whichusers.back("Back", None, active=0)
 


More information about the Python-checkins mailing list