Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#11715: Use NEXT in deprecation examples #11720

Merged
merged 2 commits into from Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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