From 0f93576f6caf7f6d2775b755bdc9bd2ef5030391 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 10 Feb 2014 11:06:09 +0200 Subject: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit v1.2.1 From bb419ae882974f45bf24f310ec38cd0f3e1fbb3b Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Sun, 23 Feb 2014 22:56:39 -0800 Subject: Fix GH-21 ("u function doesn't work on Python 2") --- pies/overrides.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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.""" -- cgit v1.2.1 From bd8ffba9d6e90af9266d316ece3b2d08eaaa9321 Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Sun, 23 Feb 2014 23:05:21 -0800 Subject: Add tests.py --- tests.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests.py 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' -- cgit v1.2.1 From 68750239640d8acc7f0b2283b530f8d2594a579e Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Sun, 23 Feb 2014 22:32:08 -0800 Subject: Add tox.ini --- test_pies.py | 7 +++++++ tox.ini | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test_pies.py create mode 100644 tox.ini 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/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 -- cgit v1.2.1 From f2178c011df44591e78a69ac160f24de85d50a09 Mon Sep 17 00:00:00 2001 From: Timothy Crosley Date: Mon, 24 Feb 2014 05:50:28 -0500 Subject: Bump version to 2.6.1 --- pies/__init__.py | 2 +- pies2overrides/setup.py | 4 ++-- setup.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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/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, -- cgit v1.2.1 From 8aed6f50627477d4ab94443607b3e6334d6db732 Mon Sep 17 00:00:00 2001 From: Timothy Crosley Date: Mon, 24 Feb 2014 05:51:36 -0500 Subject: Improve command --- .env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 0f3ccbd..894af80 100644 --- a/.env +++ b/.env @@ -35,11 +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 } -- cgit v1.2.1 From e1d129638af84cbfc3d8a6faa48bab1f9d59e547 Mon Sep 17 00:00:00 2001 From: Timothy Crosley Date: Mon, 24 Feb 2014 05:57:21 -0500 Subject: Disable wheel support till I determine correct way to change requirements per python version using it --- .env | 2 -- 1 file changed, 2 deletions(-) diff --git a/.env b/.env index 894af80..a2f6462 100644 --- a/.env +++ b/.env @@ -37,11 +37,9 @@ function _distribute_project() root sudo rm -rf dist build python setup.py sdist upload - python setup.py bdist_wheel upload overrides sudo rm -rf dist build python setup.py sdist upload - python setup.py bdist_wheel upload } function _leave_project() -- cgit v1.2.1