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

Allow to use ANSI codes on Windows #72

Closed
wants to merge 2 commits into from

Conversation

TheOneRing
Copy link

FIxes: #71

xolox added a commit to xolox/python-humanfriendly that referenced this pull request Feb 16, 2020
This was brought to my attention in the coloredlogs issue tracker:

- xolox/python-coloredlogs#71
- xolox/python-coloredlogs#72

My experiences with ANSI escape sequences started out as part of the
coloredlogs package but eventually I moved the support for ANSI escape
sequences to my humanfriendly package. This explains how it now makes
sense to integrate the Windows native ANSI escape sequence support in
the humanfriendly package as well.
xolox added a commit that referenced this pull request Feb 16, 2020
xolox added a commit that referenced this pull request Feb 16, 2020
xolox added a commit that referenced this pull request Feb 16, 2020
As far as I can tell wheel distributions make it impossible to implement
a conditional dependency on Colorama based on the Windows OS version, so
in the spirit of looking forward (Windows 10 has a far bigger market
share than it's predecessors) I've decided to drop the requirement.

Hopefully most existing users will not experience any regression because
they previously installed Colorama already, and when available it will
still be used. However new installations on older Windows systems now
require users to install Colorama separately. This has been documented
in the readme in an attempt to minimize resulting confusion.
xolox added a commit that referenced this pull request Feb 16, 2020
The Colorama integration is now taken care of by the humanfriendly
package and frankly it's become rather less important now that modern
Windows installations have native ANSI support, so I don't feel to bad
about dropping these tests 😇.
@xolox
Copy link
Owner

xolox commented Feb 16, 2020

Hi Hannah, thanks for the contribution and sorry for the late response. I've just released coloredlogs 14.0 which knows how to enable native Windows ANSI support as suggested here. I don't use Windows so didn't have an environment available to test this in, but I was crazy enough to download a Windows Edge test VM and it seems to be working well 😁. Thanks for the suggestion!

PS. This pull request wasn't directly merged because the code you contributed was merged into my humanfriendly package instead of coloredlogs, because that's where the handling of ANSI escape sequences happens.

@xolox xolox closed this Feb 16, 2020
bors bot added a commit to duckinator/bork that referenced this pull request Feb 16, 2020
113: Update coloredlogs to 14.0 r=duckinator a=pyup-bot


This PR updates [coloredlogs](https://pypi.org/project/coloredlogs) from **12.0** to **14.0**.



<details>
  <summary>Changelog</summary>
  
  
   ### 14.0
   ```
   ----------------------------

Integrate native Windows 10 support for ANSI escape sequences (`71`_, `72`_).

Native support for ANSI escape sequences was added to Windows 10 after its
initial release, specifically in release 10.0.14393. I&#39;ve now updated
:pypi:`coloredlogs` and :pypi:`humanfriendly` to detect and enable this &quot;new&quot;
native support.

Windows 10 seems to comprise the majority of Windows installations worldwide so
in the interest of &quot;looking forward&quot; I&#39;ve decided to drop the :pypi:`colorama`
requirement, given that it has now become a minority use case.

Hopefully most existing users will not experience any regression because they
previously installed :pypi:`colorama` already, and when available it will still
be used. However new installations on older Windows systems now require users
to install :pypi:`colorama` separately. This has been documented in the readme
in an attempt to minimize resulting confusion.

PS. In case anyone is wondering: I decided that giving a major Windows support
update in :pypi:`coloredlogs` the version 13.0 was asking for trouble, so I
decided not to do that 😇.

.. _Release 14.0: xolox/python-coloredlogs@12.0...14.0
.. _71: xolox/python-coloredlogs#71
.. _72: xolox/python-coloredlogs#72
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/coloredlogs
  - Changelog: https://pyup.io/changelogs/coloredlogs/
  - Docs: https://coloredlogs.readthedocs.io
</details>



Co-authored-by: pyup-bot <github-bot@pyup.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows 10 ANSI support
2 participants