Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for python3, remove support for python2 #35

Merged
merged 1 commit into from Feb 4, 2020

Conversation

pazembrz
Copy link
Contributor

No description provided.


assert path == plotextractor.output_utils.get_image_location(
image,
six.text_type(tmpdir),
Copy link

Choose a reason for hiding this comment

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

why we need to do six here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need it anymore at all, but it's also not harmful at all. Please notice that it's in many places and I didn't want to loose time on removing it. Of course I can do it if you wish.

@@ -40,6 +39,18 @@ def test_get_image_location_ok(tmpdir):
)


def test_get_image_location_unicode_path_ok(tmpdir):
Copy link
Contributor

Choose a reason for hiding this comment

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

can you also add a test where you put a file path that is not valid UTF-8?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 👍


import os
import tarfile
import re

from time import time

from subprocess32 import check_output, TimeoutExpired
from subprocess32 import check_output
Copy link
Contributor

@michamos michamos Feb 4, 2020

Choose a reason for hiding this comment

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

Suggested change
from subprocess32 import check_output
from subprocess import check_output

subprocess32 is a backport of python 3 subprocess to python 2.

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.

None yet

3 participants