summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2014-01-14 18:49:38 -0500
committerTimothy Crosley <timothy.crosley@gmail.com>2014-01-14 18:49:38 -0500
commit4e4a8040712b4fbf381335c78a36f0819c3cb632 (patch)
tree50a94b0334e52640b38efbda556e927171779368
parente4d26a99feb790b900597a10631ff349da3ec1d2 (diff)
parent62ad2eb82c037350f25d3e575e59f16740365159 (diff)
downloadpies-4e4a8040712b4fbf381335c78a36f0819c3cb632.tar.gz
Merge branch 'release/2.5.3'2.5.3
-rw-r--r--pies/__init__.py2
-rw-r--r--pies/_utils.py3
-rw-r--r--pies/ast.py8
-rw-r--r--pies2overrides/setup.py4
-rw-r--r--setup.py4
5 files changed, 11 insertions, 10 deletions
diff --git a/pies/__init__.py b/pies/__init__.py
index 9bfaae1..39d0dd1 100644
--- a/pies/__init__.py
+++ b/pies/__init__.py
@@ -29,4 +29,4 @@
OTHER DEALINGS IN THE SOFTWARE.
"""
-__version__ = "2.5.2"
+__version__ = "2.5.3"
diff --git a/pies/_utils.py b/pies/_utils.py
index f8937ae..f64b6b6 100644
--- a/pies/_utils.py
+++ b/pies/_utils.py
@@ -54,11 +54,10 @@ def unmodified_isinstance(*bases):
it allows calls against passed in built in instances to pass even if there not a subclass
"""
class UnmodifiedIsInstance(type):
+ @classmethod
def __instancecheck__(cls, instance):
if cls.__name__ in (str(base.__name__) for base in bases):
return isinstance(instance, bases)
return type.__instancecheck__(cls, instance)
- return isinstance(instance, bases)
-
return with_metaclass(UnmodifiedIsInstance, *bases)
diff --git a/pies/ast.py b/pies/ast.py
index 015e24e..ef576eb 100644
--- a/pies/ast.py
+++ b/pies/ast.py
@@ -1,12 +1,16 @@
from __future__ import absolute_import
+import sys
from ast import *
from .version_info import PY2
-if PY2:
+if PY2 or sys.version_info[1] <= 2:
Try = TryExcept
+else:
+ TryFinally = ()
+if PY2:
def argument_names(node):
return [isinstance(arg, Name) and arg.id or None for arg in node.args.args]
@@ -16,8 +20,6 @@ if PY2:
def kw_only_default_count(node):
return 0
else:
- TryFinally = ()
-
def argument_names(node):
return [arg.arg for arg in node.args.args]
diff --git a/pies2overrides/setup.py b/pies2overrides/setup.py
index 04ad026..5bb9c9d 100644
--- a/pies2overrides/setup.py
+++ b/pies2overrides/setup.py
@@ -14,12 +14,12 @@ if sys.version_info[0] == 2 and sys.version_info[1] < 7:
install_requires += ['ordereddict', 'argparse']
setup(name='pies2overrides',
- version='2.5.2',
+ version='2.5.3',
description='Defines override classes that should be included with pies only if running on Python2.',
author='Timothy Crosley',
author_email='timothy.crosley@gmail.com',
url='https://github.com/timothycrosley/pies',
- download_url='https://github.com/timothycrosley/pies/blob/master/pies2overrides/dist/pies2overrides-2.5.2.tar.gz?raw=true',
+ download_url='https://github.com/timothycrosley/pies/blob/master/pies2overrides/dist/pies2overrides-2.5.3.tar.gz?raw=true',
license="MIT",
install_requires=install_requires,
requires=install_requires,
diff --git a/setup.py b/setup.py
index b12fd65..32e0740 100644
--- a/setup.py
+++ b/setup.py
@@ -24,13 +24,13 @@ except (IOError, ImportError, OSError, RuntimeError):
readme = ''
setup(name='pies',
- version='2.5.2',
+ version='2.5.3',
description='The simplest way to write one program that runs on both Python 2 and Python 3.',
long_description=readme,
author='Timothy Crosley',
author_email='timothy.crosley@gmail.com',
url='https://github.com/timothycrosley/pies',
- download_url='https://github.com/timothycrosley/pies/blob/master/dist/pies-2.5.2.tar.gz?raw=true',
+ download_url='https://github.com/timothycrosley/pies/blob/master/dist/pies-2.5.3.tar.gz?raw=true',
license="MIT",
install_requires=install_requires,
requires=install_requires,