Opened 6 years ago

#7218 enhancement new

twisted.python.deprecate.deprecated should deprecate module-level attribute access when used on a global function

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author:

Description

This example should emit a deprecation warning:

if __name__ == '__main__':
    import deprecatedtoplevelget
    deprecatedtoplevelget.bar
    raise SystemExit()

from twisted.python.deprecate import deprecated
from twisted.python.versions import Version

@deprecated(Version("foo", 1, 2, 3))
def bar():
    pass

See #7217 for some justifications.

Change History (0)

Note: See TracTickets for help on using tickets.