evenicoulddoit / django-rest-framework-serializer-extensions

Extensions to help DRY up Django Rest Framework serializers
Other
247 stars 23 forks source link

Explicit decoding of README from UTF-8 in setup.py. #15

Closed KyeRussell closed 6 years ago

KyeRussell commented 6 years ago

This fixes an issue I have installing this page using Python 3.5 and without (py)pandoc.

    Traceback (most recent call last):
      File "/tmp/pip-9otzkogk-build/setup.py", line 60, in get_long_description
        import pypandoc
    ImportError: No module named 'pypandoc'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-9otzkogk-build/setup.py", line 88, in <module>
        long_description=get_long_description(),
      File "/tmp/pip-9otzkogk-build/setup.py", line 62, in get_long_description
        return open('README.md').read()
      File "/usr/lib/python3.5/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 3631: ordinal not in range(128)
codecov-io commented 6 years ago

Codecov Report

Merging #15 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #15    +/-   ##
======================================
  Coverage     100%   100%            
======================================
  Files           5      3     -2     
  Lines         329    126   -203     
======================================
- Hits          329    126   -203
Impacted Files Coverage Δ
...est_framework_serializer_extensions/serializers.py
rest_framework_serializer_extensions/__init__.py

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 43c5d75...cc11e31. Read the comment docs.

evenicoulddoit commented 6 years ago

@KyeRussell awesome, thanks for this. Noticed the signature difference between Py2 and Py3, but then saw that you'd addressed that, so nice. Could this be a problem in Python 2 or is the encoding assumed to be utf8?

KyeRussell commented 6 years ago

I believe that it’s bexause of the differences in encoding assumptions between Python 2 and 3. I’ve successfully used this package for a while in Python 2 without pandoc so I can’t see it as an issue.

On Wed, 13 Dec 2017 at 5:58 pm, Ian Clark notifications@github.com wrote:

@KyeRussell https://github.com/kyerussell awesome, thanks for this. Noticed the signature difference between Py2 and Py3, but then saw that you'd addressed that, so nice. Could this be a problem in Python 2 or is the encoding assumed to be utf8?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/evenicoulddoit/django-rest-framework-serializer-extensions/pull/15#issuecomment-351341699, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdy9goywZmRphuvZoCosUOlUzAZH7Zsks5s_5_HgaJpZM4RAGc3 .