Compare commits

...

3 Commits
1.0.0 ... 0.9.2

Author SHA1 Message Date
80a2c8266c 0.9.2 2015-02-24 07:49:24 +01:00
bc742b62cf Use absolute links to LICENCE, etc. 2015-02-24 07:47:25 +01:00
43ce0b6fa1 Don't depend on requests.compat
#314
2015-02-24 07:39:26 +01:00
6 changed files with 34 additions and 15 deletions

View File

@ -9,7 +9,12 @@ This project adheres to `Semantic Versioning <http://semver.org/>`_.
`1.0.0-dev`_ (Unreleased) `1.0.0-dev`_ (Unreleased)
------------------------- -------------------------
* Changed the default color ``--style`` from ``solarized`` to ``monokai``
`0.9.2`_ (2015-02-24)
---------------------
* Fixed compatibility with Requests 2.5.1
* Changed the default JSON ``Content-Type`` to ``application/json`` as UTF-8 * Changed the default JSON ``Content-Type`` to ``application/json`` as UTF-8
is the default JSON encoding is the default JSON encoding
@ -243,4 +248,5 @@ This project adheres to `Semantic Versioning <http://semver.org/>`_.
.. _0.8.0: https://github.com/jakubroztocil/httpie/compare/0.7.1...0.8.0 .. _0.8.0: https://github.com/jakubroztocil/httpie/compare/0.7.1...0.8.0
.. _0.9.0: https://github.com/jakubroztocil/httpie/compare/0.8.0...0.9.0 .. _0.9.0: https://github.com/jakubroztocil/httpie/compare/0.8.0...0.9.0
.. _0.9.1: https://github.com/jakubroztocil/httpie/compare/0.9.0...0.9.1 .. _0.9.1: https://github.com/jakubroztocil/httpie/compare/0.9.0...0.9.1
.. _1.0.0-dev: https://github.com/jakubroztocil/httpie/compare/0.9.1...master .. _0.9.2: https://github.com/jakubroztocil/httpie/compare/0.9.1...0.9.2
.. _1.0.0-dev: https://github.com/jakubroztocil/httpie/compare/0.9.2...master

View File

@ -1298,21 +1298,21 @@ Please see `claudiatd/httpie-artwork`_
Contribute Contribute
========== ==========
Please see `CONTRIBUTING <CONTRIBUTING.rst>`_. Please see `CONTRIBUTING <https://github.com/jakubroztocil/httpie/blob/master/CONTRIBUTING.rst>`_.
========== ==========
Change Log Change Log
========== ==========
Please see `CHANGELOG <CHANGELOG.rst>`_. Please see `CHANGELOG <https://github.com/jakubroztocil/httpie/blob/master/CHANGELOG.rst>`_.
======= =======
Licence Licence
======= =======
Please see `LICENSE <LICENSE>`_. Please see `LICENSE <https://github.com/jakubroztocil/httpie/blob/master/LICENSE>`_.

View File

@ -3,7 +3,7 @@ HTTPie - a CLI, cURL-like tool for humans.
""" """
__author__ = 'Jakub Roztocil' __author__ = 'Jakub Roztocil'
__version__ = '1.0.0-dev' __version__ = '0.9.2'
__licence__ = 'BSD' __licence__ = 'BSD'

View File

@ -2,12 +2,26 @@
Python 2.6, 2.7, and 3.x compatibility. Python 2.6, 2.7, and 3.x compatibility.
""" """
# Borrow these from requests: import sys
# noinspection PyUnresolvedReferences
from requests.compat import (
is_windows, bytes, str, # Taken from `requests.compat`
is_py3, is_py26, is_pypy, is_py27 _ver = sys.version_info
) is_py2 = (_ver[0] == 2)
is_py26 = (is_py2 and _ver[1] == 6)
is_py27 = (is_py2 and _ver[1] == 7)
is_py3 = (_ver[0] == 3)
is_pypy = ('pypy' in _ver)
is_windows = 'win32' in str(sys.platform).lower()
if is_py2:
bytes = str
str = unicode
elif is_py3:
str = str
bytes = bytes
try: # pragma: no cover try: # pragma: no cover
# noinspection PyUnresolvedReferences,PyCompatibility # noinspection PyUnresolvedReferences,PyCompatibility

View File

@ -1,7 +1,6 @@
import sys import sys
from requests.compat import is_windows from httpie.compat import is_windows
from httpie.config import DEFAULT_CONFIG_DIR, Config from httpie.config import DEFAULT_CONFIG_DIR, Config

View File

@ -14,7 +14,7 @@ from httpie.plugins import FormatterPlugin
# great and fruity seems to give the best result there. # great and fruity seems to give the best result there.
AVAILABLE_STYLES = set(pygments.styles.STYLE_MAP.keys()) AVAILABLE_STYLES = set(pygments.styles.STYLE_MAP.keys())
AVAILABLE_STYLES.add('solarized') AVAILABLE_STYLES.add('solarized')
DEFAULT_STYLE = 'monokai' DEFAULT_STYLE = 'solarized'
class ColorFormatter(FormatterPlugin): class ColorFormatter(FormatterPlugin):