Skip to content
This repository was archived by the owner on Mar 1, 2019. It is now read-only.

Make 37 P2P wrapper python 3.7 compatible#45

Open
sosdmike wants to merge 5 commits intodatadesk:masterfrom
sosdmike:make_37_compatable
Open

Make 37 P2P wrapper python 3.7 compatible#45
sosdmike wants to merge 5 commits intodatadesk:masterfrom
sosdmike:make_37_compatable

Conversation

@sosdmike
Copy link
Copy Markdown

@sosdmike sosdmike commented Aug 7, 2018

No description provided.

@earthboundkid
Copy link
Copy Markdown

This is relevant to my interests. One thought: can we just run the whole project through Black first, so there aren't any whitespace changes to diff?

@sosdmike
Copy link
Copy Markdown
Author

@carlmjohnson
I like the idea of having a consistently formatted codebase but adding a dependency on Black, especially because it's 3.6.0+, would be a bit overkill for this branch.

The codebase as it stands is fairly consistent so it might be better to make an Issue to make the entire codebase pep8/black/flake8/whatever compliant.

As it stands with this Merge request there are only 2 lines of whitespace changed.

@earthboundkid
Copy link
Copy Markdown

Is anyone from the LAT still using reviewing this repo?

@palewire
Copy link
Copy Markdown

Yes. I use it and I'm an admin.

But I'm not connected to the SNAP project anymore. Since this wrapper is, as far as I know, still a critical dependency there I'm reluctant to make sudden moves on my own.

If we limit this ticket to strictly Python 3.7 support I think I can merge it for you.

Comment thread p2p/auth.py Outdated
Comment thread p2p/auth.py Outdated
Comment thread p2p/tests.py Outdated
@earthboundkid
Copy link
Copy Markdown

The point of suggesting Black was just to make the diff here smaller by putting all the formatting changes into a separate 100% mechanical PR. If you can review the changes as they are, it isn't necessary.

@jperezlatimes
Copy link
Copy Markdown

@palewire Mike is part of the SNAP project and is aware of it's dependency on the wrapper. I wanted to make sure that supporting python 3 wouldn't step on any datadesk projects. For safety I'll review the PR today as well.

@palewire
Copy link
Copy Markdown

palewire commented Aug 23, 2018 via email

@sosdmike
Copy link
Copy Markdown
Author

@palewire Can this branch be merged and a new version pushed to pypi?

Comment thread p2p/__init__.py

# Get alt_thumbnail_url and old_slug for thumbnail logic below
alt_thumbnail_url = content_item.get('alt_thumbnail_url')
# alt_thumbnail_url = content_item.get('alt_thumbnail_url')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why is this commented out?

Comment thread p2p/__init__.py
log.debug("[P2P][RESPONSE] %s" % request_log)

if resp.status_code >= 500:
response_text = resp.text
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm sure there's a good reason, but why are we moving from resp.content to resp.text?

Comment thread p2p/tests.py
p2p = get_connection()
test_story_slugs = ["la-test-p2p-python-temp-story-%s" % x for x in range(0, 8)]
first_test_story_slug = "la-test-p2p-python-temp-story-0"
eighth_test_story_slug = "la-test-p2p-python-temp-story-7"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What's the goal of this new test story?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants