Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Make click.progressbar work with codecs.open files #637

Closed
wants to merge 59 commits into from

Conversation

@mina-asham
Copy link

commented Aug 19, 2016

  • codecs.open returns a StreamReaderWriter when used with encoding, this object doesn't have a __len__ attribute, so calling the len function on it result in an AttributeError instead of a TypeError
  • this will catch the AttributeError as well as the TypeError instead of only catching the later
  • Fixes: #636
mitsuhiko and others added 30 commits Nov 25, 2015
Revert changes made to ``BadOptionUsage.__init__`` in
5f98f57. Additionally, store
``option_name`` on the exception instance to allow programmatic access
to it (this matches the behavior of several other exceptions) and
document the param in ``BadOptionUsage``'s docstring. Fixes #474.
fix minor doc typo: "pf" -> "of"
Restore option_name parameter to BadOptionUsage
introduce int_types compat to fix python3 type error in _length_hint
Simplify MANIFEST.in commands
Add the ability to hide commands and options from help
Fixed a typo in the advanced help docs
'resolve_path' suggests, that it will also call os.path.expanduser(), while in fact it does not.
Avoid confusion by stating this in the docstring of :class:`Path`.
Clarify behavior of resolve_path
untitaker and others added 23 commits Apr 4, 2016
Add Float Range in Types
Fix #424
issue #393: Usage error should show there is a --help option
Removed unnecessary word.
Update python3.rst
Fix #577
fix external package broken link on CONTRIBUTING
- codecs.open returns a StreamReaderWriter when used with encoding, this object doesn't have a `__len__` attribute, so calling the `len` function on it result in an `AttributeError` instead of a `TypeError`
- this will catch the AttributeError as well as the TypeError instead of only catching the later
@untitaker untitaker changed the base branch from master to 6.x-maintenance Aug 19, 2016
@untitaker

This comment has been minimized.

Copy link
Member

commented Aug 19, 2016

Oops, sorry, I thought I could actually cherry-pick your commit with this new GitHub feature. I'll merge manually.

untitaker added a commit that referenced this pull request Aug 19, 2016
@untitaker

This comment has been minimized.

Copy link
Member

commented Aug 19, 2016

Manually applied, thanks!

@untitaker untitaker closed this Aug 19, 2016
pgkelley4 added a commit to pgkelley4/click that referenced this pull request Aug 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.