From 4710c53dcad1ebf3755f3efb9e80ac24bd72a9b2 Mon Sep 17 00:00:00 2001 From: darylm503 Date: Mon, 16 Apr 2012 22:12:42 +0000 Subject: AppPkg/Applications/Python: Add Python 2.7.2 sources since the release of Python 2.7.3 made them unavailable from the python.org web site. These files are a subset of the python-2.7.2.tgz distribution from python.org. Changed files from PyMod-2.7.2 have been copied into the corresponding directories of this tree, replacing the original files in the distribution. Signed-off-by: daryl.mcdaniel@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13197 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Python-2.7.2/Lib/lib2to3/tests/data/fixers/bad_order.py | 5 +++++ .../Lib/lib2to3/tests/data/fixers/myfixes/__init__.py | 0 .../Lib/lib2to3/tests/data/fixers/myfixes/fix_explicit.py | 6 ++++++ .../Lib/lib2to3/tests/data/fixers/myfixes/fix_first.py | 6 ++++++ .../Lib/lib2to3/tests/data/fixers/myfixes/fix_last.py | 7 +++++++ .../Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py | 13 +++++++++++++ .../Lib/lib2to3/tests/data/fixers/myfixes/fix_preorder.py | 6 ++++++ .../Lib/lib2to3/tests/data/fixers/no_fixer_cls.py | 1 + .../Lib/lib2to3/tests/data/fixers/parrot_example.py | 2 ++ 9 files changed, 46 insertions(+) create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/bad_order.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/__init__.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_explicit.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_first.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_last.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_preorder.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/no_fixer_cls.py create mode 100644 AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/parrot_example.py (limited to 'AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers') diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/bad_order.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/bad_order.py new file mode 100644 index 0000000000..5b4d0b5daa --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/bad_order.py @@ -0,0 +1,5 @@ +from lib2to3.fixer_base import BaseFix + +class FixBadOrder(BaseFix): + + order = "crazy" diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/__init__.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_explicit.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_explicit.py new file mode 100644 index 0000000000..06c3a9779b --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_explicit.py @@ -0,0 +1,6 @@ +from lib2to3.fixer_base import BaseFix + +class FixExplicit(BaseFix): + explicit = True + + def match(self): return False diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_first.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_first.py new file mode 100644 index 0000000000..84d545b0b0 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_first.py @@ -0,0 +1,6 @@ +from lib2to3.fixer_base import BaseFix + +class FixFirst(BaseFix): + run_order = 1 + + def match(self, node): return False diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_last.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_last.py new file mode 100644 index 0000000000..ddf8618eb1 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_last.py @@ -0,0 +1,7 @@ +from lib2to3.fixer_base import BaseFix + +class FixLast(BaseFix): + + run_order = 10 + + def match(self, node): return False diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py new file mode 100644 index 0000000000..b6d7c20bfe --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_parrot.py @@ -0,0 +1,13 @@ +from lib2to3.fixer_base import BaseFix +from lib2to3.fixer_util import Name + +class FixParrot(BaseFix): + """ + Change functions named 'parrot' to 'cheese'. + """ + + PATTERN = """funcdef < 'def' name='parrot' any* >""" + + def transform(self, node, results): + name = results["name"] + name.replace(Name("cheese", name.prefix)) diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_preorder.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_preorder.py new file mode 100644 index 0000000000..198c41f48b --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/myfixes/fix_preorder.py @@ -0,0 +1,6 @@ +from lib2to3.fixer_base import BaseFix + +class FixPreorder(BaseFix): + order = "pre" + + def match(self, node): return False diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/no_fixer_cls.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/no_fixer_cls.py new file mode 100644 index 0000000000..3742803442 --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/no_fixer_cls.py @@ -0,0 +1 @@ +# This is empty so trying to fetch the fixer class gives an AttributeError diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/parrot_example.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/parrot_example.py new file mode 100644 index 0000000000..2ebdf89dfd --- /dev/null +++ b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/tests/data/fixers/parrot_example.py @@ -0,0 +1,2 @@ +def parrot(): + pass -- cgit v1.2.3