Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mfschwartz
Copy link

@mfschwartz mfschwartz commented Oct 6, 2017

This partially addresses #22

Note current limitations:

  • doesn't handle chunked download case
  • doesn't handle case of downloading composite objects
  • doesn't do anything about upload checksumming

I ran the unit and system tests only against Python 2.7, because my current OS doesn't support Python 3.6.

Copy link
Contributor

@dhermes dhermes left a comment

Choose a reason for hiding this comment

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

@mfschwartz I am happy to maintainer-ify this PR if you are OK with it? I think it may be easier than a nit-picky review.

server-computed checksum.
"""
md5_hash = hashlib.md5()
# TODO: Add support for validating CRC32C for composite objects. Note

This comment was marked as spam.

This comment was marked as spam.

# make getting google-cloud-python working well more difficult).
expected_md5_hash = None
if ('X-Goog-Hash' in response.headers
and response.headers['X-Goog-Hash']):

This comment was marked as spam.

This comment was marked as spam.

if name == 'md5':
expected_md5_hash = value
if not expected_md5_hash:
logging.getLogger().info(

This comment was marked as spam.

This comment was marked as spam.

setup.py Outdated
setuptools.setup(
name='google-resumable-media',
version='0.2.3',
version='0.2.4',

This comment was marked as spam.

This comment was marked as spam.

.rstrip('\n'))
else:
actual_md5_hash = (base64.encodebytes(bytes(md5_hash.digest(),
'UTF-8')).rstrip('\n'))

This comment was marked as spam.

@mfschwartz
Copy link
Author

Hi - I'd appreciate if we could draw this review to a close soon because the lack of checksumming support in this library is causing customer problems. Thanks.

@lukesneeringer
Copy link
Contributor

@mfschwartz I am happy to maintainer-ify this PR if you are OK with it? I think it may be easier than a nit-picky review.

Yes please.

dhermes added a commit to dhermes/google-resumable-media-python that referenced this pull request Oct 11, 2017
dhermes added a commit that referenced this pull request Oct 11, 2017
@dhermes
Copy link
Contributor

dhermes commented Oct 11, 2017

@mfschwartz I'm closing this PR in favor of #32 (which uses your 3 commits as a diffbase).

Usually GitHub allows maintainers to push into a PR branch, but I couldn't for some reason (possibly because you used the master branch).

As for not being able to install Python 3 on your machine, if you are on Mac OS X or Linux, I highly recommend pyenv (it does not require root privileges). If you are on Windows, I recommend conda or Miniconda (ditto on admin privileges). I'm happy to help if it's relevant to you. If not, no worries.

@dhermes dhermes closed this Oct 11, 2017
@dhermes
Copy link
Contributor

dhermes commented Oct 11, 2017

... the lack of checksumming support in this library is causing customer problems

If you are referring to googleapis/google-cloud-python#4129, it seems that the checksumming is a theory for that breakage (or rather, something that could pinpoint the breakage), but we have not been able to reproduce the customer's report.

@mfschwartz
Copy link
Author

Thanks for the commits Danny.

The problem I was referring to was not googleapis/google-cloud-python#4129, but rather a customer who reached out to the GCS team directly.

@mfschwartz
Copy link
Author

Can you please tell me when you have the two libraries in a state where it's possible to build new releases (at a min I think that means updated version #s and dependencies)? Thanks!

@dhermes
Copy link
Contributor

dhermes commented Oct 11, 2017

Yes. I'm worried that google-cloud-core will make releasing painful. Hopefully not.

@dhermes
Copy link
Contributor

dhermes commented Oct 11, 2017

@mfschwartz Am I correct in assuming you are OK with a release with the partial support implemented?

@mfschwartz
Copy link
Author

Yes, a release with partial support would be good.
I'm sure you're going to but can you please make sure all the tests pass? I tried to fix the test failure on python 3.6 but since I don't currently have a python 3.6 installed I can't test it.
(I saw your note about installing 3.6 on various platforms. I could do that on my Mac; I just did this development on an Ubuntu version that currently doesn't yet support 3.6.)

@dhermes
Copy link
Contributor

dhermes commented Oct 11, 2017

Yes, they are all passing: https://circleci.com/gh/GoogleCloudPlatform/google-resumable-media-python/198


My primary dev machine is Ubuntu and I use pyenv and never looked back. It's as easy as:

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
~/.pyenv/bin/pyenv install 3.6.3
~/.pyenv/versions/3.6.3/bin/python3.6

If you want to just type python3.6, check out the README on the GitHub repo for things to add to your bashrc (or zshrc, etc.)

@mfschwartz
Copy link
Author

Ah, thanks, that was quite easy!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants