This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: warnings has "onceregistry" and "once_registry"
Type: behavior Stage: needs patch
Components: Library (Lib) Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: brett.cannon, pitrou
Priority: normal Keywords: easy

Created on 2010-09-03 20:48 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg115505 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-09-03 20:48
The warnings module has both "onceregistry" and "once_registry", while _warnings only has the latter. There's probably a typo.
msg115508 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2010-09-03 21:05
"defaultaction" and "default_action" is in the same situation. I think there may have been a circular import/ref problem as _warnings pulls from warnings the objects to use for the variables in question. Or at least that's what makes sense. =)

That means the _warnings versions should simply be renamed to "_onceregistry" and "_defaultaction" instead of their current names. Work for you?
msg115510 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-09-03 21:10
> That means the _warnings versions should simply be renamed to
> "_onceregistry" and "_defaultaction" instead of their current names.
> Work for you?

Certainly.
msg115511 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2010-09-03 21:31
OK, so I will fix this in 3.2 but not any other versions as someone might be foolishly relying on the name. Hopefully I can get to this over the weekend.
msg115596 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2010-09-04 18:24
r84500
History
Date User Action Args
2022-04-11 14:57:06adminsetgithub: 53975
2010-09-04 18:24:20brett.cannonsetstatus: open -> closed
resolution: fixed
messages: + msg115596
2010-09-03 21:31:04brett.cannonsetkeywords: + easy

messages: + msg115511
versions: - Python 3.1, Python 2.7
2010-09-03 21:10:45pitrousetmessages: + msg115510
2010-09-03 21:05:18brett.cannonsetmessages: + msg115508
2010-09-03 20:48:53pitroucreate