summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Crosley <timothy.crosley@gmail.com>2014-02-24 05:57:40 -0500
committerTimothy Crosley <timothy.crosley@gmail.com>2014-02-24 05:57:40 -0500
commit593dcce07fdb3e8d0053a863a7aba7f2ce8a6c9c (patch)
tree518c17cf76cbd0e530aaaa35f35cd3c182c78136
parente9c17cbc34ca99d31f351e899eecc0a62d4293bb (diff)
parente1d129638af84cbfc3d8a6faa48bab1f9d59e547 (diff)
downloadpies-593dcce07fdb3e8d0053a863a7aba7f2ce8a6c9c.tar.gz
Merge branch 'release/2.6.1'2.6.1
-rw-r--r--.env6
-rw-r--r--README.md2
-rw-r--r--pies/__init__.py2
-rw-r--r--pies/overrides.py7
-rw-r--r--pies2overrides/setup.py4
-rw-r--r--setup.py4
-rw-r--r--test_pies.py7
-rw-r--r--tests.py7
-rw-r--r--tox.ini12
9 files changed, 39 insertions, 12 deletions
diff --git a/.env b/.env
index 0f3ccbd..a2f6462 100644
--- a/.env
+++ b/.env
@@ -35,13 +35,11 @@ function _distribute_project()
{
CURRENT_DIRECTORY="$PWD"
root
- sudo rm -rf dist
+ sudo rm -rf dist build
python setup.py sdist upload
- python setup.py bdist_wheel upload
overrides
- sudo rm -rf dist
+ sudo rm -rf dist build
python setup.py sdist upload
- python setup.py bdist_wheel upload
}
function _leave_project()
diff --git a/README.md b/README.md
index 7efff88..5be0bbd 100644
--- a/README.md
+++ b/README.md
@@ -96,7 +96,7 @@ modules from pies.
Example:
- form pies import pickle
+ from pies import pickle
Full List:
diff --git a/pies/__init__.py b/pies/__init__.py
index 29e7ef4..2489aeb 100644
--- a/pies/__init__.py
+++ b/pies/__init__.py
@@ -28,4 +28,4 @@ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT
OTHER DEALINGS IN THE SOFTWARE.
"""
-__version__ = "2.6.0"
+__version__ = "2.6.1"
diff --git a/pies/overrides.py b/pies/overrides.py
index 834904b..1d64f66 100644
--- a/pies/overrides.py
+++ b/pies/overrides.py
@@ -110,8 +110,11 @@ else:
for removed in ('apply', 'cmp', 'coerce', 'execfile', 'raw_input', 'unpacks'):
globals()[removed] = _create_not_allowed(removed)
- def u(string):
- return codecs.unicode_escape_decode(string[0])
+ def u(s):
+ if isinstance(s, unicode):
+ return s
+ else:
+ return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape")
def execute(_code_, _globs_=None, _locs_=None):
"""Execute code in a namespace."""
diff --git a/pies2overrides/setup.py b/pies2overrides/setup.py
index e8e1062..7644e22 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.6.0',
+ version='2.6.1',
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.6.0.tar.gz?raw=true',
+ download_url='https://github.com/timothycrosley/pies/blob/master/pies2overrides/dist/pies2overrides-2.6.1.tar.gz?raw=true',
license="MIT",
install_requires=install_requires,
requires=install_requires,
diff --git a/setup.py b/setup.py
index bc9bc1e..0868339 100644
--- a/setup.py
+++ b/setup.py
@@ -24,13 +24,13 @@ except (IOError, ImportError, OSError, RuntimeError):
readme = ''
setup(name='pies',
- version='2.6.0',
+ version='2.6.1',
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.6.0.tar.gz?raw=true',
+ download_url='https://github.com/timothycrosley/pies/blob/master/dist/pies-2.6.1.tar.gz?raw=true',
license="MIT",
install_requires=install_requires,
requires=install_requires,
diff --git a/test_pies.py b/test_pies.py
new file mode 100644
index 0000000..5a52b64
--- /dev/null
+++ b/test_pies.py
@@ -0,0 +1,7 @@
+from __future__ import absolute_import, division, print_function, unicode_literals
+
+from pies.overrides import *
+
+
+def test_u():
+ assert u('Bj\xf6rk Gu\xf0mundsd\xf3ttir') == 'Bj\xf6rk Gu\xf0mundsd\xf3ttir'
diff --git a/tests.py b/tests.py
new file mode 100644
index 0000000..5a52b64
--- /dev/null
+++ b/tests.py
@@ -0,0 +1,7 @@
+from __future__ import absolute_import, division, print_function, unicode_literals
+
+from pies.overrides import *
+
+
+def test_u():
+ assert u('Bj\xf6rk Gu\xf0mundsd\xf3ttir') == 'Bj\xf6rk Gu\xf0mundsd\xf3ttir'
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..dac85a3
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,12 @@
+# Tox (http://tox.testrun.org/) is a tool for running tests
+# in multiple virtualenvs. This configuration file will run the
+# test suite on all supported python versions. To use it, "pip install tox"
+# and then run "tox" from this directory.
+
+[tox]
+envlist = py26, py27, py32, py33, pypy
+
+[testenv]
+commands = py.test {posargs}
+deps =
+ pytest