[issue17186] no way to introspect registered atexit handlers

2021-11-30 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Library (Lib)
type:  -> enhancement
versions: +Python 3.11 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17186] no way to introspect registered atexit handlers

2021-06-27 Thread Irit Katriel


Irit Katriel  added the comment:

See also issue32082.

--
nosy: +iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Chris Withers

Chris Withers added the comment:

Barry advised me to open this issue as it's a functional regression from Python 
2.

My use case is unit testing code that registers atexit handlers and making sure 
the right handlers are registered with the correct parameters.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17186
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Charles-François Natali

Charles-François Natali added the comment:

Could you please give an example of why this would be a useful addition?
I can see the usage of removing a handler, but the user should know which 
handlers are registered.

--
nosy: +neologix

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17186
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Charles-François Natali

Charles-François Natali added the comment:

 Barry advised me to open this issue as it's a functional regression from 
 Python 2.

But it was relying on a private and non documented feature in Python
2, so it's not really a regression.

 My use case is unit testing code that registers atexit handlers and making 
 sure the right handlers are registered with the correct parameters.

IMO, complicating an API for testing purpose is a bad idea.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17186
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Chris Withers

Chris Withers added the comment:

I can think of other use cases. Anyway, I'm just glad your opinion isn't the 
only one there is ;-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17186
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't think you want your test suite to run your atexit handlers at exit, so 
you should probably mock atexit.register instead.

--
nosy: +pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17186
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17186] no way to introspect registered atexit handlers

2013-02-22 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Feb 22, 2013, at 06:54 PM, Charles-François Natali wrote:

Charles-François Natali added the comment:

 Barry advised me to open this issue as it's a functional regression from
 Python 2.

But it was relying on a private and non documented feature in Python
2, so it's not really a regression.

I also suggested it would have to be considered a new feature for 3.4.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17186
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17186] no way to introspect registered atexit handlers

2013-02-20 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17186
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17186] no way to introspect registered atexit handlers

2013-02-11 Thread Chris Withers

New submission from Chris Withers:

Python 2 had a private but usable way of introspecting and manipulating 
registered atexit handlers by way of the atexit._exithandlers.

In Python 3, registering and unregistering are handled, but there is no longer 
a way to see what atexit handlers are registered.

Barry suggested filing a bug to have this added as a new feature for Python 
3.4. Some kind of read-only sequence would be fine, if the original list can no 
longer be exposed.

--
messages: 181935
nosy: cjw296
priority: normal
severity: normal
status: open
title: no way to introspect registered atexit handlers
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17186
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com