Skip to content

Commit

Permalink
#11715: Use NEXT in deprecation examples (#11720)
Browse files Browse the repository at this point in the history
  • Loading branch information
twm committed Oct 26, 2022
2 parents bc31b87 + 927a5dc commit 50761f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Empty file added src/twisted/11715.misc
Empty file.
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 50761f4

Please sign in to comment.