Skip to content

Commit

Permalink
Merge branch 'main' into l022_cte_column_definition
Browse files Browse the repository at this point in the history
  • Loading branch information
barrywhart committed Dec 19, 2021
2 parents ed42498 + 0b58b83 commit 7022f95
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/sqlfluff/__init__.py
Expand Up @@ -26,9 +26,9 @@
if sys.version_info[0] < 3:
raise Exception("Sqlfluff does not support Python 2. Please upgrade to Python 3.")
# Check minor python version
elif sys.version_info[1] < 6:
elif sys.version_info[1] < 7:
raise Exception(
"Sqlfluff %s only supports Python 3.6 and beyond. "
"Sqlfluff %s only supports Python 3.7 and beyond. "
"Use an earlier version of sqlfluff or a later version of Python" % __version__
)

Expand Down
2 changes: 1 addition & 1 deletion src/sqlfluff/core/dialects/__init__.py
@@ -1,7 +1,7 @@
"""Contains SQL Dialects.
Note that individual dialects are only imported as needed at runtime.
This avoids circular references in python 3.6.
This avoids circular references.
To enable this, any modules outside of .dialects cannot import dialects
directly. They should import `dialect_selector` and use that to fetch
Expand Down
10 changes: 1 addition & 9 deletions src/sqlfluff/core/linter/runner.py
Expand Up @@ -229,9 +229,7 @@ def get_runner(
allow_process_parallelism: bool = True,
) -> BaseRunner:
"""Generate a runner instance based on parallel and system configuration."""
# Python multiprocessing isn't supported in 3.6 and before.
# The library exists but we get pickling errors with LintedFile.
if processes > 1 and sys.version_info >= (3, 7):
if processes > 1:
# Process parallelism isn't really supported during testing
# so this flag allows us to fall back to a threaded runner
# in those cases.
Expand All @@ -240,10 +238,4 @@ def get_runner(
else:
return MultiThreadRunner(linter, config, processes=processes)
else:
if processes > 1:
linter_logger.warning(
"Parallel linting is not supported in Python %s.%s.",
sys.version_info.major,
sys.version_info.minor,
)
return SequentialRunner(linter, config)
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist = generate-fixture-yml, linting, doclinting, docbuild, cov-init, py{36,37,38,39,310}, dbt{017,018,019,020,021,100}-py{37,38,39,310}, cov-report, bench, mypy, winpy, dbt{017,018,019,020,021,100}-winpy
envlist = generate-fixture-yml, linting, doclinting, docbuild, cov-init, py{37,38,39,310}, dbt{017,018,019,020,021,100}-py{37,38,39,310}, cov-report, bench, mypy, winpy, dbt{017,018,019,020,021,100}-winpy

[testenv]
passenv = CI CIRCLECI CIRCLE_* HOME SQLFLUFF_BENCHMARK_API_KEY
Expand Down

0 comments on commit 7022f95

Please sign in to comment.