1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Remove 3.6 support / discontinue less available platforms (#1267)

* Remove redundant systems

* Drop it from the docs

* Remove the packaging info about the legacy systems

* Fix some typos

* Drop support for python 3.6
This commit is contained in:
Batuhan Taskaya
2022-01-14 19:49:05 +03:00
committed by GitHub
parent 87629706c9
commit cd877a5e08
24 changed files with 13 additions and 646 deletions

View File

@@ -4,9 +4,9 @@ import warnings
from itertools import groupby
from operator import attrgetter
from typing import Dict, List, Type, Iterator, TypeVar, Optional, ContextManager
from typing import Dict, List, Type, Iterator, Optional, ContextManager
from pathlib import Path
from contextlib import contextmanager
from contextlib import contextmanager, nullcontext
from ..compat import importlib_metadata, find_entry_points, get_dist_name
@@ -34,15 +34,6 @@ def _load_directory(plugins_dir: Path) -> Iterator[None]:
sys.path.remove(plugins_path)
T = TypeVar("T")
@contextmanager
def nullcontext(obj: Optional[T] = None) -> Iterator[Optional[T]]:
# A naive replacement of the nullcontext() for 3.6
yield obj
def enable_plugins(plugins_dir: Optional[Path]) -> ContextManager[None]:
if plugins_dir is None:
return nullcontext()