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

@mina-asham mina-asham 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 pallets#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
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`.
untitaker and others added 22 commits Apr 4, 2016
issue pallets#393: Usage error should show there is a --help option
Removed unnecessary word.
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
Copy link
Member

@untitaker untitaker 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 issue Aug 19, 2016
@untitaker
Copy link
Member

@untitaker untitaker commented Aug 19, 2016

Manually applied, thanks!

@untitaker untitaker closed this Aug 19, 2016
pgkelley4 added a commit to pgkelley4/click that referenced this issue Aug 20, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet