Repository: diana-hep/oamap (language: python)

Issue:
Installation broken, can't decode README.rst in python 3.6.5
When trying to install `oamap` either from pypi or git, I get the following error:
```
  Using cached https://files.pythonhosted.org/packages/8a/ff/8fbed6d0574d8ed8ea5132cc3b613055ec357a459198d21c0528b02038bc/oamap-0.12.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-yj2byhwj/oamap/setup.py", line 48, in <module>
        long_description = open("README.rst").read().strip(),
      File "/code/FAST-TOP/external/miniconda/envs/fast/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1647: ordinal not in range(128)
```

This can be replicated by running
```
python -c "f = open('README.rst'); content = f.read()"

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/code/FAST-TOP/external/miniconda/envs/fast/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1647: ordinal not in range(128)
```

using Python 3.6.5

The culprits are the two special dashes: `Python objects— lists, tuples, class instances—`.
I assume that the editor replaced double dash (`--`) with a special ASCII character.



Discussion / hints:

Fix patch:
diff --git a/README.rst b/README.rst
index 89f0f17..13c4fb1 100644
--- a/README.rst
+++ b/README.rst
@@ -11,7 +11,7 @@ Data analysts are often faced with a choice between speed and flexibility. Tabul
 
 The key to high throughput on large datasets, particularly ones with more attributes than are accessed in a single pass, is laying out the data in "columns." All values of an attribute should be contiguous on disk or memory because data are paged from one cache to the next in locally contiguous blocks. The `ROOT <https://root.cern/>`_ and `Parquet <http://parquet.apache.org/>`_ file formats represent JSON-like data in columns on disk, but these data are usually deserialized into objects for processing in memory. Higher performance can be achieved by maintaining the columnar structure through all stages of the calculation (see `this talk <https://youtu.be/jvt4v2LTGK0>`_ and `this paper <https://arxiv.org/abs/1711.01229>`_).
 
-The OAMap toolkit implements an Object Array Mapping in Python. Object Array Mappings, by analogy with Object Relational Mappings (ORMs) are one-to-one relationships between conceptual objects and physical arrays. You can write functions that appear to be operating on ordinary Python objects— lists, tuples, class instances— but are actually being performed on low-level, contiguous buffers (Numpy arrays). The result is fast processing of large, complex datasets with a low memory footprint.
+The OAMap toolkit implements an Object Array Mapping in Python. Object Array Mappings, by analogy with Object Relational Mappings (ORMs) are one-to-one relationships between conceptual objects and physical arrays. You can write functions that appear to be operating on ordinary Python objects-- lists, tuples, class instances-- but are actually being performed on low-level, contiguous buffers (Numpy arrays). The result is fast processing of large, complex datasets with a low memory footprint.
 
 OAMap has two primary modes: (1) pure-Python object proxies, which pretend to be Python objects but actually access array data on demand, and (2) bare-metal bytecode compiled by `Numba <http://numba.pydata.org/>`_. The pure-Python form is good for low-latency, exploratory work, while the compiled form is good for high throughput. They are seamlessly interchangeable: a Python proxy converts to the compiled form when it enters a Numba-compiled function and switches back when it leaves. You can, for instance, do a fast search in compiled code and examine the results more fully by hand.
 


Test patch:
diff --git a/tests/test_issues.py b/tests/test_issues.py
new file mode 100644
index 0000000..f3cc8b2
--- /dev/null
+++ b/tests/test_issues.py
@@ -0,0 +1,14 @@
+import unittest
+
+
+class TestIssues(unittest.TestCase):
+
+    def runTest(self):
+        pass
+
+    def test_issue7(self):
+        with open('README.rst') as f:
+            try:
+                content = f.read()
+            except UnicodeDecodeError as e:
+                self.fail("Cannot read README.rst: " + str(e))