diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c16e5708..7bd11ec3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,7 +6,7 @@ This document records all notable changes to `HTTPie `_. This project adheres to `Semantic Versioning `_. -`2.0.0-dev`_ (unreleased) +`2.0.0`_ (2020-01-12) ------------------------- * Removed Python 2.7 support (`EOL Jan 2020 `_). * Removed the default 30-second connection ``--timeout`` limit. @@ -408,4 +408,5 @@ This project adheres to `Semantic Versioning `_. .. _1.0.1: https://github.com/jakubroztocil/httpie/compare/1.0.0...1.0.1 .. _1.0.2: https://github.com/jakubroztocil/httpie/compare/1.0.1...1.0.2 .. _1.0.3: https://github.com/jakubroztocil/httpie/compare/1.0.2...1.0.3 -.. _2.0.0-dev: https://github.com/jakubroztocil/httpie/compare/1.0.3...master +.. _2.0.0-dev: https://github.com/jakubroztocil/httpie/compare/1.0.3...2.0.0 +.. _2.1.0-dev: https://github.com/jakubroztocil/httpie/compare/2.0.0...master diff --git a/Makefile b/Makefile index f009827a..ec5c5f1c 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ install: venv clean: @echo $(H1)Cleaning up$(H1END) rm -rf $(VENV_ROOT) - # Symlink for virtualenvwrapper, if we’ve created one. + # Remove symlink for virtualenvwrapper, if we’ve created one. [ -n "$(WORKON_HOME)" -a -L "$(WORKON_HOME)/httpie" -a -f "$(WORKON_HOME)/httpie" ] && rm $(WORKON_HOME)/httpie || true rm -rf .tox *.egg dist build .coverage .cache .pytest_cache httpie.egg-info find . -name '__pycache__' -delete -o -name '*.pyc' -delete diff --git a/httpie/__init__.py b/httpie/__init__.py index 7686500b..c5f7ac47 100644 --- a/httpie/__init__.py +++ b/httpie/__init__.py @@ -3,6 +3,6 @@ HTTPie - a CLI, cURL-like tool for humans. """ -__version__ = '2.0.0-dev' +__version__ = '2.0.0' __author__ = 'Jakub Roztocil' __licence__ = 'BSD' diff --git a/httpie/cli/requestitems.py b/httpie/cli/requestitems.py index 37392bb0..ec8e6c1e 100644 --- a/httpie/cli/requestitems.py +++ b/httpie/cli/requestitems.py @@ -18,21 +18,19 @@ from httpie.utils import (get_content_type, load_json_preserve_order) class RequestItems: - def __init__(self, as_form=False, chunked=False): + def __init__(self, as_form=False): self.headers = RequestHeadersDict() self.data = RequestDataDict() if as_form else RequestJSONDataDict() self.files = RequestFilesDict() self.params = RequestQueryParamsDict() - self.chunked = chunked @classmethod def from_args( cls, request_item_args: List[KeyValueArg], as_form=False, - chunked=False ) -> 'RequestItems': - instance = cls(as_form=as_form, chunked=chunked) + instance = cls(as_form=as_form) rules: Dict[str, Tuple[Callable, dict]] = { SEPARATOR_HEADER: ( process_header_arg, @@ -110,15 +108,6 @@ def process_file_upload_arg(arg: KeyValueArg) -> Tuple[str, IO, str]: ) -def parse_file_item_chunked(arg: KeyValueArg): - fn = arg.value - try: - f = open(os.path.expanduser(fn), 'rb') - except IOError as e: - raise ParseError('"%s": %s' % (arg.orig, e)) - return os.path.basename(fn), f, get_content_type(fn) - - def process_data_item_arg(arg: KeyValueArg) -> str: return arg.value diff --git a/setup.py b/setup.py index 2d18d385..4392270c 100644 --- a/setup.py +++ b/setup.py @@ -35,8 +35,8 @@ tests_require = [ install_requires = [ - 'requests>=2.21.0', - 'Pygments>=2.3.1', + 'requests>=2.22.0', + 'Pygments>=2.5.2', ]