You've already forked httpie-cli
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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user