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

Missing wheels for Python 3.7 and 3.8 #1385

Closed
ckataki opened this issue May 7, 2020 · 5 comments
Closed

Missing wheels for Python 3.7 and 3.8 #1385

ckataki opened this issue May 7, 2020 · 5 comments
Assignees
Labels
T: bug Something isn't working

Comments

@ckataki
Copy link

ckataki commented May 7, 2020

Describe the bug
Black only provides Python 3.6 wheels for the latest version (19.10b0). There should be 3.7 and 3.8 wheels made available as well.

To Reproduce

Expected behavior
Wheels should be available for py37 and py38 as well

Environment

  • Version: 19.10b0
  • OS and Python version: Linux/Python 3.7.3

Does this bug also happen on master?
N/A

Additional context
Version 18.3a1 (https://pypi.org/project/black/18.3a1/#files) has a py3 wheel, which makes it compatible with all Python3 interpreters. The move to a py36 wheel is understandable (to enforce Black's Python >= 3.6 requirement as I understand), but without additional wheels we cannot use it with Python 3.7.

@ckataki ckataki added the T: bug Something isn't working label May 7, 2020
@ichard26
Copy link
Collaborator

ichard26 commented May 7, 2020

@ckataki Is there a specific use case where a py37 or py38 specific wheel is required to install Black 19.10b0 on Python37 or Python38? The available wheel for Black 19.10b0 is a Pure Python wheel, meaning that installers can if necessary, fall back to a wheel built for an older version of Python. Quoting from PEP 425 (which describes the naming of wheels):

It is recommended that installers try to choose the most feature complete built distribution available (the one most specific to the installation environment) by default before falling back to pure Python versions published for older Python releases.

Admittedly, I don't know much about packaging for Python for platforms other than Windows. More context about your use case would be appreciated.

@hugovk
Copy link
Contributor

hugovk commented May 7, 2020

Confirmed it uses black-19.10b0-py36-none-any.whl for Python 3.8:

$ python --version
Python 3.8.2
$ pip uninstall -y black
Found existing installation: black 19.10b0
Uninstalling black-19.10b0:
  Successfully uninstalled black-19.10b0
$ pip install --no-cache-dir black
Collecting black
  Downloading black-19.10b0-py36-none-any.whl (97 kB)
     |████████████████████████████████| 97 kB 1.7 MB/s
Requirement already satisfied: regex in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from black) (2020.1.8)
Requirement already satisfied: appdirs in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from black) (1.4.3)
Requirement already satisfied: attrs>=18.1.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from black) (19.3.0)
Requirement already satisfied: click>=6.5 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from black) (7.1.2)
Requirement already satisfied: pathspec<1,>=0.6 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from black) (0.7.0)
Requirement already satisfied: toml>=0.9.4 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from black) (0.10.0)
Requirement already satisfied: typed-ast>=1.4.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from black) (1.4.1)
Installing collected packages: black
Successfully installed black-19.10b0

@ckataki
Copy link
Author

ckataki commented May 7, 2020

I think this is more an issue with pip < 20.0 and the python version tag. It seems like it was removed with version 20.0 (https://pip.pypa.io/en/stable/news/#id41)

root@a7fadbf0aa80:/# python -V
Python 3.7.7
root@a7fadbf0aa80:/# pip -V
pip 19.0.3 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
root@a7fadbf0aa80:/# pip download --no-deps --python-version 37 --no-cache --only-binary :all: black==19.10b0
Collecting black==19.10b0
  Could not find a version that satisfies the requirement black==19.10b0 (from versions: 18.3a0, 18.3a1)
No matching distribution found for black==19.10b0
You are using pip version 19.0.3, however version 20.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@a7fadbf0aa80:/# pip install --upgrade pip >/dev/null
root@a7fadbf0aa80:/# pip -V
pip 20.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
root@a7fadbf0aa80:/# pip download --no-deps --python-version 37 --no-cache --only-binary :all: black==19.10b0
Collecting black==19.10b0
  Downloading black-19.10b0-py36-none-any.whl (97 kB)
     |████████████████████████████████| 97 kB 2.9 MB/s 
  Saved /black-19.10b0-py36-none-any.whl
Successfully downloaded black

As you can see above, this is an issue with pip 19.0.3, but not with pip 20.1. Given that version 20 is fairly new (at least from the perspective of enterprises), upgrades can be slow.
Not sure how easy it would be from your side to release more wheels, but I understand if you would rather not do it.

@cooperlees
Copy link
Collaborator

Confirmed it uses black-19.10b0-py36-none-any.whl for Python 3.8:

If that's the case I'd like to suggest we should just drop explicit version wheels and return to the usual py3 tagged wheel and rely on our python_requires=">=3.6" to enfoce we need >= 3.6. That is here:

To make a normal py3 tagged wheel we just need to drop the following:
https://github.com/psf/black/blob/master/setup.cfg#L2

Happy to do the PR is we all agree.

@JelleZijlstra
Copy link
Collaborator

@cooperlees I agree, makes sense.

@cooperlees cooperlees self-assigned this May 8, 2020
cooperlees added a commit that referenced this issue May 8, 2020
- This makes black wheels to be tagged as py3 default
- `python_requires=">=3.6"` ensures we are >= 3.6

Test:
```
python3 -m venv /tmp/build_black
/tmp/build_black/bin/pip install --upgrade pip setuptools wheel
/tmp/build_black/bin/python setup.py bdist_wheel
...
black-19.10b1.dev53+g81bf9bb.d20200508-py3-none-any.whl
```

Addresses #1385
JelleZijlstra pushed a commit that referenced this issue May 8, 2020
- This makes black wheels to be tagged as py3 default
- `python_requires=">=3.6"` ensures we are >= 3.6

Test:
```
python3 -m venv /tmp/build_black
/tmp/build_black/bin/pip install --upgrade pip setuptools wheel
/tmp/build_black/bin/python setup.py bdist_wheel
...
black-19.10b1.dev53+g81bf9bb.d20200508-py3-none-any.whl
```

Addresses #1385
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants