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 — Add a 'download' language for fetching pre-built binaries by fangfufu · Pull Request #3020 · pre-commit/pre-commit

Conversation

@fangfufu

@fangfufu fangfufu commented Oct 6, 2023

Copy link
Copy Markdown
Contributor

This commit implements #1453 (comment)

Sorry, something went wrong.

Uh oh!

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

nikaro reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@asottile

asottile commented Oct 6, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

please no pathlib, dataclasses, or backslashes -- really you probably don't need any classes at all. I'm also not sure why the strange sha256 -- use hexdigest which is way more standardized.

there's a lot of code here and almost zero tests so it's not in a reviewable state -- please convert your PR to draft until you're ready for a first round

All reactions

Sorry, something went wrong.

Uh oh!

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

@fangfufu fangfufu mentioned this pull request Oct 6, 2023
Create a 'download' language for fetching pre-built binaries #1453
Open
@fangfufu
fangfufu marked this pull request as draft October 6, 2023 15:16
@fangfufu

fangfufu commented Oct 6, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

What do you mean by

you probably don't need any classes at all

The " the strange sha256" is subresource integrity.

What do you mean by "no backslashes"?

All reactions

Sorry, something went wrong.

Uh oh!

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

@asottile

asottile commented Oct 6, 2023

Copy link
Copy Markdown
Member

What do you mean by

you probably don't need any classes at all

your code has a bunch of classes with nontrivial methods -- simple plain-old-data classes is preferred -- check the approaches used by most of the rest of the codebase

The " the strange sha256" is subresource integrity.

just because it is standardized doesn't mean it is good -- we aren't optimizing for http headers where characters are at a minimum so use normal hexdigest which is far more common and much easier to compute

What do you mean by "no backslashes"?

your source code contains many very very ugly backslashes

All reactions

Sorry, something went wrong.

Uh oh!

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

@fangfufu
Add a 'download' language for fetching pre-built binaries
d0a5fde
This commit implements pre-commit#1453 (comment)
@fangfufu
fangfufu force-pushed the main branch from 95b756f to d0a5fde Compare October 6, 2023 15:40
@fangfufu

fangfufu commented Oct 8, 2023

Copy link
Copy Markdown
Contributor Author

so use normal hexdigest which is far more common

@asottile, normal checksum, i.e. the output from sha256sum or md5sum are not in hex. If we use hexdigest here, then you also need something to generate those hexdigest, right?

All reactions

Sorry, something went wrong.

Uh oh!

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

@asottile

asottile commented Oct 8, 2023

Copy link
Copy Markdown
Member

so use normal hexdigest which is far more common

@asottile, normal checksum, i.e. the output from sha256sum or md5sum are not in hex. If we use hexdigest here, then you also need something to generate those hexdigest, right?

what do you mean yes they are

All reactions

Sorry, something went wrong.

Uh oh!

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

@fangfufu

fangfufu commented Oct 8, 2023

Copy link
Copy Markdown
Contributor Author

Ah never mind, for some reason I thought md5sum and sha256sum outputs string in base64 format.

All reactions

Sorry, something went wrong.

Uh oh!

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

@asottile

asottile commented Oct 10, 2023

Copy link
Copy Markdown
Member

I recently build something similar that has a format I was pretty happy with -- might be able to use that format or similar here: https://github.com/asottile/setuptools-download

All reactions

Sorry, something went wrong.

Uh oh!

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

@fangfufu

fangfufu commented Oct 20, 2023

Copy link
Copy Markdown
Contributor Author

@asottile , do you have a preferred way of handling the different OS and architecture?

All reactions

Sorry, something went wrong.

Uh oh!

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

@asottile

asottile commented Oct 21, 2023

Copy link
Copy Markdown
Member

setuptools-download handles that with markers -- essentially filters on sys.platform, platform.machine() and os.name (though os.name is perhaps redundant)

All reactions

Sorry, something went wrong.

Uh oh!

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

@asottile asottile mentioned this pull request Nov 27, 2023
Add github.com/scop/wrun pre-commit/pre-commit.com#904
Closed
4 tasks done
@nikaro nikaro mentioned this pull request Feb 5, 2024
Feature request: pre-commit hook for formatter tamasfe/taplo#535
Open
@DrummyFloyd DrummyFloyd mentioned this pull request Mar 1, 2024
[Feat]: git-hook norwoodj/helm-docs#221
Open
@DrummyFloyd

This comment was marked as off-topic.

Sign in to view
@asottile asottile closed this Sep 6, 2025
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

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.

3 participants

@fangfufu @asottile @DrummyFloyd
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 01402503 — 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.