Skip to content

Commit

Permalink
bump version, Merge branch 'fix_position' and rebase branch 'tidy'
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Mar 8, 2016
2 parents 0a0f893 + dd1e83d commit 4f04b79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions tqdm/_utils.py
Expand Up @@ -31,19 +31,15 @@


def _is_utf(encoding):
return ('U8' == encoding) or ('utf' in encoding) or ('UTF' in encoding)
return encoding.lower().startswith('utf-') or ('U8' == encoding)


def _supports_unicode(file):
if not getattr(file, 'encoding', None):
return False
if _is_utf(file.encoding):
try:
file.write(_unich(257) + '\r \r')
except (UnicodeEncodeError, UnicodeDecodeError): # pragma: no cover
return False
else: # pragma: no cover
return True
if not getattr(file, 'interface', None): # pragma: no cover
# FakeStreams from things like bpython-curses can lie
return _is_utf(file.encoding)
return False # pragma: no cover


Expand Down
2 changes: 1 addition & 1 deletion tqdm/_version.py
@@ -1,5 +1,5 @@
# Definition of the version number
version_info = 4, 2, 0 # major, minor, patch, -extra
version_info = 4, 3, 0 # major, minor, patch, -extra

# Nice string for the version
__version__ = '.'.join(map(str, version_info)).replace('.-', '-').strip('.-')

0 comments on commit 4f04b79

Please sign in to comment.