Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).

- Fixed duplicate keys preservation of JSON data. ([#1163](https://github.com/httpie/httpie/issues/1163))
- Added support for formatting & coloring of JSON bodies preceded by non-JSON data (e.g., an XXSI prefix). ([#1130](https://github.com/httpie/httpie/issues/1130))
- Installed plugins are now listed in `--debug` output. ([#1165](https://github.com/httpie/httpie/issues/1165))

## [2.5.0](https://github.com/httpie/httpie/compare/2.4.0...2.5.0) (2021-09-06)

Expand Down
1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,6 @@ Use one of these options to control output processing:
| `--pretty=format` | Apply formatting |
| `--pretty=none` | Disables output processing. Default for redirected output |


Formatting has the following effects:

- HTTP headers are sorted by name.
Expand Down
2 changes: 2 additions & 0 deletions httpie/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ def print_debug_info(env: Environment):
])
env.stderr.write('\n\n')
env.stderr.write(repr(env))
env.stderr.write('\n\n')
env.stderr.write(repr(plugin_manager))
env.stderr.write('\n')


Expand Down
11 changes: 10 additions & 1 deletion httpie/plugins/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from pkg_resources import iter_entry_points

from ..utils import repr_dict
from . import AuthPlugin, ConverterPlugin, FormatterPlugin
from .base import BasePlugin, TransportPlugin

Expand Down Expand Up @@ -65,5 +66,13 @@ def get_converters(self) -> List[Type[ConverterPlugin]]:
def get_transport_plugins(self) -> List[Type[TransportPlugin]]:
return self.filter(TransportPlugin)

def __str__(self):
return repr_dict({
'adapters': self.get_transport_plugins(),
'auth': self.get_auth_plugins(),
'converters': self.get_converters(),
'formatters': self.get_formatters(),
})

def __repr__(self):
return f'<PluginManager: {list(self)}>'
return f'<{type(self).__name__} {self}>'