Skip to content

Replace non-ASCII apostrophe#392

Merged
zippolyte merged 1 commit intoDataDog:masterfrom
Alphadash:patch-1
Jun 11, 2019
Merged

Replace non-ASCII apostrophe#392
zippolyte merged 1 commit intoDataDog:masterfrom
Alphadash:patch-1

Conversation

@Alphadash
Copy link
Copy Markdown
Contributor

@Alphadash Alphadash commented Jun 5, 2019

In some environments, a non-ASCII character causes a failure when pip installing datadog.
I could not replicate on my local OSX machine, but I have a Docker image based on Ubuntu 14.04.5 LTS that fails reliably with the character in the README.

I would add a test, but the tests already fail in my Docker environment for the same reason, I'm not sure what exactly in the environment causes it.

Edit: I spent some time looking at the logic used to determine an encoding for open() when none is specified.
On a Unix system, without CODESET available, it looks for four environment variables 'LC_ALL', 'LC_CTYPE', 'LANG', 'LANGUAGE'. If none of those are set, it defaults to ascii. The container where the build fails has none of those four set.
While this is an environment issue, I still think it's worth changing the character, to match the other apostrophes in the file which all use the ASCII character.

root@9248effa1077:/data/datadogpy# python3.6 setup.py test
Traceback (most recent call last):
  File "setup.py", line 24, in <module>
    long_description=get_readme_md_contents(),
  File "setup.py", line 8, in get_readme_md_contents
    long_description = f.read()
  File "/usr/local/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 3377: ordinal not in range(128)

In some environments, a non-ASCII character causes a failure when pip installing datadog.
I could not replicate on my local OSX machine, but I have a Docker image based on Alpine Linux that fails reliably with the character in the README.
Copy link
Copy Markdown
Contributor

@zippolyte zippolyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Alphadash, LGTM

@zippolyte zippolyte merged commit ce21d49 into DataDog:master Jun 11, 2019
dabcoder pushed a commit to dabcoder/datadogpy that referenced this pull request Oct 25, 2019
In some environments, a non-ASCII character causes a failure when pip installing datadog.
I could not replicate on my local OSX machine, but I have a Docker image based on Alpine Linux that fails reliably with the character in the README.
dabcoder pushed a commit to dabcoder/datadogpy that referenced this pull request Nov 28, 2019
In some environments, a non-ASCII character causes a failure when pip installing datadog.
I could not replicate on my local OSX machine, but I have a Docker image based on Alpine Linux that fails reliably with the character in the README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants