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 documentation, error messages, etc. to reflect dropping Python 3.8 runtime support #4472

Closed
jtmedley opened this issue Oct 9, 2024 · 3 comments · Fixed by #4473
Closed
Labels
T: documentation Improvements to the docs (e.g. new topic, correction, etc)

Comments

@jtmedley
Copy link

jtmedley commented Oct 9, 2024

The latest version (24.10.0) drops Python 3.8 runtime support via #4452. Error messages and documentation were not updated outside of the changelog.

This creates significant conflicting information between actual requirements and installation instructions, error messages, etc.

Here are a few places (not an exhaustive list) that need updating:

README.md

black/README.md

Lines 39 to 42 in 1b2427a

### Installation
_Black_ can be installed by running `pip install black`. It requires Python 3.8+ to run.
If you want to format Jupyter Notebooks, install with `pip install "black[jupyter]"`.

getting_started.md

## Installation
_Black_ can be installed by running `pip install black`. It requires Python 3.8+ to run.
If you want to format Jupyter Notebooks, install with `pip install "black[jupyter]"`.

docs/faq.md

black/docs/faq.md

Lines 85 to 96 in 1b2427a

## Which Python versions does Black support?
Currently the runtime requires Python 3.8-3.11. Formatting is supported for files
containing syntax from Python 3.3 to 3.11. We promise to support at least all Python
versions that have not reached their end of life. This is the case for both running
_Black_ and formatting code.
Support for formatting Python 2 code was removed in version 22.0. While we've made no
plans to stop supporting older Python 3 minor versions immediately, their support might
also be removed some time in the future without a deprecation period.
Runtime support for 3.7 was removed in version 23.7.0.

docs/integrations/editors.md

#### Installation
This plugin **requires Vim 7.0+ built with Python 3.8+ support**. It needs Python 3.8 to
be able to run _Black_ inside the Vim process which is much faster than calling an
external command.

autoload/black.vim

black/autoload/black.vim

Lines 77 to 80 in 1b2427a

pyver = sys.version_info[:3]
if pyver < (3, 8):
print("Sorry, Black requires Python 3.8+ to run.")
return False

plugin/black.vim

black/plugin/black.vim

Lines 22 to 30 in 1b2427a

if v:version < 700 || !has('python3')
func! __BLACK_MISSING()
echo "The black.vim plugin requires vim7.0+ with Python 3.6 support."
endfunc
command! Black :call __BLACK_MISSING()
command! BlackUpgrade :call __BLACK_MISSING()
command! BlackVersion :call __BLACK_MISSING()
finish
endif

tox.ini might need updating but I'm not certain:

envlist = {,ci-}py{37,38,39,310,311,py3},fuzz,run_self

I was halfway through writing this when I saw that #3896 did a very similar thing after 3.7 support was dropped in #3765.

It is not a coincidence that every file changed in that PR also needs changing again for dropping 3.8 support, along with at least a couple others. It would be pretty cool if updates to documentation, error messages, etc. could be more of a standard part of changes like this in the future. Tests also may need updating. Thanks!

@jtmedley jtmedley added the T: documentation Improvements to the docs (e.g. new topic, correction, etc) label Oct 9, 2024
@hauntsaninja
Copy link
Collaborator

PR welcome!

@JelleZijlstra
Copy link
Collaborator

Working on it

@jtmedley
Copy link
Author

jtmedley commented Oct 9, 2024

Good lord that was fast. Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: documentation Improvements to the docs (e.g. new topic, correction, etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants