GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Adding _base64_crc32c function for storage integrity checks. by dhermes · Pull Request #692 · googleapis/google-cloud-python

Conversation

@dhermes

@dhermes dhermes commented Mar 9, 2015

Copy link
Copy Markdown
Contributor

@tseaver I have yet to do two things:

  • Add crcmod as a dependency in setup.py.
  • Add tests for the added method (wanted to figure out the depedency first)

crcmod is compiled C code and it should be optional. Is there a way to ask setuptools to try to install, but continue on if it fails?


This is work towards #547. Picks up where #611 left off.


Some relevant snippets I used:

(ADDED 3/11/2015): https://github.com/GoogleCloudPlatform/gsutil/blob/748c9da8497816dbf9d2044dc25ff16ecf6494f0/gslib/copy_helper.py#L769
https://github.com/GoogleCloudPlatform/gsutil/blob/748c9da8497816dbf9d2044dc25ff16ecf6494f0/gslib/hashing_helper.py#L99-L116
https://github.com/GoogleCloudPlatform/gsutil/blob/748c9da8497816dbf9d2044dc25ff16ecf6494f0/gslib/copy_helper.py#L771
https://github.com/GoogleCloudPlatform/gsutil/blob/748c9da8497816dbf9d2044dc25ff16ecf6494f0/gslib/copy_helper.py#L778

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 9, 2015
@dhermes dhermes added the api: storage Issues related to the Cloud Storage API. label Mar 9, 2015
@tseaver

tseaver commented Mar 9, 2015

Copy link
Copy Markdown
Contributor

crcmod is compiled C code and it should be optional. Is there a way to ask setuptools to try to install, but continue on if it fails?

It already handles that, via the following in its own setup.py:

try:
    setup(**setup_dict)
except KeyboardInterrupt:
    raise
except:
    # If there are any compilation errors or there are no build tools available
    # for the extension module, delete the extension module and try to install
    # the pure Python version.
    del setup_dict['ext_modules']
    setup(**setup_dict)

Note that crcmod doesn't explicitly support Python 3.3 or 3.4.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Mar 9, 2015

Copy link
Copy Markdown
Contributor Author

D'oh! My bad for not checking. Great news though.

RE: Python 3.3/3.4 support

  • the module has not been updated since 2010
  • there is a gsutil mirror since the ship it in their binary
  • there is a somewhat official repo that was created in 2012, but commits still stop in 2010 (it doesn't look like the author "Ray Buvel" is in any of the commits)

I don't know if there is a formal way to "refresh" the package that is 4+ years old.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes
Adding _base64_crc32c function for storage integrity checks.
48e1e0a
@dhermes
dhermes force-pushed the add-crc32c-check branch from f67d530 to 48e1e0a Compare March 11, 2015 19:54
@coveralls

coveralls commented Mar 11, 2015

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.06%) to 99.94% when pulling 48e1e0a on dhermes:add-crc32c-check into 83f92cc on GoogleCloudPlatform:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Mar 12, 2015

Copy link
Copy Markdown
Contributor Author

Running the generator is not so helpful:
https://gist.github.com/dhermes/1cecf85c706ef8491c9a

One of the biggest perks is the .update() and .hexdigest() interface of the Python interface.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tseaver
tseaver reviewed Mar 12, 2015
View reviewed changes
Comment thread gcloud/storage/_helpers.py

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Mar 12, 2015

Copy link
Copy Markdown
Contributor

Because crcmod is an "optional" dependency (conditionally imported, with an exception raised at the one point it is needed if it is not present), we should declare it via an "extra" in setup.py, e.g.:

setup(
    name='gcloud',
    ...
    extras_require={
        'storage_checksum': ['crcmod'],
    },

It needs to be in tox.ini as well.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Mar 12, 2015

Copy link
Copy Markdown
Contributor Author

@tseaver We need to determine what to do about Python 3 compatibility before moving too far forward.

It seems relying on this library from PyPI is not possible in the current state.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Mar 12, 2015

Copy link
Copy Markdown
Contributor

We could fork it to https://github.com/GoogleCloudPlatform/gcloud-python, I guess, and ensure that its tests support the versions we care about.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Mar 12, 2015

Copy link
Copy Markdown
Contributor Author

@cmcqueen Do you have any contact with the maintainers of crcmod? (I am inquiring due to your fork: https://bitbucket.org/cmcqueen1975/crcmod)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cmcqueen

cmcqueen commented Mar 12, 2015

Copy link
Copy Markdown

I have had contact in the past, though that was several years ago (I contributed some changes to crcmod). I could look up my old e-mail correspondence.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Mar 12, 2015

Copy link
Copy Markdown
Contributor Author

Thanks for the quick reply! That would be great. We essentially just want to get Python 3.3. and Python 3.4 supported in the library without forking it. I don't know what happens to abandoned PyPI packages, but it seems something like crcmod2 might be necessary.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Mar 12, 2015

Copy link
Copy Markdown
Contributor

I reached out today to Ray Buvel (the author) via the SourceForge message UI

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Mar 12, 2015

Copy link
Copy Markdown
Contributor Author

Thanks @tseaver. Maybe we could file an issue with https://github.com/pypa/pip or reach out to https://groups.google.com/forum/#!forum/pypa-dev (Python Packaging Authority).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cmcqueen

cmcqueen commented Mar 12, 2015

Copy link
Copy Markdown

What is needed for 3.3 and 3.4 support? Do you mean just compile Windows binaries? I compiled the old ones I think, but only for 32-bit not 64-bit.

(I wish the Python foundation provided a service to compile Windows binaries for Python packages, since it's difficult to get set up to compile them, for both 32-bit and 64-bit. It would be really helpful.)

There is this unofficial repository of Python binary packages, including crcmod

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Mar 13, 2015

Copy link
Copy Markdown
Contributor

@cmcqueen Yes, we'd like to have Windows users able to use gcloud and its dependencies on the Python versions we support, without needing to be able to build extensions. I found an explicit e-mail address today for Ray Buvel, and tried again (on the theory that the SF.net profile might have an out-of-date address).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Mar 23, 2015

Copy link
Copy Markdown
Contributor Author

@tseaver Did you ever hear from Ray Buvel?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes dhermes mentioned this pull request Jun 25, 2015
Adding Pylint plugin to check Sphinx docstrings. #948
Merged
@dhermes

dhermes commented Sep 17, 2015

Copy link
Copy Markdown
Contributor Author

@tseaver Did you ever hear from Ray Buvel?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Sep 17, 2015

Copy link
Copy Markdown
Contributor

@dhermes Nope, crickets.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes dhermes added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 22, 2016
@lukesneeringer

lukesneeringer commented Mar 16, 2017

Copy link
Copy Markdown
Contributor

Declaring bankruptcy on this PR, which is two years old and no activity for 18 months.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lukesneeringer lukesneeringer closed this Mar 16, 2017
@dhermes
dhermes deleted the add-crc32c-check branch March 16, 2017 23:02
@tseaver

tseaver commented Aug 6, 2018

Copy link
Copy Markdown
Contributor

@frankyn This is the ticket for our never-merged CRC32C support.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@frankyn

frankyn commented Aug 6, 2018

Copy link
Copy Markdown
Contributor

Thank you @tseaver!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Aug 6, 2018

Copy link
Copy Markdown
Contributor

crcmod is effectively abandoned (last release more than eight years ago). We might do better to use crccheck, which is pure Python, and supports modern Python versions (it is GPL v3, though).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@frankyn

frankyn commented Aug 9, 2018

Copy link
Copy Markdown
Contributor

So the open question is we need to define a package to use for crc32c checksum support?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Aug 9, 2018

Copy link
Copy Markdown
Contributor

@frankyn Yes.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

parthea pushed a commit that referenced this pull request Aug 21, 2025
@gcf-owl-bot
chore: rename rst files to avoid conflict with service names (#692)
15fad1b
Source-Link: googleapis/synthtool@d52e638
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:4f9b3b106ad0beafc2c8a415e3f62c1a0cc23cabea115dbe841b848f581cfe99

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 16, 2025
@gcf-owl-bot @parthea
chore: rename rst files to avoid conflict with service names (#692)
8eb4bfc
Source-Link: googleapis/synthtool@d52e638
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:4f9b3b106ad0beafc2c8a415e3f62c1a0cc23cabea115dbe841b848f581cfe99

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 18, 2025
@Linchin
fix: table schema change error (#692)
c12fce2
* fix: table schema change error

* improve comments
parthea pushed a commit that referenced this pull request Nov 22, 2025
@renovate-bot
chore(deps): update all dependencies (#692)
959e7d6
parthea pushed a commit that referenced this pull request Nov 24, 2025
@ohmayr
chore: update unittest workflow template (#692)
930d507
parthea pushed a commit that referenced this pull request Nov 24, 2025
@Mariatta
fix: ordering in limit_to_last (#692)
c9c7251
When limit_to_last was set, we need to reverse the order. However due to error in comparing the order direction, it was not properly set.

comparing `order.direction == self.ASCENDING` is always `False` because there are two different types.

The correct way is by comparing `order.direction.name == self.ASCENDING`

Fixes #536
parthea pushed a commit that referenced this pull request Nov 24, 2025
Chris Rossi
fix: fix bug with concurrent writes to global cache (#705)
3e1db7e
fix: fix bug with concurrent writes to global cache

Fixes #692
parthea pushed a commit that referenced this pull request Mar 2, 2026
@acocuzzo
fix: add info log for bidi streaming pull ack_deadline requests (#692)
fafeb42
* fix add info logg on bidi streaming pull ack_deadline changes

* adding test coverage for logging
parthea pushed a commit that referenced this pull request Mar 9, 2026
@dependabot
build(deps): bump requests from 2.32.3 to 2.32.4 (#692)
8520d26
Bumps [requests](https://github.com/psf/requests) from 2.32.3 to 2.32.4.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.32.3...v2.32.4)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.32.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Mar 9, 2026
@gcf-owl-bot
chore(python): update release.sh to use keystore (#692)
36a0989
Source-Link: googleapis/synthtool@69fda12
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:ae600f36b6bc972b368367b6f83a1d91ec2c82a4a116b383d67d547c56fe6de3

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
@phren0logy phren0logy mentioned this pull request Jul 19, 2026
firestore: AsyncQuery.get() with limit_to_last returns the first N documents in reverse order — the 2023 sync fix (python-firestore#692) was never applied to async_query.py #17767
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement. do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@dhermes @tseaver @coveralls @cmcqueen @lukesneeringer @frankyn @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.