Black requires Python 3.6.2+ (#1668)

This commit is contained in:
Hugo van Kemenade 2021-03-04 15:59:31 +02:00 committed by GitHub
parent e293473ea9
commit 24418a5450
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -49,7 +49,7 @@ _Contents:_ **[Installation and usage](#installation-and-usage)** |
### Installation
_Black_ can be installed by running `pip install black`. It requires Python 3.6.0+ to
_Black_ can be installed by running `pip install black`. It requires Python 3.6.2+ to
run but you can reformat Python 2 code with it, too.
#### Install from GitHub

View File

@ -103,9 +103,9 @@ def _get_virtualenv_site_packages(venv_path, pyver):
return venv_path / 'lib' / f'python{pyver[0]}.{pyver[1]}' / 'site-packages'
def _initialize_black_env(upgrade=False):
pyver = sys.version_info[:2]
if pyver < (3, 6):
print("Sorry, Black requires Python 3.6+ to run.")
pyver = sys.version_info[:3]
if pyver < (3, 6, 2):
print("Sorry, Black requires Python 3.6.2+ to run.")
return False
from pathlib import Path

View File

@ -3,7 +3,7 @@
import sys
import os
assert sys.version_info >= (3, 6, 0), "black requires Python 3.6+"
assert sys.version_info >= (3, 6, 2), "black requires Python 3.6.2+"
from pathlib import Path # noqa E402
CURRENT_DIR = Path(__file__).parent
@ -65,7 +65,7 @@ def get_long_description() -> str:
packages=["blackd", "black", "blib2to3", "blib2to3.pgen2", "black_primer"],
package_dir={"": "src"},
package_data={"blib2to3": ["*.txt"], "black": ["py.typed"]},
python_requires=">=3.6",
python_requires=">=3.6.2",
zip_safe=False,
install_requires=[
"click>=7.1.2",