Skip to content

Add initialization counter#262

Closed
Gaming32 wants to merge 1 commit into
tartley:masterfrom
Gaming32:master
Closed

Add initialization counter#262
Gaming32 wants to merge 1 commit into
tartley:masterfrom
Gaming32:master

Conversation

@Gaming32
Copy link
Copy Markdown

Resolves #205.

@tartley
Copy link
Copy Markdown
Owner

tartley commented Oct 13, 2020

Hey. FYI, Yesterday I created a PR to test releases before we push them to PyPI. When that is merged, I'll be more confident about resuming merges and releases. I'll try to look at this PR soon. Thank you for creating it!

The above is cut-and-paste to everyone. To you especially: thank you, that is a rubbish bug, and I'm really happy to see a fix for it!

@Erotemic
Copy link
Copy Markdown

Getting this fixed would help my use cases. Alternatively, if I had a way of knowing if colorama was ever initialized (even if it was deinitialized later), that would be enough for me. Currently I'm testing if colorama.initialise.atexit_done is Falsy, which works, but may not be the most stable test for this.

@Gaming32
Copy link
Copy Markdown
Author

@tartley Any updates on this?

@tartley
Copy link
Copy Markdown
Owner

tartley commented Jul 20, 2021

No updates currently, no.

But! For various reasons, I plan to give Colorama some love soon.

@tartley
Copy link
Copy Markdown
Owner

tartley commented Oct 7, 2021

Is this a dupe of #236 ?

@tartley
Copy link
Copy Markdown
Owner

tartley commented Oct 16, 2022

An alternative approach to these problems has been suggested. Instead of modifying the poorly thought out interface and behavior of the original 'init' function, which is nontrivial and might be relied upon by existing programs, a proposal has been made by njsmith to add a new function, in parallel with init, which behaves more sanely, and hopefully will address your issues with it.

See njsmith's final comment here ("I would like to sneak one more feature in...") before I merged that PR. The intention is to merge that relatively trivial PR, then make a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle multiple calls to init() and deinit() properly

3 participants