Skip to content

Commit

Permalink
Use NEXT in deprecation examples
Browse files Browse the repository at this point in the history
Closes #11715.
  • Loading branch information
twm committed Oct 24, 2022
1 parent 4b62da0 commit ed07000
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Empty file added src/twisted/11715.misc
Empty file.
10 changes: 5 additions & 5 deletions src/twisted/python/deprecate.py
Expand Up @@ -10,14 +10,14 @@
from incremental import Version
from twisted.python.deprecate import deprecated
@deprecated(Version("Twisted", 8, 0, 0))
@deprecated(Version("Twisted", "NEXT", 0, 0))
def badAPI(self, first, second):
'''
Docstring for badAPI.
'''
...
@deprecated(Version("Twisted", 16, 0, 0))
@deprecated(Version("Twisted", "NEXT", 0, 0))
class BadClass:
'''
Docstring for BadClass.
Expand All @@ -34,7 +34,7 @@ class BadClass:
class OtherwiseUndeprecatedClass:
@deprecatedProperty(Version('Twisted', 16, 0, 0))
@deprecatedProperty(Version("Twisted", "NEXT", 0, 0))
def badProperty(self):
'''
Docstring for badProperty.
Expand All @@ -54,7 +54,7 @@ def badProperty(self, value):
...
deprecatedModuleAttribute(
Version("Twisted", 8, 0, 0),
Version("Twisted", "NEXT", 0, 0),
"Use goodAttribute instead.",
"your.full.module.name",
"badAttribute")
Expand All @@ -68,7 +68,7 @@ def badProperty(self, value):
To mark an optional, keyword parameter of a function or method as deprecated
without deprecating the function itself, you can use::
@deprecatedKeywordParameter(Version("Twisted", 19, 2, 0), 'baz')
@deprecatedKeywordParameter(Version("Twisted", "NEXT", 0, 0), "baz")
def someFunction(foo, bar=0, baz=None):
...
Expand Down

0 comments on commit ed07000

Please sign in to comment.