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

Update instructions to install latest version of black #973

Closed
wants to merge 1 commit into from

Conversation

imsahil007
Copy link
Contributor

We can close #970 now.
This will ensure that user install the latest version from black Github repo

@imsahil007
Copy link
Contributor Author

Should we close #909 as well?

@terriko
Copy link
Contributor

terriko commented Nov 18, 2020

Hm, I thought the problem was backwards to this -- it seemed like I had 20.8b1 (latest from pypi) installed, but it seemed like CI was using something else. I'd like to switch our CI (and pre-commit) use latest release (or I guess in this case latest beta release, but it's what's tagged as latest in pypi)

@imsahil007
Copy link
Contributor Author

Hm, I thought the problem was backwards to this -- it seemed like I had 20.8b1 (latest from pypi) installed, but it seemed like CI was using something else. I'd like to switch our CI (and pre-commit) use latest release (or I guess in this case latest beta release, but it's what's tagged as latest in pypi)

Installing black from GitHub instead of PyPI is a temporary solution for this. But the user might need to update it every then and now. We can do 2 things right now:

  1. Use the pre-commit hook without specifying any version(This will use github version of black). User will have to update black from GitHub every then and now as stated above.
  2. Use a specific version of black and manually update it whenever a new stable version is updated on PyPI. We will also have to update the requirements.txt accordingly.

@terriko
Copy link
Contributor

terriko commented Nov 23, 2020

What I really want is for pre-commit to use the latest tagged release. I think this is likely closer to option 2, and in fact our current pre-commit specifies rev: stable which I thought would work because as far as both github and pypi are concerned, 20.8b1 is the stable release.

repos:
-   repo: https://github.com/python/black
    rev: stable
    hooks:
    - id: black

At a guess, the problem is that pre-commit doesn't see something with the version 20.8b1 as a stable release because under pep 440 that would be a beta. We'll to dig deeper into pre-commit to see if there's a keyword like "stable" that we could use for "latest beta" if that's what it thinks the current released version is.

@imsahil007
Copy link
Contributor Author

image
According to this, we are using the latest beta release 20.8b1 only

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Whoops, this was hit on the wrong PR, sorry.

@terriko
Copy link
Contributor

terriko commented Dec 9, 2020

Revisiting this: So if CI is using 20.8b1, changing our docs to recommend anything other than that is going to lead to frustration. I guess I'm going to go with the solution in #970 for now, and we'll see if it changes frequently enough to be annoying. I'd still really like a solution that told pre-commit to use the latest release instead of a specific tag, but as best I can tell it doesn't support that at this time.

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.

2 participants